summaryrefslogtreecommitdiff
path: root/automated
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-04-06 11:01:58 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-04-06 15:06:58 +0000
commit204b5421a14e077dd5358bbe408709160b131b2e (patch)
treeec9d8a5b1a52cdec94187703bff4e30fce9a992f /automated
parentb7608f5602e39d4f1de6703bdf39d74973430392 (diff)
test-runner: set test case relative path for remoet exec only
'tc_relative_dir' is used for partial file copy to target. It splits realpath to yaml file by test kind parameter and assumes tests are from 'automated' or 'manual' folder. Local exec copy the whole repo. It doesn't have the above assumption. Moving the 'tc_relative_dir' related lines to remote exec only. Change-Id: I95415fa93a94ddf654681ada704e4b2a5c12f061 Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated')
-rwxr-xr-xautomated/utils/test-runner.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py
index 6bea92b..13087e0 100755
--- a/automated/utils/test-runner.py
+++ b/automated/utils/test-runner.py
@@ -632,12 +632,12 @@ def main():
if args.target is not None and '-o' not in sys.argv:
test['output'] = os.path.join(test['output'], args.target)
test['test_path'] = os.path.join(test['output'], test['test_uuid'])
- # Get relative directory path of yaml file for file copy.
- # '-d' takes any relative paths to the yaml file, so get the realpath first.
- tc_realpath = os.path.realpath(test['path'])
- tc_dirname = os.path.dirname(tc_realpath)
- test['tc_relative_dir'] = '%s%s' % (args.kind, tc_dirname.split(args.kind)[1])
if args.target is not None:
+ # Get relative directory path of yaml file for partial file copy.
+ # '-d' takes any relative paths to the yaml file, so get the realpath first.
+ tc_realpath = os.path.realpath(test['path'])
+ tc_dirname = os.path.dirname(tc_realpath)
+ test['tc_relative_dir'] = '%s%s' % (args.kind, tc_dirname.split(args.kind)[1])
target_user_home_cmd = '%s "echo $HOME"' % args.target
target_user_home = call_ssh(target_user_home_cmd)
test['target_test_path'] = '%s/output/%s' % (target_user_home, test['test_uuid'])