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

Side by Side Diff: tools/test.py

Issue 6756036: Revert changelist r7436. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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 | « test/preparser/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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 pass 372 pass
373 373
374 def AfterRun(self, result): 374 def AfterRun(self, result):
375 pass 375 pass
376 376
377 def GetCustomFlags(self, mode): 377 def GetCustomFlags(self, mode):
378 return None 378 return None
379 379
380 def Run(self): 380 def Run(self):
381 self.BeforeRun() 381 self.BeforeRun()
382 result = "exception"
383 try: 382 try:
384 result = self.RunCommand(self.GetCommand()) 383 result = self.RunCommand(self.GetCommand())
385 finally: 384 finally:
386 self.AfterRun(result) 385 self.AfterRun(result)
387 return result 386 return result
388 387
389 def Cleanup(self): 388 def Cleanup(self):
390 return 389 return
391 390
392 391
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 else: 1309 else:
1311 pos = value.find('@') 1310 pos = value.find('@')
1312 import urllib 1311 import urllib
1313 prefix = urllib.unquote(value[:pos]).split() 1312 prefix = urllib.unquote(value[:pos]).split()
1314 suffix = urllib.unquote(value[pos+1:]).split() 1313 suffix = urllib.unquote(value[pos+1:]).split()
1315 def ExpandCommand(args): 1314 def ExpandCommand(args):
1316 return prefix + args + suffix 1315 return prefix + args + suffix
1317 return ExpandCommand 1316 return ExpandCommand
1318 1317
1319 1318
1320 BUILT_IN_TESTS = ['mjsunit', 'cctest', 'message', 'preparser'] 1319 BUILT_IN_TESTS = ['mjsunit', 'cctest', 'message']
1321 1320
1322 1321
1323 def GetSuites(test_root): 1322 def GetSuites(test_root):
1324 def IsSuite(path): 1323 def IsSuite(path):
1325 return isdir(path) and exists(join(path, 'testcfg.py')) 1324 return isdir(path) and exists(join(path, 'testcfg.py'))
1326 return [ f for f in os.listdir(test_root) if IsSuite(join(test_root, f)) ] 1325 return [ f for f in os.listdir(test_root) if IsSuite(join(test_root, f)) ]
1327 1326
1328 1327
1329 def FormatTime(d): 1328 def FormatTime(d):
1330 millis = round(d * 1000) % 1000 1329 millis = round(d * 1000) % 1000
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 for entry in timed_tests[:20]: 1481 for entry in timed_tests[:20]:
1483 t = FormatTime(entry.duration) 1482 t = FormatTime(entry.duration)
1484 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) 1483 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel()))
1485 index += 1 1484 index += 1
1486 1485
1487 return result 1486 return result
1488 1487
1489 1488
1490 if __name__ == '__main__': 1489 if __name__ == '__main__':
1491 sys.exit(Main()) 1490 sys.exit(Main())
OLDNEW
« no previous file with comments | « test/preparser/testcfg.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698