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

Unified Diff: tools/test.py

Issue 1654: Allow setting of a --simulator parameter when running tests.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test.py
===================================================================
--- tools/test.py (revision 213)
+++ tools/test.py (working copy)
@@ -949,7 +949,9 @@
result.add_option("-t", "--timeout", help="Timeout in seconds",
default=60, type="int")
result.add_option("--arch", help='The architecture to run tests for',
- default=ARCH_GUESS)
+ default='none')
+ result.add_option("--simulator", help="Run tests with architecture simulator",
+ default='none')
result.add_option("--special-command", default=None)
result.add_option("--cat", help="Print the source of the tests",
default=False, action="store_true")
@@ -964,6 +966,21 @@
if not mode in ['debug', 'release']:
print "Unknown mode %s" % mode
return False
+ if options.simulator != 'none':
+ # Simulator argument was set. Make sure arch and simulator agree.
+ if options.simulator != options.arch:
+ if options.arch == 'none':
+ options.arch = options.simulator
+ else:
+ print "Architecture %s does not match sim %s" %(options.arch, options.simulator)
+ return False
+ # Ensure that the simulator argument is handed down to scons.
+ options.scons_flags.append("simulator=" + options.simulator)
+ else:
+ # If options.arch is not set by the command line and no simulator setting
+ # was found, set the arch to the guess.
+ if options.arch == 'none':
+ options.arch = ARCH_GUESS
return True
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698