run_skylab_suite: allow an env var to specify SKYLAB_TOOL location
This improves the testability of run_suite_skylab.
CQ-DEPEND=CL:1531313
BUG=chromium:940661
TEST=./bin/run_suite_skylab in non-dryrun mode
Change-Id: I788ac4eee3be22f4ad3397dc90205c4156ff1d7b
Reviewed-on: https://chromium-review.googlesource.com/1531316
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/venv/skylab_suite/suite_runner.py b/venv/skylab_suite/suite_runner.py
index ee88056..c5325e6 100644
--- a/venv/skylab_suite/suite_runner.py
+++ b/venv/skylab_suite/suite_runner.py
@@ -163,9 +163,10 @@
@return the swarming task id of this task.
"""
logging.info('Creating task for test %s', test_spec.test.name)
+ skylab_tool_path = os.environ.get('SKYLAB_TOOL', SKYLAB_TOOL)
cmd = [
- SKYLAB_TOOL, 'create-test',
+ skylab_tool_path, 'create-test',
'-board', test_spec.board,
'-image', test_spec.build,
]