diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-08-15 14:37:58 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-15 20:02:20 +0000 |
commit | 0da39e6b62fe7dc0f40d5242325b3b2d5b2c9d96 (patch) | |
tree | d7d63a35b983e3c3b8a865c0fc97c9d762e74649 /testing/tools/safetynet_measure.py | |
parent | 5f7b8f4038d16d224cb070f08112aba5331bd094 (diff) | |
download | pdfium-0da39e6b62fe7dc0f40d5242325b3b2d5b2c9d96.tar.xz |
Make errors in called processes more evident and easier to debug.
Also trying to get unicode filenames right again.
Change-Id: I501c94921b92b8a8cd6a10441aff1595fc6d878e
Reviewed-on: https://pdfium-review.googlesource.com/10630
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'testing/tools/safetynet_measure.py')
-rwxr-xr-x | testing/tools/safetynet_measure.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/testing/tools/safetynet_measure.py b/testing/tools/safetynet_measure.py index 67c07349e3..7b5bd5fe9d 100755 --- a/testing/tools/safetynet_measure.py +++ b/testing/tools/safetynet_measure.py @@ -14,6 +14,8 @@ import re import subprocess import sys +from common import PrintErr + CALLGRIND_PROFILER = 'callgrind' PERFSTAT_PROFILER = 'perfstat' @@ -30,12 +32,13 @@ class PerformanceRun(object): def _CheckTools(self): """Returns whether the tool file paths are sane.""" if not os.path.exists(self.pdfium_test_path): - print "FAILURE: Can't find test executable '%s'" % self.pdfium_test_path - print 'Use --build-dir to specify its location.' + PrintErr("FAILURE: Can't find test executable '%s'" + % self.pdfium_test_path) + PrintErr('Use --build-dir to specify its location.') return False if not os.access(self.pdfium_test_path, os.X_OK): - print ("FAILURE: Test executable '%s' lacks execution permissions" - % self.pdfium_test_path) + PrintErr("FAILURE: Test executable '%s' lacks execution permissions" + % self.pdfium_test_path) return False return True @@ -53,7 +56,7 @@ class PerformanceRun(object): elif self.args.profiler == PERFSTAT_PROFILER: time = self._RunPerfStat() else: - print 'profiler=%s not supported, aborting' % self.args.profiler + PrintErr('profiler=%s not supported, aborting' % self.args.profiler) return 1 if time is None: @@ -142,7 +145,7 @@ def main(): args = parser.parse_args() if args.interesting_section and args.profiler != CALLGRIND_PROFILER: - print '--interesting-section requires profiler to be callgrind.' + PrintErr('--interesting-section requires profiler to be callgrind.') return 1 run = PerformanceRun(args) |