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

Side by Side Diff: tools/test.py

Issue 10696048: Add Makefile targets for running tests on Android. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add quotes Created 8 years, 5 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 | « tools/android-sync.sh ('k') | tools/test-wrapper-gypbuild.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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 self.succeeded += 1 133 self.succeeded += 1
134 self.remaining -= 1 134 self.remaining -= 1
135 self.HasRun(output) 135 self.HasRun(output)
136 self.lock.release() 136 self.lock.release()
137 137
138 138
139 def EscapeCommand(command): 139 def EscapeCommand(command):
140 parts = [] 140 parts = []
141 for part in command: 141 for part in command:
142 if ' ' in part: 142 if ' ' in part:
143 # Escape spaces. We may need to escape more characters for this 143 # Escape spaces and double quotes. We may need to escape more characters
144 # to work properly. 144 # for this to work properly.
145 parts.append('"%s"' % part) 145 parts.append('"%s"' % part.replace('"', '\\"'))
146 else: 146 else:
147 parts.append(part) 147 parts.append(part)
148 return " ".join(parts) 148 return " ".join(parts)
149 149
150 150
151 class SimpleProgressIndicator(ProgressIndicator): 151 class SimpleProgressIndicator(ProgressIndicator):
152 152
153 def Starting(self): 153 def Starting(self):
154 print 'Running %i tests' % len(self.cases) 154 print 'Running %i tests' % len(self.cases)
155 155
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 # Ensure that the simulator argument is handed down to scons. 1276 # Ensure that the simulator argument is handed down to scons.
1277 options.scons_flags.append("simulator=" + options.simulator) 1277 options.scons_flags.append("simulator=" + options.simulator)
1278 else: 1278 else:
1279 # If options.arch is not set by the command line and no simulator setting 1279 # If options.arch is not set by the command line and no simulator setting
1280 # was found, set the arch to the guess. 1280 # was found, set the arch to the guess.
1281 if options.arch == 'none': 1281 if options.arch == 'none':
1282 options.arch = ARCH_GUESS 1282 options.arch = ARCH_GUESS
1283 options.scons_flags.append("arch=" + options.arch) 1283 options.scons_flags.append("arch=" + options.arch)
1284 # Simulators are slow, therefore allow a longer default timeout. 1284 # Simulators are slow, therefore allow a longer default timeout.
1285 if options.timeout == -1: 1285 if options.timeout == -1:
1286 if options.arch == 'arm' or options.arch == 'mips': 1286 if options.arch in ['android', 'arm', 'mips']:
1287 options.timeout = 2 * TIMEOUT_DEFAULT; 1287 options.timeout = 2 * TIMEOUT_DEFAULT;
1288 else: 1288 else:
1289 options.timeout = TIMEOUT_DEFAULT; 1289 options.timeout = TIMEOUT_DEFAULT;
1290 if options.snapshot: 1290 if options.snapshot:
1291 options.scons_flags.append("snapshot=on") 1291 options.scons_flags.append("snapshot=on")
1292 global VARIANT_FLAGS 1292 global VARIANT_FLAGS
1293 if options.mips_arch_variant: 1293 if options.mips_arch_variant:
1294 options.scons_flags.append("mips_arch_variant=" + options.mips_arch_variant) 1294 options.scons_flags.append("mips_arch_variant=" + options.mips_arch_variant)
1295 1295
1296 if options.stress_only: 1296 if options.stress_only:
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 for entry in timed_tests[:20]: 1548 for entry in timed_tests[:20]:
1549 t = FormatTime(entry.duration) 1549 t = FormatTime(entry.duration)
1550 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) 1550 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel()))
1551 index += 1 1551 index += 1
1552 1552
1553 return result 1553 return result
1554 1554
1555 1555
1556 if __name__ == '__main__': 1556 if __name__ == '__main__':
1557 sys.exit(Main()) 1557 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/android-sync.sh ('k') | tools/test-wrapper-gypbuild.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698