summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Yu <Gabriel.yuyang@huawei.com>2018-03-16 11:18:17 +0800
committerYu Yang (Gabriel) <Gabriel.yuyang@huawei.com>2018-03-16 06:58:28 +0000
commit0cd98516d581bc661772473be92f7e4d5a26036d (patch)
treed927bdd628235047b87c330206c58669b3de38b9
parente8796c31a6cd66da49082f0535dd4fbee9aaebb3 (diff)
bugfix: copy hosts filestable/euphrates
JIRA: BOTTLENECK-227 Operation of copying hosts file should follow the building of Yardstick docker Change-Id: I4d66efe8b823876a733d1877c26d1e0e263ca4da Signed-off-by: Yang Yu <Gabriel.yuyang@huawei.com> (cherry picked from commit 7b61cfd2e0c7bed6004f82d11b4cdc37a2e12cad)
-rw-r--r--testsuites/run_testsuite.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/testsuites/run_testsuite.py b/testsuites/run_testsuite.py
index 70e6d8c..0f03d3e 100644
--- a/testsuites/run_testsuite.py
+++ b/testsuites/run_testsuite.py
@@ -40,7 +40,8 @@ def copy_hosts_file():
LOG.info("Begin copying hosts file to Bottlenecks-Yardstick")
os.system('cp /etc/hosts /tmp/hosts')
yardstick_docker = docker_env.docker_find('Bottlenecks-Yardstick')
- docker_env.docker_exec_cmd(yardstick_docker, 'sudo cp -f /tmp/hosts /etc/hosts')
+ cp_cmd = 'sudo cp -f /tmp/hosts /etc/hosts'
+ docker_env.docker_exec_cmd(yardstick_docker, cp_cmd)
LOG.info("Done with copying hosts file to Bottlenecks-Yardstick")
@@ -115,6 +116,7 @@ def testsuite_run(test_level, test_name, REPORT="False"):
conf_parser.Parser.testcase_out_dir(testcase)
start_date = datetime.datetime.now()
docker_env_prepare(config[testcase])
+ copy_hosts_file()
#try:
# posca_testcase_run(tester_parser[0], testcase, config[testcase])
#except Exception, e:
@@ -140,7 +142,6 @@ def main():
test_level = sys.argv[1]
test_name = sys.argv[2]
REPORT = sys.argv[3]
- copy_hosts_file()
testsuite_run(test_level, test_name, REPORT)