diff options
Diffstat (limited to 'testing/tools')
-rwxr-xr-x | testing/tools/safetynet_compare.py | 2 | ||||
-rw-r--r-- | testing/tools/safetynet_image.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/testing/tools/safetynet_compare.py b/testing/tools/safetynet_compare.py index 3c5cff86be..966910967e 100755 --- a/testing/tools/safetynet_compare.py +++ b/testing/tools/safetynet_compare.py @@ -116,7 +116,7 @@ class CompareRun(object): ('before', 'after'), self.args.num_workers, self.args.png_threshold) - image_comparison.Run() + image_comparison.Run(open_in_browser=not self.args.machine_readable) return 0 diff --git a/testing/tools/safetynet_image.py b/testing/tools/safetynet_image.py index 28df3c582a..319eeb96be 100644 --- a/testing/tools/safetynet_image.py +++ b/testing/tools/safetynet_image.py @@ -52,7 +52,7 @@ class ImageComparison(object): self.num_workers = num_workers self.threshold = threshold_fraction * 100 - def Run(self): + def Run(self, open_in_browser): """Runs the comparison and generates an HTML with the results. Returns: @@ -94,7 +94,9 @@ class ImageComparison(object): f.write('</table>') f.write('</body></html>') - webbrowser.open(html_path) + if open_in_browser: + webbrowser.open(html_path) + return 0 def _GenerateDiffs(self): |