From 5e3cefcd9b20d7adb42fb25e94e79a4ba598db8f Mon Sep 17 00:00:00 2001 From: AshburnLee Date: Fri, 14 Jun 2024 09:24:57 +0000 Subject: [PATCH] supported on CI --- .github/workflows/build-test.yml | 5 +++++ scripts/pytest-utils.sh | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 66f0cf158f..48ef3f67a7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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 @@ -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: diff --git a/scripts/pytest-utils.sh b/scripts/pytest-utils.sh index 5de8f8374a..b1d28282a8 100644 --- a/scripts/pytest-utils.sh +++ b/scripts/pytest-utils.sh @@ -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