From 5effc7131aa084ee8c3542e7a5b133300be6b43d Mon Sep 17 00:00:00 2001 From: machenbach Date: Thu, 28 May 2015 06:06:35 -0700 Subject: [PATCH] [test] Fix assert for predictable mode in test runner. NOTRY=true Review URL: https://codereview.chromium.org/1156663009 Cr-Commit-Position: refs/heads/master@{#28679} --- tools/testrunner/local/execution.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/testrunner/local/execution.py b/tools/testrunner/local/execution.py index e13393b..2b2f876 100644 --- a/tools/testrunner/local/execution.py +++ b/tools/testrunner/local/execution.py @@ -255,8 +255,13 @@ class Runner(object): if queued_exception: raise queued_exception - # Make sure that any allocations were printed in predictable mode. - assert not self.context.predictable or self.printed_allocations + # Make sure that any allocations were printed in predictable mode (if we + # ran any tests). + assert ( + not self.total or + not self.context.predictable or + self.printed_allocations + ) def _VerbosePrint(self, text): if self.context.verbose: -- 2.7.4