Test runner: fix empty patches; better error message for missing test files; correct...
authorjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 1 Oct 2012 17:16:00 +0000 (17:16 +0000)
committerjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 1 Oct 2012 17:16:00 +0000 (17:16 +0000)
Review URL: https://codereview.chromium.org/11035004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

.gitignore
tools/testrunner/network/endpoint.py
tools/testrunner/server/work_handler.py

index 6aae4db..c39f642 100644 (file)
@@ -29,7 +29,7 @@ shell_g
 /out/
 /test/cctest/cctest.status2
 /test/es5conform/data
-/test/messages/messages.status2
+/test/message/message.status2
 /test/mjsunit/mjsunit.status2
 /test/mozilla/CHECKED_OUT_VERSION
 /test/mozilla/data
index 25547c2..8350fee 100644 (file)
@@ -108,7 +108,15 @@ def Execute(workspace, ctx, tests, sock, server):
 
   progress_indicator = EndpointProgress(sock, server, ctx)
   runner = execution.Runner(suites, progress_indicator, ctx)
-  runner.Run(server.jobs)
+  try:
+    runner.Run(server.jobs)
+  except IOError, e:
+    if e.errno == 2:
+      message = ("File not found: %s, maybe you forgot to 'git add' it?" %
+                 e.filename)
+    else:
+      message = "%s" % e
+    compression.Send([-1, message], sock)
   progress_indicator.HasRun(None)  # Sentinel to signal the end.
   progress_indicator.sender_lock.acquire()  # Released when sending is done.
   progress_indicator.sender_lock.release()
index 9e61af8..80f0178 100644 (file)
@@ -128,6 +128,7 @@ class WorkHandler(SocketServer.BaseRequestHandler):
     return True
 
   def _ApplyPatch(self, patch):
+    if not patch: return True  # Just skip if the patch is empty.
     patchfilename = "_dtest_incoming_patch.patch"
     with open(patchfilename, "w") as f:
       f.write(patch)