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

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

Issue 1369343002: [cctest] adding --help option to output basic information about cctest (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « test/cctest/cctest.cc ('k') | tools/testrunner/local/commands.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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 "mipsel", 164 "mipsel",
165 "mips64el", 165 "mips64el",
166 "nacl_ia32", 166 "nacl_ia32",
167 "nacl_x64", 167 "nacl_x64",
168 "x87", 168 "x87",
169 "arm64"] 169 "arm64"]
170 170
171 171
172 def BuildOptions(): 172 def BuildOptions():
173 result = optparse.OptionParser() 173 result = optparse.OptionParser()
174 result.usage = '%prog [options] [tests]'
175 result.description = """TESTS: %s""" % (DEFAULT_TESTS)
174 result.add_option("--arch", 176 result.add_option("--arch",
175 help=("The architecture to run tests for, " 177 help=("The architecture to run tests for, "
176 "'auto' or 'native' for auto-detect"), 178 "'auto' or 'native' for auto-detect: %s" % SUPPORTED_A RCHS),
177 default="ia32,x64,arm") 179 default="ia32,x64,arm")
178 result.add_option("--arch-and-mode", 180 result.add_option("--arch-and-mode",
179 help="Architecture and mode in the format 'arch.mode'", 181 help="Architecture and mode in the format 'arch.mode'",
180 default=None) 182 default=None)
181 result.add_option("--asan", 183 result.add_option("--asan",
182 help="Regard test expectations for ASAN", 184 help="Regard test expectations for ASAN",
183 default=False, action="store_true") 185 default=False, action="store_true")
184 result.add_option("--buildbot", 186 result.add_option("--buildbot",
185 help="Adapt to path structure used on buildbots", 187 help="Adapt to path structure used on buildbots",
186 default=False, action="store_true") 188 default=False, action="store_true")
(...skipping 26 matching lines...) Expand all
213 help="Download missing test suite data and exit", 215 help="Download missing test suite data and exit",
214 default=False, action="store_true") 216 default=False, action="store_true")
215 result.add_option("--extra-flags", 217 result.add_option("--extra-flags",
216 help="Additional flags to pass to each test command", 218 help="Additional flags to pass to each test command",
217 default="") 219 default="")
218 result.add_option("--isolates", help="Whether to test isolates", 220 result.add_option("--isolates", help="Whether to test isolates",
219 default=False, action="store_true") 221 default=False, action="store_true")
220 result.add_option("-j", help="The number of parallel tasks to run", 222 result.add_option("-j", help="The number of parallel tasks to run",
221 default=0, type="int") 223 default=0, type="int")
222 result.add_option("-m", "--mode", 224 result.add_option("-m", "--mode",
223 help="The test modes in which to run (comma-separated)", 225 help="The test modes in which to run (comma-separated): %s" % MODES.keys(),
Michael Achenbach 2015/09/29 08:11:14 Here is a long-standing problem hiding. With build
Camillo Bruni 2015/09/29 11:00:07 Yeah I know, since I use the ninja setup locally :
224 default="release,debug") 226 default="release,debug")
225 result.add_option("--no-harness", "--noharness", 227 result.add_option("--no-harness", "--noharness",
226 help="Run without test harness of a given suite", 228 help="Run without test harness of a given suite",
227 default=False, action="store_true") 229 default=False, action="store_true")
228 result.add_option("--no-i18n", "--noi18n", 230 result.add_option("--no-i18n", "--noi18n",
229 help="Skip internationalization tests", 231 help="Skip internationalization tests",
230 default=False, action="store_true") 232 default=False, action="store_true")
231 result.add_option("--no-network", "--nonetwork", 233 result.add_option("--no-network", "--nonetwork",
232 help="Don't distribute tests on the network", 234 help="Don't distribute tests on the network",
233 default=(utils.GuessOS() != "linux"), 235 default=(utils.GuessOS() != "linux"),
234 dest="no_network", action="store_true") 236 dest="no_network", action="store_true")
235 result.add_option("--no-presubmit", "--nopresubmit", 237 result.add_option("--no-presubmit", "--nopresubmit",
236 help='Skip presubmit checks', 238 help='Skip presubmit checks',
237 default=False, dest="no_presubmit", action="store_true") 239 default=False, dest="no_presubmit", action="store_true")
238 result.add_option("--no-snap", "--nosnap", 240 result.add_option("--no-snap", "--nosnap",
239 help='Test a build compiled without snapshot.', 241 help='Test a build compiled without snapshot.',
240 default=False, dest="no_snap", action="store_true") 242 default=False, dest="no_snap", action="store_true")
241 result.add_option("--no-sorting", "--nosorting", 243 result.add_option("--no-sorting", "--nosorting",
242 help="Don't sort tests according to duration of last run.", 244 help="Don't sort tests according to duration of last run.",
243 default=False, dest="no_sorting", action="store_true") 245 default=False, dest="no_sorting", action="store_true")
244 result.add_option("--no-stress", "--nostress", 246 result.add_option("--no-stress", "--nostress",
245 help="Don't run crankshaft --always-opt --stress-op test", 247 help="Don't run crankshaft --always-opt --stress-op test",
246 default=False, dest="no_stress", action="store_true") 248 default=False, dest="no_stress", action="store_true")
247 result.add_option("--no-variants", "--novariants", 249 result.add_option("--no-variants", "--novariants",
248 help="Don't run any testing variants", 250 help="Don't run any testing variants",
249 default=False, dest="no_variants", action="store_true") 251 default=False, dest="no_variants", action="store_true")
250 result.add_option("--variants", 252 result.add_option("--variants",
251 help="Comma-separated list of testing variants") 253 help="Comma-separated list of testing variants: %s" % VARIAN TS)
252 result.add_option("--outdir", help="Base directory with compile output", 254 result.add_option("--outdir", help="Base directory with compile output",
253 default="out") 255 default="out")
254 result.add_option("--predictable", 256 result.add_option("--predictable",
255 help="Compare output of several reruns of each test", 257 help="Compare output of several reruns of each test",
256 default=False, action="store_true") 258 default=False, action="store_true")
257 result.add_option("-p", "--progress", 259 result.add_option("-p", "--progress",
258 help=("The style of progress indicator" 260 help=("The style of progress indicator"
259 " (verbose, dots, color, mono)"), 261 " (verbose, dots, color, mono)"),
260 choices=progress.PROGRESS_INDICATORS.keys(), default="mono") 262 choices=progress.PROGRESS_INDICATORS.keys(), default="mono")
261 result.add_option("--quickcheck", default=False, action="store_true", 263 result.add_option("--quickcheck", default=False, action="store_true",
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 # buildbot. Currently this is capitalized Release and Debug. 543 # buildbot. Currently this is capitalized Release and Debug.
542 shell_dir = os.path.join(workspace, options.outdir, mode) 544 shell_dir = os.path.join(workspace, options.outdir, mode)
543 mode = BuildbotToV8Mode(mode) 545 mode = BuildbotToV8Mode(mode)
544 else: 546 else:
545 shell_dir = os.path.join( 547 shell_dir = os.path.join(
546 workspace, 548 workspace,
547 options.outdir, 549 options.outdir,
548 "%s.%s" % (arch, MODES[mode]["output_folder"]), 550 "%s.%s" % (arch, MODES[mode]["output_folder"]),
549 ) 551 )
550 shell_dir = os.path.relpath(shell_dir) 552 shell_dir = os.path.relpath(shell_dir)
553 if not os.path.exists(shell_dir):
554 raise Exception('Could not find shell_dir: "%s"' % shell_dir)
551 555
552 # Populate context object. 556 # Populate context object.
553 mode_flags = MODES[mode]["flags"] 557 mode_flags = MODES[mode]["flags"]
554 timeout = options.timeout 558 timeout = options.timeout
555 if timeout == -1: 559 if timeout == -1:
556 # Simulators are slow, therefore allow a longer default timeout. 560 # Simulators are slow, therefore allow a longer default timeout.
557 if arch in SLOW_ARCHS: 561 if arch in SLOW_ARCHS:
558 timeout = 2 * TIMEOUT_DEFAULT; 562 timeout = 2 * TIMEOUT_DEFAULT;
559 else: 563 else:
560 timeout = TIMEOUT_DEFAULT; 564 timeout = TIMEOUT_DEFAULT;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 verbose.PrintTestDurations(suites, overall_duration) 704 verbose.PrintTestDurations(suites, overall_duration)
701 705
702 if num_tests == 0: 706 if num_tests == 0:
703 print("Warning: no tests were run!") 707 print("Warning: no tests were run!")
704 708
705 return exit_code 709 return exit_code
706 710
707 711
708 if __name__ == "__main__": 712 if __name__ == "__main__":
709 sys.exit(Main()) 713 sys.exit(Main())
OLDNEW
« no previous file with comments | « test/cctest/cctest.cc ('k') | tools/testrunner/local/commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698