aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-02-02 09:19:03 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2017-02-02 09:21:13 +0100
commit93a1ae5974a398adec18ed5580f3d328f646ed02 (patch)
tree7dd834b6cb466b6ac981fc8ce215a5837d71cb88
parent56c3758fbb234d45c70cc5a36aafd8c5f4d02373 (diff)
Define how to pass args to TestcaseBase.run
Here is an exemple of functest/ci/testcases.yaml run: module: 'functest.opnfv_tests.sdn.odl.odl' class: 'ODLTests' args: suites: - /home/opnfv/repos/odl_test/csit/suites/integration/basic - /home/opnfv/repos/odl_test/csit/suites/openstack/neutron Change-Id: I37b0ffa18f626bd8bb52ed460ae38053bd12c8ee Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rwxr-xr-xfunctest/ci/run_tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py
index ef0800163..320102ddc 100755
--- a/functest/ci/run_tests.py
+++ b/functest/ci/run_tests.py
@@ -148,7 +148,11 @@ def run_test(test, tier_name, testcases=None):
module = importlib.import_module(run_dict['module'])
cls = getattr(module, run_dict['class'])
test_case = cls()
- result = test_case.run()
+ try:
+ kwargs = run_dict['args']
+ result = test_case.run(**kwargs)
+ except KeyError:
+ result = test_case.run()
if result == testcase_base.TestcaseBase.EX_OK:
if GlobalVariables.REPORT_FLAG:
test_case.publish_report()