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

Unified Diff: tools/isolate/run_test_cases.py

Issue 10533085: Add a unit test for run_test_cases.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
Index: tools/isolate/run_test_cases.py
diff --git a/tools/isolate/run_test_cases.py b/tools/isolate/run_test_cases.py
index 8d578f228728d57b5060000b785ee37d599e30d2..78225f6f8a2b43a3457dc0528ddb3d990d8a57dc 100755
--- a/tools/isolate/run_test_cases.py
+++ b/tools/isolate/run_test_cases.py
@@ -117,7 +117,8 @@ def get_test_cases(executable, whitelist, blacklist):
return tests
-def run_test_cases(executable, whitelist, blacklist, jobs, timeout, stats_only):
+def run_test_cases(
+ executable, whitelist, blacklist, jobs, timeout, stats_only, no_dump):
"""Traces test cases one by one."""
test_cases = get_test_cases(executable, whitelist, blacklist)
if not test_cases:
@@ -131,8 +132,9 @@ def run_test_cases(executable, whitelist, blacklist, jobs, timeout, stats_only):
results = pool.join(progress, 0.1)
duration = time.time() - progress.start
results = dict((item[0]['test_case'], item) for item in results)
- trace_inputs.write_json('%s.run_test_cases' % executable, results, False)
- print ''
+ if not no_dump:
+ trace_inputs.write_json('%s.run_test_cases' % executable, results, False)
+ sys.stderr.write('\n')
total = len(results)
if not total:
return 1
@@ -207,6 +209,10 @@ def main():
action='count',
default=int(os.environ.get('ISOLATE_DEBUG', 0)),
help='Use multiple times')
+ parser.add_option(
+ '--no-dump',
+ action='store_true',
+ help='do not generate a .test_cases file')
options, args = parser.parse_args()
levels = [logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG]
logging.basicConfig(
@@ -224,7 +230,8 @@ def main():
options.blacklist,
options.jobs,
options.timeout,
- options.stats)
+ options.stats,
+ options.no_dump)
if __name__ == '__main__':

Powered by Google App Engine
This is Rietveld 408576698