Skip to content

Conversation

Copy link

Copilot AI commented Jan 15, 2026

The --single-test flag in matrix_run_android_tests.sh claimed to "override package filter" but only appended -e class, not removing existing -e package/-e notPackage filters. Android instrumentation applies filters conjunctively, so tests outside the shard's package scope would match nothing.

Changes

  • Removed --single-test functionality from matrix runner

    • Removed flag from argument parsing and help text
    • Removed filter logic from build_instrument_command()
    • Removed output display from main configuration print
  • Updated test sharding documentation

    • Removed --single-test from parameter table
    • Removed "Running a Single Test" examples section

Rationale

Running a single test defeats the purpose of sharded execution. Users needing single-test execution can use run_android_tests.sh (non-matrix runner), which retains this functionality.

Original prompt

This section details on the original issue you should resolve

<issue_title>Bug: Matrix Runner Script Single-test filter doesn't override package filter as documented</issue_title>
<issue_description>### Bug: Single-test filter doesn't override package filter as documented

The comment states --single-test "overrides package filter" but the implementation only appends -e class to the command without removing the existing -e package or -e notPackage filter. In Android instrumentation, both filters are applied conjunctively (AND), so a test must match both conditions. If someone specifies --single-test for a test outside the shard's package scope (e.g., running a non-UI test while on a UI shard), no tests will execute and it will appear as a successful run with zero tests. The code behavior contradicts the documented intent.

Fix in Cursor Fix in Web

Originally posted by @cursor[bot] in #105 (comment)
</issue_description>

Comments on the Issue (you are @copilot in this section)

@williscool Lol. I can't imagine why you would even want to try to run a single test in Matrix mode, but it is technically broken so we should probably remove this

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Note

Removes the misleading --single-test option from the matrix test runner and aligns docs accordingly.

  • Strips --single-test parsing, help text, and filter handling from scripts/matrix_run_android_tests.sh (no more -e class injection)
  • Cleans configuration output related to single-test mode
  • Updates docs/testing/test_sharding.md: removes --single-test from the parameters table and deletes the single-test usage section

Written by Cursor Bugbot for commit e6703eb. This will update automatically on new commits. Configure here.

Co-authored-by: williscool <394931+williscool@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bug where single-test filter doesn't override package filter Remove broken --single-test flag from matrix runner Jan 15, 2026
Copilot AI requested a review from williscool January 15, 2026 07:31
@williscool williscool marked this pull request as ready for review January 15, 2026 15:01
@github-actions
Copy link

Build artifacts for PR #181 (commit 7eac3c4) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Jan 15, 2026

Code Coverage Report

Overall Project 33.95% 🍏

There is no coverage information present for the Files changed

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 24.52
Changed Files 100

View detailed coverage report

@williscool williscool changed the title Remove broken --single-test flag from matrix runner ci: Remove broken --single-test flag from matrix runner Jan 15, 2026
@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 33.95
Changed Files 100

View detailed coverage report

@williscool williscool merged commit feed7c7 into master Jan 16, 2026
31 of 33 checks passed
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.

Bug: Matrix Runner Script Single-test filter doesn't override package filter as documented

2 participants