From d180eabc5a2c2453d04bb4a080874c329605c026 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Tue, 16 May 2017 11:28:14 +0200 Subject: Add enabled flag in testcases.yaml This will allow enable/disable test cases directly using true/false. Change-Id: Iaa7d051ebb8dd9e5a6f835a823f58f1e17a87b8d Signed-off-by: jose.lausuch --- functest/ci/run_tests.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'functest/ci/run_tests.py') diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index 493d5f9c..76760096 100755 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -40,6 +40,10 @@ class BlockingTestFailed(Exception): pass +class TestNotEnabled(Exception): + pass + + class RunTestsParser(object): def __init__(self): @@ -114,6 +118,9 @@ def get_run_dict(testname): def run_test(test, tier_name, testcases=None): + if not test.is_enabled(): + raise TestNotEnabled("The test case {} is not enabled" + .format(test.get_name())) test_name = test.get_name() logger.info("\n") # blank line print_separator("=") -- cgit 1.2.3-korg