Skip to content

Commit d3d98dd

Browse files
committed
remove broken test handling from report.py
1 parent 1b70627 commit d3d98dd

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

tests/ci/report.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from build_download_helper import get_gh_api
2424
from ci_config import CI_CONFIG, BuildConfig
2525
from ci_utils import normalize_string
26-
from env_helper import REPORT_PATH, TEMP_PATH, ROOT_DIR
26+
from env_helper import REPORT_PATH, TEMP_PATH
2727

2828
logger = logging.getLogger(__name__)
2929

@@ -325,19 +325,6 @@ def path_converter(obj):
325325

326326
def read_test_results(results_path: Path, with_raw_logs: bool = True) -> TestResults:
327327
results = [] # type: TestResults
328-
329-
broken_tests_config_path = f"{ROOT_DIR}/tests/broken_tests.json"
330-
if (
331-
os.path.isfile(broken_tests_config_path)
332-
and os.path.getsize(broken_tests_config_path) > 0
333-
):
334-
with open(broken_tests_config_path, "r", encoding="utf-8") as broken_tests_file:
335-
broken_tests = json.load(
336-
broken_tests_file
337-
) # type: Dict[str, Dict[str, str]]
338-
else:
339-
broken_tests = {}
340-
341328
with open(results_path, "r", encoding="utf-8") as descriptor:
342329
reader = csv.reader(descriptor, delimiter="\t")
343330
for line in reader:
@@ -364,18 +351,6 @@ def read_test_results(results_path: Path, with_raw_logs: bool = True) -> TestRes
364351
else:
365352
result.set_log_files(line[3])
366353

367-
if name in broken_tests.keys() and status == "FAIL":
368-
fail_message = broken_tests[name].get("message", "")
369-
if result.log_files and fail_message:
370-
for log_path in result.log_files:
371-
if log_path.endswith(".log"):
372-
with open(log_path) as log_file:
373-
if fail_message in log_file.read():
374-
result.status = "XFAIL"
375-
break
376-
else:
377-
result.status = "XFAIL"
378-
379354
results.append(result)
380355

381356
return results

0 commit comments

Comments
 (0)