@@ -88,8 +88,7 @@ TEST_MAX_RUN_TIME_IN_SECONDS = 180
8888
8989
9090@lru_cache (maxsize = 1 )
91- def get_broken_tests_rules () -> dict :
92- broken_tests_file_path = "tests/broken_tests.yaml"
91+ def get_broken_tests_rules (broken_tests_file_path : str ) -> dict :
9392 if (
9493 not os .path .isfile (broken_tests_file_path )
9594 or os .path .getsize (broken_tests_file_path ) == 0
@@ -129,10 +128,10 @@ def get_broken_tests_rules() -> dict:
129128 return compiled_rules
130129
131130
132- def test_is_known_fail (test_name , test_logs , build_flags ):
131+ def test_is_known_fail (test_name , test_logs , build_flags , broken_tests_file_path ):
133132 matching_rules = []
134133
135- known_broken_tests = get_broken_tests_rules ()
134+ known_broken_tests = get_broken_tests_rules (broken_tests_file_path )
136135
137136 # print(f"Checking known broken tests for failed test: {test_name}")
138137 # print("Potential matching rules:")
@@ -2321,13 +2320,17 @@ class TestCase:
23212320 if result .status == TestStatus .FAIL :
23222321 result .description = self .add_info_about_settings (result .description )
23232322
2324- # Check if the test is known to fail
2325- known_fail_reason = test_is_known_fail (
2326- self .name , result .description , args .build_flags
2327- )
2328- if known_fail_reason :
2329- result .status = TestStatus .BROKEN
2330- result .description += f"Marked as broken: { known_fail_reason } "
2323+ if args .known_fails_file_path :
2324+ # Check if the test is known to fail
2325+ known_fail_reason = test_is_known_fail (
2326+ self .name ,
2327+ result .description ,
2328+ args .build_flags ,
2329+ args .known_fails_file_path ,
2330+ )
2331+ if known_fail_reason :
2332+ result .status = TestStatus .BROKEN
2333+ result .description += f"Marked as broken: { known_fail_reason } "
23312334
23322335 if self .name in suite .blacklist_check :
23332336 if result .status == TestStatus .OK :
@@ -3818,6 +3821,8 @@ def parse_args():
38183821 parser .add_argument ("-q" , "--queries" , help = "Path to queries dir" )
38193822 parser .add_argument ("--tmp" , help = "Path to tmp dir" )
38203823
3824+ parser .add_argument ("--known-fails-file-path" , help = "Path to known fails file" )
3825+
38213826 parser .add_argument (
38223827 "-b" ,
38233828 "--binary" ,
0 commit comments