Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-test-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

{
Expand Down
14 changes: 8 additions & 6 deletions scripts/pass_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down