diff options
Diffstat (limited to 'automated/utils/test-runner.py')
-rwxr-xr-x | automated/utils/test-runner.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py index e5132d3..c374c26 100755 --- a/automated/utils/test-runner.py +++ b/automated/utils/test-runner.py @@ -201,10 +201,11 @@ class TestDefinition(object): f.write('export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin\n') steps = self.testdef['run'].get('steps', []) if steps: - for cmd in steps: - if '--cmd' in cmd or '--shell' in cmd: - cmd = re.sub(r'\$(\d+)\b', r'\\$\1', cmd) - f.write('%s\n' % cmd) + for step in steps: + command = step + if '--cmd' in step or '--shell' in step: + command = re.sub(r'\$(\d+)\b', r'\\$\1', step) + f.write('%s\n' % command) f.write('echo "<ENDRUN $TESTRUN_ID $UUID>"\n') os.chmod('%s/run.sh' % self.test['test_path'], 0o755) |