summaryrefslogtreecommitdiffstats
path: root/plugins/agl_test_log.py
diff options
context:
space:
mode:
authorQiu Tingting <qiutt@fujitsu.com>2022-05-26 13:06:34 +0800
committerQiu Tingting <qiutt@fujitsu.com>2022-05-26 13:06:34 +0800
commitcb256cee0fe43430b461dcee392267dc65514e41 (patch)
treee8182b2c548f60cab6c4d614e92d67ad318a7c74 /plugins/agl_test_log.py
parentbd0eb0ec729a228a317d2966e0f71770ca4dd36f (diff)
agl-test-framework: add AGLBaseTest class
Add AGLBaseTest class for existing test suites which has own test scripts. It package the default operations, like as log processing and file saving. In test suite, please create a child class based onAGLBaseTest. Then it is easy to init, run tests, check results and make a repoter. Bug-AGL: SPEC-4345 Signed-off-by: Qiu Tingting <qiutt@fujitsu.com> Change-Id: I9dbc01db59df16eb5718b19b3223ad95da0afb11
Diffstat (limited to 'plugins/agl_test_log.py')
-rw-r--r--plugins/agl_test_log.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/agl_test_log.py b/plugins/agl_test_log.py
index f7a0721..e064047 100644
--- a/plugins/agl_test_log.py
+++ b/plugins/agl_test_log.py
@@ -24,6 +24,25 @@ def log_process_default(log):
return test_cases_values_and_status
'''
+Process the log and init test_cases_values_and_status.
+
+log : the path of default log
+
+default log formate :
+ -> case_name: TEST-PASS
+ -> case_name: TEST-FAIL
+ -> case_name: TEST-SKIP
+'''
+def log_process(log):
+ pattern = '^ -> (.+?): (.+?)$'
+ parse_result = log_parse(log, pattern)
+ case_list = dict()
+ if parse_result:
+ for item in parse_result:
+ case_list[item[0]] = [item[0], item[1], ""]
+ return case_list
+
+'''
Process the log create by gnome_desktop_testing
and init test_cases_values_and_status.