@@ -39,29 +39,33 @@ def main():
3939
4040 build_args = SystemtestArguments .from_args (args .build_args )
4141 run_directory = Path (args .rundir )
42- if args .suites :
43- test_suites_requested = args .suites .split (',' )
44- available_testsuites = TestSuites .from_yaml (
45- PRECICE_TESTS_DIR / "tests.yaml" , available_tutorials )
46- test_suites_to_execute = []
47- for test_suite_requested in test_suites_requested :
48- test_suite_found = available_testsuites .get_by_name (
49- test_suite_requested )
50- if not test_suite_found :
51- logging .error (f"Did not find the testsuite with name { test_suite_requested } " )
52- else :
53- test_suites_to_execute .append (test_suite_found )
54- if not test_suites_to_execute :
55- raise RuntimeError (
56- f"No matching test suites with names { test_suites_requested } found. Use print_test_suites.py to get an overview" )
57- # now convert the test_suites into systemtests
58- for test_suite in test_suites_to_execute :
59- tutorials = test_suite .cases_of_tutorial .keys ()
60- for tutorial in tutorials :
61- for case , reference_result in zip (
62- test_suite .cases_of_tutorial [tutorial ], test_suite .reference_results [tutorial ]):
63- systemtests_to_run .append (
64- Systemtest (tutorial , build_args , case , reference_result ))
42+ if args .suites :
43+ test_suites_requested = args .suites .split (',' )
44+ available_testsuites = TestSuites .from_yaml (
45+ PRECICE_TESTS_DIR / "tests.yaml" , available_tutorials )
46+ test_suites_to_execute = []
47+ for test_suite_requested in test_suites_requested :
48+ test_suite_found = available_testsuites .get_by_name (
49+ test_suite_requested )
50+ if not test_suite_found :
51+ logging .error (f"Did not find the testsuite with name { test_suite_requested } " )
52+ else :
53+ test_suites_to_execute .append (test_suite_found )
54+ if not test_suites_to_execute :
55+ raise RuntimeError (
56+ f"No matching test suites with names { test_suites_requested } found. Use print_test_suites.py to get an overview" )
57+ # now convert the test_suites into systemtests
58+ for test_suite in test_suites_to_execute :
59+ tutorials = test_suite .cases_of_tutorial .keys ()
60+ for tutorial in tutorials :
61+ cases = test_suite .cases_of_tutorial [tutorial ]
62+ reference_results = test_suite .reference_results [tutorial ]
63+ max_times = test_suite .max_times .get (tutorial , [None ] * len (cases ))
64+ for case , reference_result , max_time in zip (
65+ cases , reference_results , max_times ):
66+ systemtest = Systemtest (tutorial , build_args , case , reference_result )
67+ systemtest .max_time = max_time
68+ systemtests_to_run .append (systemtest )
6569
6670 if not systemtests_to_run :
6771 raise RuntimeError ("Did not find any Systemtests to execute." )
0 commit comments