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

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

Issue 11230029: tools/run-tests.py: A few timeout-related fixes (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/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 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 "debug" : ["--nobreak-on-abort", "--nodead-code-elimination", 59 "debug" : ["--nobreak-on-abort", "--nodead-code-elimination",
60 "--enable-slow-asserts", "--debug-code", "--verify-heap"], 60 "--enable-slow-asserts", "--debug-code", "--verify-heap"],
61 "release" : ["--nobreak-on-abort", "--nodead-code-elimination"]} 61 "release" : ["--nobreak-on-abort", "--nodead-code-elimination"]}
62 62
63 SUPPORTED_ARCHS = ["android_arm", 63 SUPPORTED_ARCHS = ["android_arm",
64 "android_ia32", 64 "android_ia32",
65 "arm", 65 "arm",
66 "ia32", 66 "ia32",
67 "mipsel", 67 "mipsel",
68 "x64"] 68 "x64"]
69 # Double the timeout for these:
70 SLOW_ARCHS = ["android_arm",
71 "android_ia32",
72 "arm",
73 "mipsel"]
69 74
70 75
71 def BuildOptions(): 76 def BuildOptions():
72 result = optparse.OptionParser() 77 result = optparse.OptionParser()
73 result.add_option("--arch", 78 result.add_option("--arch",
74 help=("The architecture to run tests for, " 79 help=("The architecture to run tests for, "
75 "'auto' or 'native' for auto-detect"), 80 "'auto' or 'native' for auto-detect"),
76 default="ia32,x64,arm") 81 default="ia32,x64,arm")
77 result.add_option("--arch-and-mode", 82 result.add_option("--arch-and-mode",
78 help="Architecture and mode in the format 'arch.mode'", 83 help="Architecture and mode in the format 'arch.mode'",
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 else: 266 else:
262 shell_dir = os.path.join(workspace, options.outdir, 267 shell_dir = os.path.join(workspace, options.outdir,
263 "%s.%s" % (arch, mode)) 268 "%s.%s" % (arch, mode))
264 shell_dir = os.path.relpath(shell_dir) 269 shell_dir = os.path.relpath(shell_dir)
265 270
266 # Populate context object. 271 # Populate context object.
267 mode_flags = MODE_FLAGS[mode] 272 mode_flags = MODE_FLAGS[mode]
268 timeout = options.timeout 273 timeout = options.timeout
269 if timeout == -1: 274 if timeout == -1:
270 # Simulators are slow, therefore allow a longer default timeout. 275 # Simulators are slow, therefore allow a longer default timeout.
271 if arch in ["android", "arm", "mipsel"]: 276 if arch in SLOW_ARCHS:
272 timeout = 2 * TIMEOUT_DEFAULT; 277 timeout = 2 * TIMEOUT_DEFAULT;
273 else: 278 else:
274 timeout = TIMEOUT_DEFAULT; 279 timeout = TIMEOUT_DEFAULT;
275 280
276 options.timeout *= TIMEOUT_SCALEFACTOR[mode] 281 timeout *= TIMEOUT_SCALEFACTOR[mode]
277 ctx = context.Context(arch, mode, shell_dir, 282 ctx = context.Context(arch, mode, shell_dir,
278 mode_flags, options.verbose, 283 mode_flags, options.verbose,
279 timeout, options.isolates, 284 timeout, options.isolates,
280 options.command_prefix, 285 options.command_prefix,
281 options.extra_flags) 286 options.extra_flags)
282 287
283 # Find available test suites and read test cases from them. 288 # Find available test suites and read test cases from them.
284 variables = { 289 variables = {
285 "mode": mode, 290 "mode": mode,
286 "arch": arch, 291 "arch": arch,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 except KeyboardInterrupt: 360 except KeyboardInterrupt:
356 return 1 361 return 1
357 362
358 if options.time: 363 if options.time:
359 verbose.PrintTestDurations(suites, overall_duration) 364 verbose.PrintTestDurations(suites, overall_duration)
360 return exit_code 365 return exit_code
361 366
362 367
363 if __name__ == "__main__": 368 if __name__ == "__main__":
364 sys.exit(Main()) 369 sys.exit(Main())
OLDNEW
« no previous file with comments | « test/mjsunit/testcfg.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698