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

Side by Side Diff: tools/test.py

Issue 19541: Fixing the flakiness of the serialization tests by assuring that serializatio... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« test/cctest/testcfg.py ('K') | « test/cctest/testcfg.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2008 the V8 project authors. All rights reserved. 3 # Copyright 2008 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 def DidFail(self, output): 338 def DidFail(self, output):
339 if self.failed is None: 339 if self.failed is None:
340 self.failed = self.IsFailureOutput(output) 340 self.failed = self.IsFailureOutput(output)
341 return self.failed 341 return self.failed
342 342
343 def IsFailureOutput(self, output): 343 def IsFailureOutput(self, output):
344 return output.exit_code != 0 344 return output.exit_code != 0
345 345
346 def GetSource(self): 346 def GetSource(self):
347 return "(no source available)" 347 return "(no source available)"
348 348
349 def Run(self): 349 def RunCommand(self, command):
350 command = self.GetCommand()
351 full_command = self.context.processor(command) 350 full_command = self.context.processor(command)
352 output = Execute(full_command, self.context, self.context.timeout) 351 output = Execute(full_command, self.context, self.context.timeout)
353 return TestOutput(self, full_command, output) 352 return TestOutput(self, full_command, output)
354 353
354 def Run(self):
355 return self.RunCommand(self.GetCommand())
356
355 357
356 class TestOutput(object): 358 class TestOutput(object):
357 359
358 def __init__(self, test, command, output): 360 def __init__(self, test, command, output):
359 self.test = test 361 self.test = test
360 self.command = command 362 self.command = command
361 self.output = output 363 self.output = output
362 364
363 def UnexpectedOutput(self): 365 def UnexpectedOutput(self):
364 if self.HasCrashed(): 366 if self.HasCrashed():
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 for entry in timed_tests[:20]: 1307 for entry in timed_tests[:20]:
1306 t = FormatTime(entry.duration) 1308 t = FormatTime(entry.duration)
1307 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) 1309 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel()))
1308 index += 1 1310 index += 1
1309 1311
1310 return result 1312 return result
1311 1313
1312 1314
1313 if __name__ == '__main__': 1315 if __name__ == '__main__':
1314 sys.exit(Main()) 1316 sys.exit(Main())
OLDNEW
« test/cctest/testcfg.py ('K') | « test/cctest/testcfg.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698