aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-09-14 20:10:15 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-10-22 01:40:25 +0200
commit8717bb34ef6d4ed6c45c673bf7748e91f89c1f25 (patch)
tree787ad1b2d153922e7bbab184eeaa9b48e698b4ac
parent2bf5968dd1cdb976d961a2e8f7de3842970a9572 (diff)
Change dir when calling stestr
https://build.opnfv.org/ci/view/functest/job/functest-fuel-baremetal-daily-master/467/console Change-Id: Icaa773cf61397650e73a01b182a759dd64b11b95 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit d1eed120e18ec456841a8df2f29e1711da0aa833)
-rw-r--r--functest/opnfv_tests/openstack/refstack/refstack.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/refstack/refstack.py b/functest/opnfv_tests/openstack/refstack/refstack.py
index 22e09bc82..c709e5626 100644
--- a/functest/opnfv_tests/openstack/refstack/refstack.py
+++ b/functest/opnfv_tests/openstack/refstack/refstack.py
@@ -40,15 +40,18 @@ class Refstack(tempest.TempestCommon):
return yaml.load(yaml_data)
def _extract_tempest_data(self):
+ olddir = os.getcwd()
try:
- cmd = ['stestr', '--here', self.verifier_repo_dir, 'list',
- '^tempest.']
+ os.chdir(self.verifier_repo_dir)
+ cmd = ['stestr', 'list', '^tempest.']
output = subprocess.check_output(cmd)
except subprocess.CalledProcessError as cpe:
self.__logger.error(
"Exception when listing tempest tests: %s\n%s",
cpe.cmd, cpe.output)
raise
+ finally:
+ os.chdir(olddir)
yaml_data2 = ""
for line in output.splitlines():
try: