@@ -74,7 +74,7 @@ def __init__(self, case_name, command_file = "", command_text = "", log_file = "
74
74
self .result_file = result_file
75
75
self .result_text = result_text
76
76
self .print_text = print_text
77
- self .test_status = "BADTEST "
77
+ self .test_status = "SKIPPED "
78
78
self .out_root = ""
79
79
self .run_flag = False
80
80
@@ -299,12 +299,14 @@ def test_single_case(current_test, single_case_config, workspace, suite_root_pa
299
299
if single_case_config .platform_rule_list and not is_platform_supported (single_case_config .platform_rule_list ):
300
300
single_case_text .result_text += current_test + " Skip " + "\n "
301
301
# append_msg_to_file(test_config.result_text, current_test + " Skip " + "\n")
302
- return True
302
+ single_case_text .run_flag = True
303
+ return single_case_text
303
304
304
305
if single_case_config .option_rule_list and not is_option_supported (single_case_config .option_rule_list ):
305
306
single_case_text .result_text += current_test + " Skip " + "\n "
306
307
# append_msg_to_file(test_config.result_text, current_test + " Skip " + "\n")
307
- return True
308
+ single_case_text .run_flag = True
309
+ return single_case_text
308
310
309
311
case_workspace = os .path .join (workspace , current_test )
310
312
if not os .path .exists (case_workspace ):
@@ -345,7 +347,7 @@ def record_msg_case(single_case_text):
345
347
# print(single_case_text.result_file)
346
348
# print(single_case_text.result_text)
347
349
append_msg_to_file (single_case_text .result_file , single_case_text .result_text )
348
- if single_case_text .test_status is "BADTEST" :
350
+ if single_case_text .test_status == "BADTEST" or single_case_text . test_status == "SKIPPED " :
349
351
return
350
352
# print(single_case_text.command_file)
351
353
# print(single_case_text.command_text)
@@ -381,17 +383,16 @@ def test_suite(suite_root_path, suite_name, opt):
381
383
suite_root_path ,))
382
384
# store all msg
383
385
results .append ([result , current_test , single_case_config , test_workspace , suite_root_path ])
384
-
385
- # close process pool and wait all work being flinish
386
- pool .close ()
387
- pool .join ()
386
+
388
387
for result_iter in results :
389
388
ret = result_iter [0 ].get ()
390
389
record_msg_case (ret )
391
390
if not ret .run_flag :
392
391
# TODO we can add auto rerun
393
392
failed_cases .append (ret .name + " " + ret .test_status )
394
393
suite_result = ret .run_flag & suite_result
394
+ pool .close ()
395
+ pool .join ()
395
396
396
397
if failed_cases :
397
398
print ("===============Failed case(s) ==========================" )
0 commit comments