Commit ac319178 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Always pre-sort test cases marked as slow.

On bots we don't sort due to not being able to store the duration DB. But we should still run the tests marked as slow first.

BUG=v8:5861

Change-Id: Ifa812b3eef15f48e3d3c752c14c3f546b5dd87d1
Reviewed-on: https://chromium-review.googlesource.com/439284Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43057}
parent 7a634798
......@@ -197,12 +197,17 @@ class Runner(object):
self.perf_failures = False
self.printed_allocations = False
self.tests = [ t for s in suites for t in s.tests ]
# Always pre-sort by status file, slowest tests first.
slow_key = lambda t: statusfile.IsSlow(t.outcomes)
self.tests.sort(key=slow_key, reverse=True)
# Sort by stored duration of not opted out.
if not context.no_sorting:
for t in self.tests:
t.duration = self.perfdata.FetchPerfData(t) or 1.0
slow_key = lambda t: statusfile.IsSlow(t.outcomes)
self.tests.sort(key=slow_key, reverse=True)
self.tests.sort(key=lambda t: t.duration, reverse=True)
self._CommonInit(suites, progress_indicator, context)
def _CommonInit(self, suites, progress_indicator, context):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment