summaryrefslogtreecommitdiffstats
path: root/dovetail/testcase.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-04-06 03:31:30 +0000
committerxudan <xudan16@huawei.com>2017-04-12 08:29:26 +0000
commit4d98856b87edbf784b12b375b5d30ab9f401d525 (patch)
tree883335d3ab11c52b45cda97b021f7bed2993f544 /dovetail/testcase.py
parentac766b065a8032e4aa90dafef2130292364a2483 (diff)
dovetail tool: bugfix: test cases are erroneously judged
JIRA: DOVETAIL-375 JIRA: DOVETAIL-390 1. defcore test cases are erroneously judged because of: a) defcore results json data lack some keys b) some sub-testcases' names are the same as the prefix of another sub-testcases. 2. this patch removes the extra keys and judge sub-testcases accurately. 3. remove "store_type" in functest_config.yml and yardstick_config.yml. 4. change some log levels from info to debug. Change-Id: I5f126e70309409cac66ef9a0909f1573d325098b Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/testcase.py')
-rw-r--r--dovetail/testcase.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/dovetail/testcase.py b/dovetail/testcase.py
index 21d655ef..13a31fde 100644
--- a/dovetail/testcase.py
+++ b/dovetail/testcase.py
@@ -150,13 +150,14 @@ class Testcase(object):
def mk_src_file(self):
testcase_src_file = self.testcase['validate']['pre_copy']['src_file']
try:
- with open(os.path.join(dt_cfg.dovetail_config['result_dir'],
- testcase_src_file), 'w+') as src_file:
+ file_path = os.path.join(dt_cfg.dovetail_config['result_dir'],
+ testcase_src_file)
+ with open(file_path, 'w+') as src_file:
if self.sub_testcase() is not None:
for sub_test in self.sub_testcase():
- self.logger.info('save testcases %s', sub_test)
+ self.logger.debug('save testcases %s', sub_test)
src_file.write(sub_test + '\n')
- self.logger.info('save testcases to %s', src_file)
+ self.logger.debug('save testcases to %s', file_path)
except Exception:
self.logger.error('Failed to save: %s', src_file)