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

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: extending help comment 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,"
226 " uppercase for ninja and buildbot builds): %s" % MODES.keys (),
224 default="release,debug") 227 default="release,debug")
225 result.add_option("--no-harness", "--noharness", 228 result.add_option("--no-harness", "--noharness",
226 help="Run without test harness of a given suite", 229 help="Run without test harness of a given suite",
227 default=False, action="store_true") 230 default=False, action="store_true")
228 result.add_option("--no-i18n", "--noi18n", 231 result.add_option("--no-i18n", "--noi18n",
229 help="Skip internationalization tests", 232 help="Skip internationalization tests",
230 default=False, action="store_true") 233 default=False, action="store_true")
231 result.add_option("--no-network", "--nonetwork", 234 result.add_option("--no-network", "--nonetwork",
232 help="Don't distribute tests on the network", 235 help="Don't distribute tests on the network",
233 default=(utils.GuessOS() != "linux"), 236 default=(utils.GuessOS() != "linux"),
234 dest="no_network", action="store_true") 237 dest="no_network", action="store_true")
235 result.add_option("--no-presubmit", "--nopresubmit", 238 result.add_option("--no-presubmit", "--nopresubmit",
236 help='Skip presubmit checks', 239 help='Skip presubmit checks',
237 default=False, dest="no_presubmit", action="store_true") 240 default=False, dest="no_presubmit", action="store_true")
238 result.add_option("--no-snap", "--nosnap", 241 result.add_option("--no-snap", "--nosnap",
239 help='Test a build compiled without snapshot.', 242 help='Test a build compiled without snapshot.',
240 default=False, dest="no_snap", action="store_true") 243 default=False, dest="no_snap", action="store_true")
241 result.add_option("--no-sorting", "--nosorting", 244 result.add_option("--no-sorting", "--nosorting",
242 help="Don't sort tests according to duration of last run.", 245 help="Don't sort tests according to duration of last run.",
243 default=False, dest="no_sorting", action="store_true") 246 default=False, dest="no_sorting", action="store_true")
244 result.add_option("--no-stress", "--nostress", 247 result.add_option("--no-stress", "--nostress",
245 help="Don't run crankshaft --always-opt --stress-op test", 248 help="Don't run crankshaft --always-opt --stress-op test",
246 default=False, dest="no_stress", action="store_true") 249 default=False, dest="no_stress", action="store_true")
247 result.add_option("--no-variants", "--novariants", 250 result.add_option("--no-variants", "--novariants",
248 help="Don't run any testing variants", 251 help="Don't run any testing variants",
249 default=False, dest="no_variants", action="store_true") 252 default=False, dest="no_variants", action="store_true")
250 result.add_option("--variants", 253 result.add_option("--variants",
251 help="Comma-separated list of testing variants") 254 help="Comma-separated list of testing variants: %s" % VARIAN TS)
252 result.add_option("--outdir", help="Base directory with compile output", 255 result.add_option("--outdir", help="Base directory with compile output",
253 default="out") 256 default="out")
254 result.add_option("--predictable", 257 result.add_option("--predictable",
255 help="Compare output of several reruns of each test", 258 help="Compare output of several reruns of each test",
256 default=False, action="store_true") 259 default=False, action="store_true")
257 result.add_option("-p", "--progress", 260 result.add_option("-p", "--progress",
258 help=("The style of progress indicator" 261 help=("The style of progress indicator"
259 " (verbose, dots, color, mono)"), 262 " (verbose, dots, color, mono)"),
260 choices=progress.PROGRESS_INDICATORS.keys(), default="mono") 263 choices=progress.PROGRESS_INDICATORS.keys(), default="mono")
261 result.add_option("--quickcheck", default=False, action="store_true", 264 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. 544 # buildbot. Currently this is capitalized Release and Debug.
542 shell_dir = os.path.join(workspace, options.outdir, mode) 545 shell_dir = os.path.join(workspace, options.outdir, mode)
543 mode = BuildbotToV8Mode(mode) 546 mode = BuildbotToV8Mode(mode)
544 else: 547 else:
545 shell_dir = os.path.join( 548 shell_dir = os.path.join(
546 workspace, 549 workspace,
547 options.outdir, 550 options.outdir,
548 "%s.%s" % (arch, MODES[mode]["output_folder"]), 551 "%s.%s" % (arch, MODES[mode]["output_folder"]),
549 ) 552 )
550 shell_dir = os.path.relpath(shell_dir) 553 shell_dir = os.path.relpath(shell_dir)
554 if not os.path.exists(shell_dir):
555 raise Exception('Could not find shell_dir: "%s"' % shell_dir)
551 556
552 # Populate context object. 557 # Populate context object.
553 mode_flags = MODES[mode]["flags"] 558 mode_flags = MODES[mode]["flags"]
554 timeout = options.timeout 559 timeout = options.timeout
555 if timeout == -1: 560 if timeout == -1:
556 # Simulators are slow, therefore allow a longer default timeout. 561 # Simulators are slow, therefore allow a longer default timeout.
557 if arch in SLOW_ARCHS: 562 if arch in SLOW_ARCHS:
558 timeout = 2 * TIMEOUT_DEFAULT; 563 timeout = 2 * TIMEOUT_DEFAULT;
559 else: 564 else:
560 timeout = TIMEOUT_DEFAULT; 565 timeout = TIMEOUT_DEFAULT;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 verbose.PrintTestDurations(suites, overall_duration) 705 verbose.PrintTestDurations(suites, overall_duration)
701 706
702 if num_tests == 0: 707 if num_tests == 0:
703 print("Warning: no tests were run!") 708 print("Warning: no tests were run!")
704 709
705 return exit_code 710 return exit_code
706 711
707 712
708 if __name__ == "__main__": 713 if __name__ == "__main__":
709 sys.exit(Main()) 714 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