summaryrefslogtreecommitdiffstats
path: root/dovetail/run.py
diff options
context:
space:
mode:
authorzshi <zshi@redhat.com>2016-11-03 16:46:19 +0800
committerzshi <zshi@redhat.com>2016-11-08 10:05:38 +0800
commit53fcd0928b67a57ed1025dd4cad3df50ea020642 (patch)
tree68fd1eba71f5237629bb50c7880bab36180ae627 /dovetail/run.py
parent976d8e0640e478c79002f402bbe9996955c02629 (diff)
dovetail tool: ensure sub_testcase_list and testcase are not None
JIRA: DOVETAIL-52 1) save return value of testcase.sub_testcase() in sub_testcase_list for multiple calls later 2) ensure sub_testcase_list is not called with None value 3) ensure testcase is not called with None value 4) identify None testcase with 'Undefined' in dovetail_report.txt Change-Id: Ifcf0c0846dc788575310f29932a4757752f1e3a3 Signed-off-by: zshi <zshi@redhat.com>
Diffstat (limited to 'dovetail/run.py')
-rwxr-xr-xdovetail/run.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/dovetail/run.py b/dovetail/run.py
index 39dec07c..310ef2aa 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -37,6 +37,10 @@ def run_test(scenario):
for testcase_name in scenario['testcase_list']:
logger.info('>>[testcase]: %s' % (testcase_name))
testcase = Testcase.get(testcase_name)
+ if testcase is None:
+ logger.error('testcase %s is not defined in testcase folder, \
+ skipping' % (testcase_name))
+ continue
run_testcase = True
if testcase.exceed_max_retry_times():