Revision: 3629
Author: [email protected]
Date: Mon Jan 18 05:17:38 2010
Log: Lift filtering of the test higher as otherwise we can get
empty list of tests to run after the filtering and
would actually die with division by 0.
And there was a type (|c| instead of |case|) which is fixed too.
Review URL: http://codereview.chromium.org/545080
http://code.google.com/p/v8/source/detail?r=3629
Modified:
/branches/bleeding_edge/tools/test.py
=======================================
--- /branches/bleeding_edge/tools/test.py Mon Nov 9 01:31:57 2009
+++ /branches/bleeding_edge/tools/test.py Mon Jan 18 05:17:38 2010
@@ -639,10 +639,7 @@
name = name + '.exe'
return name
-def RunTestCases(all_cases, progress, tasks):
- def DoSkip(case):
- return SKIP in c.outcomes or SLOW in c.outcomes
- cases_to_run = [ c for c in all_cases if not DoSkip(c) ]
+def RunTestCases(cases_to_run, progress, tasks):
progress = PROGRESS_INDICATORS[progress](cases_to_run)
return progress.Run(tasks)
@@ -1335,13 +1332,16 @@
PrintReport(all_cases)
result = None
- if len(all_cases) == 0:
+ def DoSkip(case):
+ return SKIP in case.outcomes or SLOW in case.outcomes
+ cases_to_run = [ c for c in all_cases if not DoSkip(c) ]
+ if len(cases_to_run) == 0:
print "No tests to run."
return 0
else:
try:
start = time.time()
- if RunTestCases(all_cases, options.progress, options.j):
+ if RunTestCases(cases_to_run, options.progress, options.j):
result = 0
else:
result = 1
@@ -1355,7 +1355,7 @@
# test output.
print
sys.stderr.write("--- Total time: %s ---\n" % FormatTime(duration))
- timed_tests = [ t.case for t in all_cases if not t.case.duration is
None ]
+ timed_tests = [ t.case for t in cases_to_run if not t.case.duration is
None ]
timed_tests.sort(lambda a, b: a.CompareTime(b))
index = 1
for entry in timed_tests[:20]:
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev