summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-09-14 18:42:24 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-09-14 18:42:24 +0000
commit18fdc04e02f4993259529a16edb30783760e59b0 (patch)
tree547489f1aeae9837b0e96772a8bcb1e6300c318f
parent1928ca2f26d9534378abac8619421ce3e4a032c2 (diff)
parentd1eed120e18ec456841a8df2f29e1711da0aa833 (diff)
Merge "Change dir when calling stestr"
-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: