summaryrefslogtreecommitdiff
path: root/testing/tools/test_runner.py
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-01-30 19:48:54 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-01-31 17:44:30 +0000
commit00d4064e5414fc0845e354b50c7f1a8323449268 (patch)
treecd1016cf5ce85dda2028f93531f298259b5e94a8 /testing/tools/test_runner.py
parent576e8151efab01166142ec697b66ce38b7bf6780 (diff)
downloadpdfium-00d4064e5414fc0845e354b50c7f1a8323449268.tar.xz
Fixup test harness
When the results of the test runner were converted to return a tuple the following code which checked the results for true/false were not updated to extract the success value from the tuple. This caused the code to think that the results always passed even when they failed. This CL fixes the two tests which were broken (both just minor image result differences) which slipped in during this breakage. Change-Id: I01b56dd7b05013c2c12c83543746cf59b145e561 Reviewed-on: https://pdfium-review.googlesource.com/2456 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/tools/test_runner.py')
-rw-r--r--testing/tools/test_runner.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/testing/tools/test_runner.py b/testing/tools/test_runner.py
index 3a31709be4..7a64e0ddc3 100644
--- a/testing/tools/test_runner.py
+++ b/testing/tools/test_runner.py
@@ -125,8 +125,8 @@ class TestRunner:
return common.RunCommandExtractHashedFiles(cmd_to_run)
def HandleResult(self, input_filename, input_path, result):
+ success, image_paths = result
if self.gold_results:
- success, image_paths = result
if image_paths:
for img_path, md5_hash in image_paths:
# the output filename (without extension becomes the test name)
@@ -134,10 +134,10 @@ class TestRunner:
self.gold_results.AddTestResult(test_name, md5_hash, img_path)
if self.test_suppressor.IsResultSuppressed(input_filename):
- if result:
+ if success:
self.surprises.append(input_path)
else:
- if not result:
+ if not success:
self.failures.append(input_path)
@@ -271,6 +271,7 @@ class TestRunner:
print '\n\nSummary of Failures:'
for failure in self.failures:
print failure
- if not options.ignore_errors:
- return 1
+
+ if not options.ignore_errors:
+ return 1
return 0