Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(968)

Unified Diff: tools/testrunner/local/execution.py

Issue 1696713002: [test runner] Handle missing files gracefully. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/execution.py
diff --git a/tools/testrunner/local/execution.py b/tools/testrunner/local/execution.py
index d6500c82cc103352ab916ff9f61c7c569c0cd282..0d90ab8d0de17a90a70cb10692f1174fff6c5760 100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -28,6 +28,7 @@
import collections
import os
+import re
import shutil
import sys
import time
@@ -38,6 +39,7 @@ from . import perfdata
from . import statusfile
from . import testsuite
from . import utils
+from ..objects import output
# Base dir of the v8 checkout.
@@ -134,15 +136,28 @@ class Job(object):
raise NotImplementedError()
+def SetupProblem(exception, test):
+ stderr = ">>> EXCEPTION: %s\n" % exception
+ match = re.match(r"^.*No such file or directory: '(.*)'$", str(exception))
+ if match:
+ # Extra debuging information when files are claimed missing.
+ f = match.group(1)
+ stderr += ">>> File %s exists? -> %s\n" % (f, os.path.exists(f))
+ return test.id, output.Output(1, False, "", stderr), 0
+
+
class TestJob(Job):
def __init__(self, test):
self.test = test
def Run(self, process_context):
- # Retrieve a new suite object on the worker-process side. The original
- # suite object isn't pickled.
- self.test.SetSuiteObject(process_context.suites)
- instr = _GetInstructions(self.test, process_context.context)
+ try:
+ # Retrieve a new suite object on the worker-process side. The original
+ # suite object isn't pickled.
+ self.test.SetSuiteObject(process_context.suites)
+ instr = _GetInstructions(self.test, process_context.context)
+ except Exception, e:
+ return SetupProblem(e, self.test)
start_time = time.time()
if instr.dep_command is not None:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698