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

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

Issue 137543009: Introduce a parameter to skip slow tests when running with a simulator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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/mjsunit/mjsunit.status ('K') | « test/mjsunit/mjsunit.status ('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 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 default=False, action="store_true") 131 default=False, action="store_true")
132 result.add_option("--shard-count", 132 result.add_option("--shard-count",
133 help="Split testsuites into this number of shards", 133 help="Split testsuites into this number of shards",
134 default=1, type="int") 134 default=1, type="int")
135 result.add_option("--shard-run", 135 result.add_option("--shard-run",
136 help="Run this shard from the split up tests.", 136 help="Run this shard from the split up tests.",
137 default=1, type="int") 137 default=1, type="int")
138 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") 138 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="")
139 result.add_option("--shell-dir", help="Directory containing executables", 139 result.add_option("--shell-dir", help="Directory containing executables",
140 default="") 140 default="")
141 result.add_option("--dont-skip-slow-simulator-tests",
142 help="Don't skip more slow tests when using a simulator.",
143 default=False, action="store_true",
144 dest="dont_skip_simulator_slow_tests")
141 result.add_option("--stress-only", 145 result.add_option("--stress-only",
142 help="Only run tests with --always-opt --stress-opt", 146 help="Only run tests with --always-opt --stress-opt",
143 default=False, action="store_true") 147 default=False, action="store_true")
144 result.add_option("--time", help="Print timing information after running", 148 result.add_option("--time", help="Print timing information after running",
145 default=False, action="store_true") 149 default=False, action="store_true")
146 result.add_option("-t", "--timeout", help="Timeout in seconds", 150 result.add_option("-t", "--timeout", help="Timeout in seconds",
147 default= -1, type="int") 151 default= -1, type="int")
148 result.add_option("-v", "--verbose", help="Verbose output", 152 result.add_option("-v", "--verbose", help="Verbose output",
149 default=False, action="store_true") 153 default=False, action="store_true")
150 result.add_option("--valgrind", help="Run tests through valgrind", 154 result.add_option("--valgrind", help="Run tests through valgrind",
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 else: 297 else:
294 timeout = TIMEOUT_DEFAULT; 298 timeout = TIMEOUT_DEFAULT;
295 299
296 timeout *= TIMEOUT_SCALEFACTOR[mode] 300 timeout *= TIMEOUT_SCALEFACTOR[mode]
297 ctx = context.Context(arch, mode, shell_dir, 301 ctx = context.Context(arch, mode, shell_dir,
298 mode_flags, options.verbose, 302 mode_flags, options.verbose,
299 timeout, options.isolates, 303 timeout, options.isolates,
300 options.command_prefix, 304 options.command_prefix,
301 options.extra_flags) 305 options.extra_flags)
302 306
307 simulator_run = not options.dont_skip_simulator_slow_tests and \
308 arch in ['a64', 'arm', 'mips'] and ARCH_GUESS and arch != ARCH_GUESS
303 # Find available test suites and read test cases from them. 309 # Find available test suites and read test cases from them.
304 variables = { 310 variables = {
305 "mode": mode, 311 "mode": mode,
306 "arch": arch, 312 "arch": arch,
307 "system": utils.GuessOS(), 313 "system": utils.GuessOS(),
308 "isolates": options.isolates 314 "isolates": options.isolates,
315 "simulator_run": simulator_run
309 } 316 }
310 all_tests = [] 317 all_tests = []
311 num_tests = 0 318 num_tests = 0
312 test_id = 0 319 test_id = 0
313 for s in suites: 320 for s in suites:
314 s.ReadStatusFile(variables) 321 s.ReadStatusFile(variables)
315 s.ReadTestCases(ctx) 322 s.ReadTestCases(ctx)
316 if len(args) > 0: 323 if len(args) > 0:
317 s.FilterTestCasesByArgs(args) 324 s.FilterTestCasesByArgs(args)
318 all_tests += s.tests 325 all_tests += s.tests
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 except KeyboardInterrupt: 385 except KeyboardInterrupt:
379 return 1 386 return 1
380 387
381 if options.time: 388 if options.time:
382 verbose.PrintTestDurations(suites, overall_duration) 389 verbose.PrintTestDurations(suites, overall_duration)
383 return exit_code 390 return exit_code
384 391
385 392
386 if __name__ == "__main__": 393 if __name__ == "__main__":
387 sys.exit(Main()) 394 sys.exit(Main())
OLDNEW
« test/mjsunit/mjsunit.status ('K') | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698