Skip to content
Open
Changes from 1 commit
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
12 changes: 10 additions & 2 deletions .buildkite/test-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,11 @@ steps:
# tests covered elsewhere.
# Use `find` to launch multiple instances of pytest so that
# they do not suffer from https://github.com/vllm-project/vllm/issues/28965
- "find compile/ -maxdepth 1 -name 'test_*.py' -exec pytest -s -v {} \\\\;"
# However, find does not normally propagate error codes, so we combine it with xargs
# (using -0 for proper path handling)
- >
find compile/ -maxdepth 1 -name 'test_*.py' -print0 |
xargs -0 -n1 -I{} pytest -s -v "{}"
Copy link
Contributor

Choose a reason for hiding this comment

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

high

While this change correctly propagates pytest exit codes, it introduces an issue where the step will silently pass if find doesn't locate any test files. A test step that is expected to run tests should fail if no tests are found to avoid giving a false sense of security. I suggest adding a check to ensure at least one test file is found.

  - |
    set -e -o pipefail
    found_files=$(find compile/ -maxdepth 1 -name 'test_*.py' -print0)
    if [ -z "$found_files" ]; then
      echo "FAIL: No test files found for PyTorch Compile Smoke Test" >&2
      exit 1
    fi
    printf "%s" "$found_files" | xargs -0 -n1 -I{} pytest -s -v "{}"


- label: PyTorch Fullgraph Smoke Test # 15min
timeout_in_minutes: 30
Expand All @@ -482,7 +486,11 @@ steps:
# as it is a heavy test that is covered in other steps.
# Use `find` to launch multiple instances of pytest so that
# they do not suffer from https://github.com/vllm-project/vllm/issues/28965
- "find compile/fullgraph/ -name 'test_*.py' -not -name 'test_full_graph.py' -exec pytest -s -v {} \\\\;"
# However, find does not normally propagate error codes, so we combine it with xargs
# (using -0 for proper path handling)
- >
find compile/fullgraph -maxdepth 1 -name 'test_*.py' -not -name 'test_full_graph.py' -print0 |
xargs -0 -n1 -I{} pytest -s -v "{}"
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Similar to the previous comment, this change will cause the test step to pass silently if no test files are found. This can mask issues, for example if test files are accidentally moved or renamed. To ensure the CI pipeline is robust, the step should fail if it's expected to run tests but doesn't find any.

  - |
    set -e -o pipefail
    found_files=$(find compile/fullgraph -maxdepth 1 -name 'test_*.py' -not -name 'test_full_graph.py' -print0)
    if [ -z "$found_files" ]; then
      echo "FAIL: No test files found for PyTorch Fullgraph Smoke Test" >&2
      exit 1
    fi
    printf "%s" "$found_files" | xargs -0 -n1 -I{} pytest -s -v "{}"


- label: PyTorch Fullgraph Test # 27min
timeout_in_minutes: 40
Expand Down
Loading