Skip to content

Commit 4d6ff72

Browse files
committed
pass feature test
Signed-off-by: Ni, Wenhui <[email protected]>
1 parent 61e86bd commit 4d6ff72

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

run_test.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(self, case_name, command_file = "", command_text = "", log_file = "
7474
self.result_file = result_file
7575
self.result_text = result_text
7676
self.print_text = print_text
77-
self.test_status = "BADTEST"
77+
self.test_status = "SKIPPED"
7878
self.out_root = ""
7979
self.run_flag = False
8080

@@ -299,12 +299,14 @@ def test_single_case(current_test, single_case_config, workspace, suite_root_pa
299299
if single_case_config.platform_rule_list and not is_platform_supported(single_case_config.platform_rule_list):
300300
single_case_text.result_text += current_test + " Skip " + "\n"
301301
# 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
303304

304305
if single_case_config.option_rule_list and not is_option_supported(single_case_config.option_rule_list):
305306
single_case_text.result_text += current_test + " Skip " + "\n"
306307
# 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
308310

309311
case_workspace = os.path.join(workspace, current_test)
310312
if not os.path.exists(case_workspace):
@@ -345,7 +347,7 @@ def record_msg_case(single_case_text):
345347
# print(single_case_text.result_file)
346348
# print(single_case_text.result_text)
347349
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":
349351
return
350352
# print(single_case_text.command_file)
351353
# print(single_case_text.command_text)
@@ -381,17 +383,16 @@ def test_suite(suite_root_path, suite_name, opt):
381383
suite_root_path,))
382384
# store all msg
383385
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+
388387
for result_iter in results:
389388
ret = result_iter[0].get()
390389
record_msg_case(ret)
391390
if not ret.run_flag:
392391
# TODO we can add auto rerun
393392
failed_cases.append(ret.name + " " + ret.test_status)
394393
suite_result = ret.run_flag & suite_result
394+
pool.close()
395+
pool.join()
395396

396397
if failed_cases:
397398
print("===============Failed case(s) ==========================")

0 commit comments

Comments
 (0)