diff options
author | dimitris.tsiolakis <dmts@intracom-telecom.com> | 2018-06-12 14:12:25 +0300 |
---|---|---|
committer | dimitris.tsiolakis <dmts@intracom-telecom.com> | 2018-06-13 14:47:28 +0300 |
commit | c8f970e5b5968952f9c1fea5c7c63bddb12a7b73 (patch) | |
tree | d78c958334dd3adba19b918751e3eee7e225914b /sdnvpn/test/functest/run_sdnvpn_tests.py | |
parent | 9d501e5cbc1c384f405c8238fd86785561b9e39e (diff) |
Fix so that testcases run in order.
A new key "order" was added in config.py file to prevent the
testcases executed in random order.
JIRA: SDNVPN-216
Change-Id: I4ee72cb98351e35bf50ecf9c6dd1506a59e34f6e
Signed-off-by: dimitris.tsiolakis <dmts@intracom-telecom.com>
Diffstat (limited to 'sdnvpn/test/functest/run_sdnvpn_tests.py')
-rw-r--r-- | sdnvpn/test/functest/run_sdnvpn_tests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sdnvpn/test/functest/run_sdnvpn_tests.py b/sdnvpn/test/functest/run_sdnvpn_tests.py index e4d55f1..23a62e6 100644 --- a/sdnvpn/test/functest/run_sdnvpn_tests.py +++ b/sdnvpn/test/functest/run_sdnvpn_tests.py @@ -15,6 +15,7 @@ import sys import traceback import yaml +from collections import OrderedDict from xtesting.core import feature from sdnvpn.lib import config as sdnvpn_config from sdnvpn.lib import openstack_utils as os_utils @@ -74,9 +75,11 @@ class SdnvpnFunctest(feature.Feature): config_yaml = yaml.safe_load(f) testcases = config_yaml.get("testcases") + testcases_ordered = OrderedDict(sorted(testcases.items(), + key=lambda x: x[1]['order'])) overall_status = "PASS" - for tc in testcases: - if testcases[tc]['enabled']: + for tc, test_sdnvpn in testcases_ordered.items(): + if test_sdnvpn['enabled']: test_name = tc test_descr = testcases[tc]['description'] title = ("Running '%s - %s'" % |