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

Side by Side Diff: tools/run-tests.py

Issue 526133003: Refactoring: Make gtest testsuite the default. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/libplatform-unittests/testcfg.py ('k') | tools/testrunner/local/testsuite.py » ('j') | 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 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 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 24 matching lines...) Expand all
35 import os 35 import os
36 from os.path import join 36 from os.path import join
37 import platform 37 import platform
38 import random 38 import random
39 import shlex 39 import shlex
40 import subprocess 40 import subprocess
41 import sys 41 import sys
42 import time 42 import time
43 43
44 from testrunner.local import execution 44 from testrunner.local import execution
45 from testrunner.local import gtest_testsuite
45 from testrunner.local import progress 46 from testrunner.local import progress
46 from testrunner.local import testsuite 47 from testrunner.local import testsuite
47 from testrunner.local import utils 48 from testrunner.local import utils
48 from testrunner.local import verbose 49 from testrunner.local import verbose
49 from testrunner.network import network_execution 50 from testrunner.network import network_execution
50 from testrunner.objects import context 51 from testrunner.objects import context
51 52
52 53
53 ARCH_GUESS = utils.DefaultArch() 54 ARCH_GUESS = utils.DefaultArch()
54 DEFAULT_TESTS = ["mjsunit", "fuzz-natives", "base-unittests", 55 DEFAULT_TESTS = ["mjsunit", "fuzz-natives", "base-unittests",
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 suite_paths = [ s for s in DEFAULT_TESTS if s in suite_paths ] 420 suite_paths = [ s for s in DEFAULT_TESTS if s in suite_paths ]
420 else: 421 else:
421 args_suites = OrderedDict() # Used as set 422 args_suites = OrderedDict() # Used as set
422 for arg in args: 423 for arg in args:
423 args_suites[arg.split(os.path.sep)[0]] = True 424 args_suites[arg.split(os.path.sep)[0]] = True
424 suite_paths = [ s for s in args_suites if s in suite_paths ] 425 suite_paths = [ s for s in args_suites if s in suite_paths ]
425 426
426 suites = [] 427 suites = []
427 for root in suite_paths: 428 for root in suite_paths:
428 suite = testsuite.TestSuite.LoadTestSuite( 429 suite = testsuite.TestSuite.LoadTestSuite(
429 os.path.join(workspace, "test", root)) 430 os.path.join(workspace, "test", root), gtest_testsuite.GTestTestSuite)
Benedikt Meurer 2014/09/02 05:13:01 The GTestTestSuite should probably be named Google
430 if suite: 431 if suite:
431 suites.append(suite) 432 suites.append(suite)
432 433
433 if options.download_data: 434 if options.download_data:
434 for s in suites: 435 for s in suites:
435 s.DownloadData() 436 s.DownloadData()
436 437
437 for (arch, mode) in options.arch_and_mode: 438 for (arch, mode) in options.arch_and_mode:
438 try: 439 try:
439 code = Execute(arch, mode, args, options, suites, workspace) 440 code = Execute(arch, mode, args, options, suites, workspace)
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 exit_code = runner.Run(options.j) 578 exit_code = runner.Run(options.j)
578 overall_duration = time.time() - start_time 579 overall_duration = time.time() - start_time
579 580
580 if options.time: 581 if options.time:
581 verbose.PrintTestDurations(suites, overall_duration) 582 verbose.PrintTestDurations(suites, overall_duration)
582 return exit_code 583 return exit_code
583 584
584 585
585 if __name__ == "__main__": 586 if __name__ == "__main__":
586 sys.exit(Main()) 587 sys.exit(Main())
OLDNEW
« no previous file with comments | « test/libplatform-unittests/testcfg.py ('k') | tools/testrunner/local/testsuite.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698