From 99cc3a628a60a33b430534a021c220928cba829a Mon Sep 17 00:00:00 2001 From: Pavel Chekin Date: Sat, 29 Mar 2025 10:16:58 -0700 Subject: [PATCH 1/2] Make --skip-list optional If --skip-list is not specified, then the skip list will not be used in pass rate calculation. --- scripts/pass_rate.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/pass_rate.py b/scripts/pass_rate.py index aac90bcccd..8bfbe92a5a 100644 --- a/scripts/pass_rate.py +++ b/scripts/pass_rate.py @@ -8,7 +8,7 @@ import pathlib import platform import sys -from typing import Dict, List +from typing import Dict, List, Optional from defusedxml.ElementTree import parse @@ -69,7 +69,7 @@ def create_argument_parser() -> argparse.ArgumentParser: argument_parser.add_argument( '--skip-list', type=str, - help='an exclude list dir used in pass rate calculation, can be passed via TRITON_TEST_SKIPLIST_DIR as well', + help='an exclude list dir used in pass rate calculation', ) return argument_parser @@ -124,7 +124,7 @@ def get_all_missing_tests(reports_path: pathlib.Path) -> Dict[str, List[str]]: return all_missing_tests -def parse_report(report_path: pathlib.Path, skiplist_dir: pathlib.Path) -> ReportStats: +def parse_report(report_path: pathlib.Path, skiplist_dir: Optional[pathlib.Path]) -> ReportStats: """Parses the specified report.""" stats = ReportStats(name=report_path.stem) root = parse(report_path).getroot() @@ -148,7 +148,7 @@ def parse_report(report_path: pathlib.Path, skiplist_dir: pathlib.Path) -> Repor test_unskip = os.getenv('TEST_UNSKIP', 'false') if test_unskip not in ('true', 'false'): raise ValueError('Error: please set TEST_UNSKIP true or false') - if test_unskip == 'false': + if skiplist_dir and test_unskip == 'false': deselected = get_deselected(report_path, skiplist_dir) stats.skipped += deselected stats.total += deselected @@ -248,8 +248,10 @@ def main(): """Main.""" args = create_argument_parser().parse_args() args.report_path = pathlib.Path(args.reports) - args.skiplist_dir = pathlib.Path( - args.skip_list if args.skip_list else os.getenv('TRITON_TEST_SKIPLIST_DIR', 'scripts/skiplist/default')) + if args.skip_list: + args.skiplist_dir = pathlib.Path(args.skip_list) + else: + args.skiplist_dir = None missing_tests = get_all_missing_tests(args.report_path) if missing_tests: From c3208380d12d293770978eef054a6c028a5c0f5f Mon Sep 17 00:00:00 2001 From: Pavel Chekin Date: Sat, 29 Mar 2025 11:19:46 -0700 Subject: [PATCH 2/2] Always use default skip list if set with other parameters --- .github/workflows/build-test-reusable.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-reusable.yml b/.github/workflows/build-test-reusable.yml index dfa21d73b5..18538c4485 100644 --- a/.github/workflows/build-test-reusable.yml +++ b/.github/workflows/build-test-reusable.yml @@ -133,18 +133,18 @@ jobs: - name: Create test-triton command line run: | + skiplist="$GITHUB_WORKSPACE/scripts/skiplist/default" + if [[ -n "${{ inputs.skip_list }}" ]]; then skiplist="$GITHUB_WORKSPACE/scripts/skiplist/${{ inputs.skip_list }}" elif [[ -n "${{ inputs.driver_version }}" ]]; then skiplist="$GITHUB_WORKSPACE/scripts/skiplist/${{ inputs.driver_version }}" - else - skiplist="$GITHUB_WORKSPACE/scripts/skiplist/default" fi if [ -d "$skiplist" ]; then skiplist="--skip-list $skiplist" else - skiplist= + skiplist="--skip-list $GITHUB_WORKSPACE/scripts/skiplist/default" fi {