diff options
author | Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com> | 2018-03-09 10:00:50 +0100 |
---|---|---|
committer | Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com> | 2018-03-09 10:01:30 +0100 |
commit | 6a8c7ac31bbf7c93ce971c216528fb609641b0d9 (patch) | |
tree | a2bb155d649db8dca462c66c5cfb069c71570b14 | |
parent | 019af2d00aab4bc36c5e713e04c5957f92684106 (diff) |
workaround for bgpvpn tempest run
Adding tempest.conf file in the /etc/tempest directory as it is needed
for tempest run command.
Change-Id: I754dca76908014dcbb17e82a2e7b561d4826bff0
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
-rw-r--r-- | sdnvpn/test/functest/run_tempest.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sdnvpn/test/functest/run_tempest.py b/sdnvpn/test/functest/run_tempest.py index 5d124b9..2661507 100644 --- a/sdnvpn/test/functest/run_tempest.py +++ b/sdnvpn/test/functest/run_tempest.py @@ -56,6 +56,13 @@ def main(): "cd -;".format(verifier_repo_dir, bgpvpn_tempest_list)) logger.info("Generating bgpvpn tempest list: %s" % cmd) os.popen(cmd) + # TODO: Though --config-file parameter is set during the tempest run, + # it looks for tempest.conf at /etc/tempest/ directory. so applying + # the following workaround. Will remove it when the root cause is found. + cmd = ("mkdir /etc/tempest;" + "cp {0} /etc/tempest/tempest.conf".format(bgpvpn_tempest_conf)) + logger.info("Configuring default tempest conf file") + os.popen(cmd) cmd_line = ("tempest run --config-file {0} -t --whitelist-file {1}" .format(bgpvpn_tempest_conf, bgpvpn_tempest_list)) @@ -80,7 +87,7 @@ def main(): m = re.search('Ran:(.*)tests', output) num_tests = m.group(1) # Look for tests failed - m = re.search('Failed:(.*)', output) + m = re.search('- Failed:(.*)', output) failed = m.group(1) # Look for name of the tests testcases = re.findall("\{0\} (.*)", output) @@ -94,8 +101,8 @@ def main(): status = "FAIL" return {"status": status, "details": results} - except: - logger.error("Problem when parsing the results.") + except Exception as e: + logger.error("Problem when parsing the results: %s", e) if __name__ == '__main__': |