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

Side by Side Diff: tools/testrunner/server/work_handler.py

Issue 11036005: Test runner: More fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rescue foo.js ;-) Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testrunner/network/network_execution.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if not self._ApplyPatch(packet.patch): 69 if not self._ApplyPatch(packet.patch):
70 return 70 return
71 71
72 tests = packet.tests 72 tests = packet.tests
73 endpoint.Execute(v8_root, self.ctx, tests, self.request, self.server.daemon) 73 endpoint.Execute(v8_root, self.ctx, tests, self.request, self.server.daemon)
74 self._SendResponse() 74 self._SendResponse()
75 75
76 def _SendResponse(self, error_message=None): 76 def _SendResponse(self, error_message=None):
77 try: 77 try:
78 if error_message: 78 if error_message:
79 compression.Send([-1, error_message], self.request) 79 compression.Send([[-1, error_message]], self.request)
80 compression.Send(constants.END_OF_STREAM, self.request) 80 compression.Send(constants.END_OF_STREAM, self.request)
81 return 81 return
82 except Exception, e: 82 except Exception, e:
83 pass # Peer is gone. There's nothing we can do. 83 pass # Peer is gone. There's nothing we can do.
84 # Clean up. 84 # Clean up.
85 self._Call("git checkout -f") 85 self._Call("git checkout -f")
86 self._Call("git clean -f -d") 86 self._Call("git clean -f -d")
87 self._Call("rm -rf %s" % self.ctx.shell_dir) 87 self._Call("rm -rf %s" % self.ctx.shell_dir)
88 88
89 def _UnpackBinary(self, binary, pubkey_fingerprint): 89 def _UnpackBinary(self, binary, pubkey_fingerprint):
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 def _Call(self, cmd): 141 def _Call(self, cmd):
142 return subprocess.call(cmd, shell=True) 142 return subprocess.call(cmd, shell=True)
143 143
144 144
145 class WorkSocketServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): 145 class WorkSocketServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
146 def __init__(self, daemon): 146 def __init__(self, daemon):
147 address = (daemon.ip, constants.PEER_PORT) 147 address = (daemon.ip, constants.PEER_PORT)
148 SocketServer.TCPServer.__init__(self, address, WorkHandler) 148 SocketServer.TCPServer.__init__(self, address, WorkHandler)
149 self.job_lock = threading.Lock() 149 self.job_lock = threading.Lock()
150 self.daemon = daemon 150 self.daemon = daemon
OLDNEW
« no previous file with comments | « tools/testrunner/network/network_execution.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698