diff options
Diffstat (limited to 'chromium/testing/scripts/common.py')
-rw-r--r-- | chromium/testing/scripts/common.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chromium/testing/scripts/common.py b/chromium/testing/scripts/common.py index 5cba136cb51..ee49a892692 100644 --- a/chromium/testing/scripts/common.py +++ b/chromium/testing/scripts/common.py @@ -22,6 +22,10 @@ SRC_DIR = os.path.abspath( MAX_FAILURES_EXIT_STATUS = 101 +# Exit code to indicate infrastructure issue. +INFRA_FAILURE_EXIT_CODE = 87 + + def run_script(argv, funcs): def parse_json(path): with open(path) as f: @@ -59,9 +63,9 @@ def run_script(argv, funcs): return args.func(args) -def run_command(argv, env=None): - print 'Running %r' % argv - rc = subprocess.call(argv, env=env) +def run_command(argv, env=None, cwd=None): + print 'Running %r in %r (env: %r)' % (argv, cwd, env) + rc = subprocess.call(argv, env=env, cwd=cwd) print 'Command %r returned exit code %d' % (argv, rc) return rc |