[ci feat] Support /bot run tests/<dir> to scope CI test runs (#3422)
<!-- .github/pull_request_template.md --> ## ๐ Description ### Note Relies on upstream internal gitlab changes being merged first. ### Summary - Add --test-path argument to parse_args() in test_utils.sh and honor TEST_PATH env var (set by GitLab CI pipeline variable) - Scope find in task_run_unit_tests.sh to the specified subdirectory instead of all of tests/ - Validate the path exists upfront and list available directories on failure ### Motivation The full test suite (attn + moe + gdn + ...) exceeds the 4-hour CI timeout. This allows running a single test subdirectory via /bot run tests/moe, keeping each scoped run well within the window while we work on pruning the full suite. ### Usage When TEST_PATH is set (via env var or --test-path flag), only tests under that directory are discovered. Without it, behavior is unchanged. ``` /bot run tests/moe # only MOE tests /bot run tests/attention # only attention tests /bot run # all tests (unchanged) ``` ### Test plan - [ ] Verify /bot run without a path still runs the full test suite - [ ] Verify /bot run tests/moe scopes discovery to tests/moe/ only - [ ] Verify an invalid path (e.g. tests/nonexistent) fails early with a helpful error - [ ] Verify --test-path flag works for local runs: bash scripts/task_run_unit_tests.sh --test-path tests/nor ## ๐ Related Issues <!-- Link any related issues here --> ## ๐ Pull Request Checklist Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete. ### โ Pre-commit Checks - [ ] I have installed `pre-commit` by running `pip install pre-commit` (or used your preferred method). - [ ] I have installed the hooks with `pre-commit install`. - [ ] I have run the hooks manually with `pre-commit run --all-files` and fixed any reported issues. > If you are unsure about how to set up `pre-commit`, see [the pre-commit documentation](https://pre-commit.com/). ## ๐งช Tests - [ ] Tests have been added or updated as needed. - [ ] All tests are passing (`unittest`, etc.). ## Reviewer Notes <!-- Optional: anything you'd like reviewers to focus on, concerns, etc. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Test discovery is now configurable via the TEST_PATH environment variable or --test-path CLI argument, enabling scoped test execution. * Log messages now reflect the selected search directory; overall test execution behavior remains unchanged. * **Bug Fixes / UX** * Added validation and clearer error messages when the configured test directory doesn't exist, including listing available top-level test directories. * **Style** * Displays a โSCOPED TEST MODEโ banner when a test path is set. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/flashinfer-ai/flashinfer/pull/3422?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
K
Ka-Hyun Nam committed
fc12ef21d9eddcd9a7b1a4a8024fb3e81fda804d
Parent: 339c23d
Committed by GitHub <noreply@github.com>
on 5/30/2026, 4:43:58 AM