Skip to content

Cherry-pick #346 + #358: mandatory test sideloading + duplicate-test fix - #360

Open
rquidute wants to merge 2 commits into
v2.16-developfrom
cp/346-358-mandatory-sideload-fix-v2.16
Open

Cherry-pick #346 + #358: mandatory test sideloading + duplicate-test fix#360
rquidute wants to merge 2 commits into
v2.16-developfrom
cp/346-358-mandatory-sideload-fix-v2.16

Conversation

@rquidute

Copy link
Copy Markdown
Contributor

Summary

Cherry-picks two commits from v2.15.1-develop onto v2.16-develop:

  1. Allow mandatory tests to be sideloaded #346 — "Allow mandatory tests to be sideloaded" — introduces the CollectionType enum (NON_MANDATORY/MANDATORY/ALL) so mandatory tests can be sideloaded via custom test collections.
  2. Fix mandatory Python tests duplicated into Old Script Format suite #358 — "Fix mandatory Python tests duplicated into Old Script Format suite" — fixes a regression introduced by Allow mandatory tests to be sideloaded #346 where the LEGACY-suite fallback branch lost its python_test_type != MANDATORY guard, causing mandatory tests (e.g. TC-IDM-10.2, TC-IDM-10.3, TC-IDM-10.4, TC-IDM-10.5, TC-IDM-12.1) to be duplicated into both Mandatory SDK Python Tests and SDK Python Tests (Old Script Format), and executed twice via the TH CLI.

v2.16-develop never had #346 merged, so it was unaffected by the #1087 bug on its own — this PR brings in both the original feature and its fix together so the branch ends up in the same corrected state as v2.15.1-develop, without ever passing through the broken intermediate state.

Fixes project-chip/certification-tool#1087 (on this branch)

Changes

Both commits applied cleanly with no merge conflicts.

  • test_collections/matter/sdk_tests/support/python_testing/sdk_python_tests.pyCollectionType enum + corrected classification guard
  • test_collections/matter/sdk_tests/support/tests/python_tests/test_sdk_python_collection.py — regression test
  • test_collections/matter/sdk_tests/support/tests/python_tests/test_python_script/mandatory_tests_info.json — new fixture for the regression test (doesn't touch the shared python_tests_info.json fixture used by other tests)

Testing

flake8, isort, and black all pass on the touched files. Docker isn't available in this environment to run the full pytest suite; please confirm CI passes.

Cherry-picked from v2.15.1-develop.

There was/is a small quirk in the logic that would prevent mandatory
tests from the list in python_test_parser.py from being added when
custom tests were collated.
)

Cherry-picked from v2.15.1-develop.

PR #346 ("Allow mandatory tests to be sideloaded", cherry-picked in the
prior commit) replaced the mandatory: bool flag in
__parse_python_tests() with a 3-valued CollectionType enum, but the
LEGACY-suite fallback branch lost its python_test_type != MANDATORY
guard in the process:

    elif collection_type != CollectionType.MANDATORY:
        suites[SuiteType.LEGACY].add_test_case(test_case)

This only checks the target collection, not the test's own type, so
when building the NON_MANDATORY ("SDK Python Tests") collection, any
test case whose type is MANDATORY falls through the
COMMISSIONING/NO_COMMISSIONING branches and lands in the LEGACY
("Old script format") suite anyway. The same test case is also
correctly added to SuiteType.MANDATORY when the MANDATORY collection
is built, so it ends up listed - and executed - in both collections.

Restore the type guard so mandatory tests are excluded from the
LEGACY suite when populating the NON_MANDATORY collection, while
still landing in SuiteType.MANDATORY for CollectionType.ALL (sideload)
per PR #346's intent.

Fixes project-chip/certification-tool#1087
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d69945e-c719-48c2-9248-71e761e1adec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify

mergify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@rquidute rquidute self-assigned this Aug 26, 2026
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.

1 participant