Test runner: fix empty patches; better error message for missing test files; correct .gitignore entry for message.status2

Review URL: https://codereview.chromium.org/11035004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2012-10-01 17:16:00 +00:00
parent efe955587e
commit 12d4075c03
3 changed files with 11 additions and 2 deletions

2
.gitignore vendored
View 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

View 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()

View 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)