Skip to content

Conversation

@slawblauciak
Copy link
Contributor

@slawblauciak slawblauciak commented Nov 5, 2025

FYI: https://docs.pytest.org/en/stable/example/markers.html#using-k-expr-to-select-tests-based-on-their-name

This change adds an interface with the -k param for pytest, for quick test selection and the --pdb option, to enable Python debug for failed tests:

--test-expr EXPRESSION - Filters tests by substrings
--debug-fail - Enables auto debug

@januszjah januszjah requested a review from Copilot November 5, 2025 12:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for pytest's -k expression filtering to the test-triton.sh script, enabling users to select tests based on their names using expressions. This provides a more flexible way to run specific tests beyond the existing file-based selection mechanism.

  • Adds a new --test-expr command-line option to the test script
  • Implements expression-based test filtering using pytest's -k parameter
  • Refactors pytest invocations to use array-based argument passing for proper handling of optional parameters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@slawblauciak slawblauciak marked this pull request as draft November 5, 2025 13:14
@slawblauciak slawblauciak force-pushed the dev/slbl/test-triton-filter branch from 69417a3 to bddf016 Compare November 6, 2025 13:55
@slawblauciak slawblauciak marked this pull request as ready for review November 6, 2025 13:56
Creates an interface for pytest test selection mechanism.

Signed-off-by: Sławomir Błauciak <slawomir.blauciak@intel.com>
Enables automatic running for Python debug for failed tests
@slawblauciak slawblauciak force-pushed the dev/slbl/test-triton-filter branch from bddf016 to 766f046 Compare November 7, 2025 13:18
@slawblauciak slawblauciak changed the title Add test expression option to filter tests by their names Add test name filtering and Python debug options to the test script Nov 7, 2025
@HBN-MichalSzy HBN-MichalSzy merged commit ef7d239 into main Nov 12, 2025
23 checks passed
@HBN-MichalSzy HBN-MichalSzy deleted the dev/slbl/test-triton-filter branch November 12, 2025 09:24
whitneywhtsang added a commit that referenced this pull request Nov 18, 2025
whitneywhtsang added a commit that referenced this pull request Nov 19, 2025
…script (#5435)" (#5506)

Fixes #5507

This reverts commit ef7d239.

Starting 97f32cc, no triton-kernels tests are run.
`triton_kernels: passed: 0, failed: 0, skipped: 0, xfailed: 0, total: 0,
fixme: 0, pass rate (w/o xfailed): 0.0%`

Reverting ef7d239 resolves the problem.

---------

Signed-off-by: Whitney Tsang <whitney.tsang@intel.com>
anmyachev pushed a commit that referenced this pull request Nov 19, 2025
…script (#5435)" (#5506)

Fixes #5507

This reverts commit ef7d239.

Starting 97f32cc, no triton-kernels tests are run.
`triton_kernels: passed: 0, failed: 0, skipped: 0, xfailed: 0, total: 0,
fixme: 0, pass rate (w/o xfailed): 0.0%`

Reverting ef7d239 resolves the problem.

---------

Signed-off-by: Whitney Tsang <whitney.tsang@intel.com>
(cherry picked from commit 6299f1a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants