aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-06-26 03:23:40 +0000
committerLinda Wang <wangwulin@huawei.com>2017-06-28 09:06:13 +0000
commitff72c32921ce373451740d3474d40951780e7a30 (patch)
tree588406565145c6afe4d02f21b225b0953d035636 /functest/opnfv_tests/openstack
parentb35ef0cc9ba337bd46a2eb9d8d52854c80bb484a (diff)
Fix refstack_defcore
As refstack-client is reinstalled only by the shell setup_env, the path of .venv and .tempest have been changed. Change-Id: Id50d0c6384295c2448705961942104abbd799b9b Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rwxr-xr-xfunctest/opnfv_tests/openstack/refstack_client/refstack_client.py25
1 files changed, 5 insertions, 20 deletions
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index 30d1cf08..c4618894 100755
--- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
+++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
# matthew.lijun@huawei.com wangwulin@huawei.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -45,31 +45,18 @@ class RefstackClient(testcase.OSGCTestCase):
self.defcorelist = pkg_resources.resource_filename(
'functest', 'opnfv_tests/openstack/refstack_client/defcore.txt')
- def source_venv(self):
-
- cmd = ("cd {0};"
- ". .venv/bin/activate;"
- "cd -;".format(CONST.__getattribute__('dir_refstack_client')))
- ft_utils.execute_command(cmd)
-
def run_defcore(self, conf, testlist):
logger.debug("Generating test case list...")
- cmd = ("cd {0};"
- "./refstack-client test -c {1} -v --test-list {2};"
- "cd -;".format(CONST.__getattribute__('dir_refstack_client'),
- conf,
- testlist))
+ cmd = ("refstack-client test -c {0} -v --test-list {1}"
+ .format(conf, testlist))
ft_utils.execute_command(cmd)
def run_defcore_default(self):
logger.debug("Generating test case list...")
- cmd = ("cd {0};"
- "./refstack-client test -c {1} -v --test-list {2};"
- "cd -;".format(CONST.__getattribute__('dir_refstack_client'),
- self.confpath,
- self.defcorelist))
+ cmd = ("refstack-client test -c {0} -v --test-list {1}"
+ .format(self.confpath, self.defcorelist))
logger.info("Starting Refstack_defcore test case: '%s'." % cmd)
header = ("Refstack environment:\n"
@@ -159,7 +146,6 @@ class RefstackClient(testcase.OSGCTestCase):
try:
tempestconf = TempestConf()
tempestconf.generate_tempestconf()
- self.source_venv()
self.run_defcore_default()
self.parse_refstack_result()
res = testcase.TestCase.EX_OK
@@ -192,7 +178,6 @@ class RefstackClient(testcase.OSGCTestCase):
"%s", e)
return self.EX_RUN_ERROR
try:
- self.source_venv()
self._prep_test()
self.run_defcore(self.confpath, self.testlist)
res = testcase.TestCase.EX_OK