Skip to content

Commit

Permalink
supported on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AshburnLee committed Jun 14, 2024
1 parent 34f7043 commit 5e3cefc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ run-name: ${{ inputs.run_name }}
on:
workflow_dispatch:
inputs:
enable_unskip:
description: Ignore pytest.skip
type: boolean
default: false
install_ipex:
# This boolean parameter defines what PyTorch will be used in the workflow:
# true: Stonepia/pytorch (fork) with IPEX
Expand Down Expand Up @@ -46,6 +50,7 @@ env:
TRITON_DISABLE_LINE_INFO: 1
INSTALL_IPEX: ${{ inputs.install_ipex || github.event_name == 'pull_request' || github.event_name == 'push' || 'false' }}
TORCH_XPU_OPS_COMMIT: 39522db63ce045f52c9d61a286018c266cd00479
TEST_UNSKIP: ${{ (github.event_name == 'workflow_dispatch' && inputs.enable_unskip) || 'false' }}

jobs:
pre-commit:
Expand Down
8 changes: 4 additions & 4 deletions scripts/pytest-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ pytest() {
mkdir -p "$CURRENT_SKIPLIST_DIR"
# skip comments in the skiplist
sed -e '/^#/d' "$TRITON_TEST_SKIPLIST_DIR/$TRITON_TEST_SUITE.txt" > "$CURRENT_SKIPLIST_DIR/$TRITON_TEST_SUITE.txt"
pytest_extra_args+=(
"--deselect-from-file=$CURRENT_SKIPLIST_DIR/$TRITON_TEST_SUITE.txt"
"--select-fail-on-missing"
)
if [[ $TEST_UNSKIP = false ]]; then
pytest_extra_args+=("--deselect-from-file=$CURRENT_SKIPLIST_DIR/$TRITON_TEST_SUITE.txt")
fi
pytest_extra_args+=("--select-fail-on-missing")
fi

python3 -u -m pytest "${pytest_extra_args[@]}" "$@" || $TRITON_TEST_IGNORE_ERRORS
Expand Down

0 comments on commit 5e3cefc

Please sign in to comment.