@@ -204,8 +204,6 @@ def run_migrated_binary_test(test_driver_module, specific_module, single_case_te
204
204
205
205
# Execute the test driver to do the validation.
206
206
def run_test_driver (module , single_case_text ):
207
- # with open(test_config.command_file, "a+") as f:
208
- # f.write("================= " + single_case_text.name + " ==================\n")
209
207
single_case_text .command_text += "================= " + single_case_text .name + " ==================\n "
210
208
211
209
case_workspace = single_case_text .case_workspace
@@ -300,13 +298,11 @@ def test_single_case(current_test, single_case_config, workspace, suite_root_pa
300
298
module = import_test_driver (suite_root_path )
301
299
if single_case_config .platform_rule_list and not is_platform_supported (single_case_config .platform_rule_list ):
302
300
single_case_text .result_text += current_test + " Skip " + "\n "
303
- # append_msg_to_file(test_config.result_text, current_test + " Skip " + "\n")
304
301
single_case_text .run_flag = True
305
302
return single_case_text
306
303
307
304
if single_case_config .option_rule_list and not is_option_supported (single_case_config .option_rule_list ):
308
305
single_case_text .result_text += current_test + " Skip " + "\n "
309
- # append_msg_to_file(test_config.result_text, current_test + " Skip " + "\n")
310
306
single_case_text .run_flag = True
311
307
return single_case_text
312
308
@@ -346,22 +342,15 @@ def get_gpu_split_test_suite(suite_cfg):
346
342
return new_test_config_map
347
343
348
344
def record_msg_case (single_case_text ):
349
- # print(single_case_text.result_file)
350
- # print(single_case_text.result_text)
351
345
append_msg_to_file (single_case_text .result_file , single_case_text .result_text )
352
346
if single_case_text .test_status == "BADTEST" or single_case_text .test_status == "SKIPPED" :
353
347
return
354
- # print(single_case_text.command_file)
355
- # print(single_case_text.command_text)
356
348
append_msg_to_file (single_case_text .command_file , single_case_text .command_text )
357
- # print(single_case_text.log_file)
358
- # print(single_case_text.log_text)
359
349
append_msg_to_file (single_case_text .log_file , single_case_text .log_text )
360
350
return
361
351
362
352
def test_suite (suite_root_path , suite_name , opt ):
363
353
test_ws_root = os .path .join (os .path .dirname (suite_root_path ), "test_workspace" )
364
- # module means the test driver for a test suite.
365
354
test_config .suite_cfg = parse_suite_cfg (suite_name , suite_root_path )
366
355
test_workspace = prepare_test_workspace (test_ws_root , suite_name , opt )
367
356
suite_result = True
@@ -373,14 +362,6 @@ def test_suite(suite_root_path, suite_name, opt):
373
362
results = []
374
363
375
364
for current_test , single_case_config in test_config .suite_cfg .test_config_map .items ():
376
- # print(os.path.join(test_workspace, "command.tst"))
377
- # print(os.path.join(test_workspace, "result.md"))
378
- # single_case_text = case_text(current_test, os.path.join(test_workspace, "command.tst"),"",
379
- # os.path.join(test_workspace, current_test, current_test + ".lf"), "",
380
- # os.path.join(test_workspace, "result.md"), "", "")
381
- # print(single_case_text.command_file)
382
- # print(single_case_text.result_file)
383
- # sys.exit(0)
384
365
result = pool .apply_async (test_single_case , (current_test , single_case_config , test_workspace ,
385
366
suite_root_path ,))
386
367
# store all msg
@@ -412,18 +393,7 @@ def test_single_case_in_suite(suite_root_path, suite_name, case, option):
412
393
if case not in suite_cfg .test_config_map .keys ():
413
394
exit ("The test case " + case + " is not in the " + suite_name + " test suite! Please double check." )
414
395
single_case_config = suite_cfg .test_config_map [case ]
415
- # create single_case_text to store result msg
416
396
single_case_text = test_single_case (case , single_case_config , test_workspace , suite_root_path )
417
- # print(single_case_text.name)
418
- # print(single_case_text.command_file)
419
- # print(single_case_text.print_text)
420
- # print(single_case_text.log_file)
421
- # print(single_case_text.log_text)
422
- # print(single_case_text.result_file)
423
- # print(single_case_text.result_text)
424
- # print(single_case_text.print_text)
425
- # print(single_case_text.test_status)
426
- # print(single_case_text.out_root)
427
397
record_msg_case (single_case_text )
428
398
return single_case_text .run_flag
429
399
@@ -459,16 +429,6 @@ def import_test_driver(suite_folder):
459
429
test_config .test_driver = str (test_driver .get ("driverID" ))
460
430
return importlib .import_module (test_config .test_driver )
461
431
462
- # def clean_global_setting():
463
- # single_case_text.name = ""
464
- # test_config.command_file = "" # Used to store the executed command.
465
- # test_config.log_file = "" # Used to store the executed log for each case.
466
- # test_config.result_text = "" # Used to store the executed status for each case.
467
- # single_case_text.out_root = ""
468
- # test_config.subprocess_stdout_log = ""
469
- # test_config.test_status = "" # Default: "SKIPPED"
470
- # test_config.test_driver = ""
471
-
472
432
# Parse the test suite configuration file and get the supported suite list.
473
433
def get_suite_list ():
474
434
xml_file = test_config .suite_list_file
@@ -506,7 +466,6 @@ def test_suite_with_opts(suite_root_path, suite_name, opts):
506
466
def test_full_suite_list (suite_list ):
507
467
ret = True
508
468
for suite_name in suite_list :
509
- # clean_global_setting()
510
469
os .chdir (test_config .root_path )
511
470
suite_root_path = suite_list [suite_name ][0 ]
512
471
if os .path .exists (suite_root_path ):
0 commit comments