summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Yu <Gabriel.yuyang@huawei.com>2018-03-14 21:22:06 +0800
committerYu Yang (Gabriel) <Gabriel.yuyang@huawei.com>2018-03-15 08:11:39 +0000
commite8796c31a6cd66da49082f0535dd4fbee9aaebb3 (patch)
tree9aeb833f67198b97b1068818c43676faabeb90a8
parent9efc27665e10b4a36153291e171efdd8bf10c11b (diff)
support hosts file copy
JIRA: BOTTLENECK-227 Dovetail needs to regulate the hosts file of each docker to adapt SUTs. This patch is to make hosts file consistant in Bottlenecks-Yarstick docker. Change-Id: I93a57a5cac9c8d8c0a8b6660e84b8b351c455786 Signed-off-by: Yang Yu <Gabriel.yuyang@huawei.com> (cherry picked from commit b8b65fbc102f632a1c83cd3fc67dc2b921902a8a)
-rw-r--r--testsuites/run_testsuite.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuites/run_testsuite.py b/testsuites/run_testsuite.py
index e0f46248..70e6d8c9 100644
--- a/testsuites/run_testsuite.py
+++ b/testsuites/run_testsuite.py
@@ -36,6 +36,14 @@ LOG = log.Logger(__name__).getLogger()
# ------------------------------------------------------
+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')
+ LOG.info("Done with copying hosts file to Bottlenecks-Yardstick")
+
+
def posca_testcase_run(testsuite, testcase_script, test_config):
module_string = "testsuites.%s.testcase_script.%s" % (testsuite,
@@ -132,6 +140,7 @@ 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)