Repository navigation
Conversation
Render the `changes` returned by the backend rescan: test cases added, modified and removed grouped by collection, the collections without changes, and the scripts that failed to parse with the reason. A rescan without changes now says so explicitly. The autogen models and rescan return type are updated by hand to match the backend response; regenerate them with scripts/generate_client.sh against the updated backend. Part of #1200
Match the backend, which now returns the change report on TestCollections instead of a separate response model (that made datamodel-codegen emit an invalid `class TestCollections(TestCollections2)`). Fall back to the plain summary when the backend response has no `changes`. Part of #1200
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Print the backend's changes.custom_overrides: custom/*.py files that replace an SDK module of the same name (used by every test that imports them), and, apart, same-name copies that nothing imports. A backend without the field, or with empty lists, prints nothing extra. The models are edited by hand to match the backend schema; regenerate with scripts/generate_client.sh once the backend change is merged. Refs project-chip/certification-tool#1200
Print the backend's changes.custom_files as a "Custom files" block: files added, modified or removed in custom/, with "(replaces sdk/X)" on the ones that replace an SDK module. Replaces the two override lists, which listed same-name copies of SDK tests that replace nothing. A change limited to custom files, a helper for example, is no longer reported as "No changes detected". The models are edited by hand to match the backend schema; regenerate with scripts/generate_client.sh once the backend change is merged. Refs project-chip/certification-tool#1200
Color the added, modified and removed lines green, yellow and red, for test cases and custom files. The +, ~ and - markers and the labels stay, so the output reads the same without color. Honors TH_CLI_NO_COLOR and is stripped when the output is not a terminal. Refs project-chip/certification-tool#1200
Closes #1200
Summary
th-cli rescan-testsrenders thechangesreturned by the backend rescan (see project-chip/certification-tool-backend#413):No changes in: ...for the restRescanned test collections successfully (N found). No changes detected.when nothing changedchangesNotes
th_cli/api_lib_autogenwas updated by hand to match the generator output for the new backend schema (changesonTestCollections); regenerate withscripts/generate_client.shonce the backend PR is merged.Testing
tests/test_rescan_tests.py: 12 passed (changes grouped by collection, no changes, parse errors, old backend withoutchanges).Also prints
changes.custom_filesfrom the backend as a "Custom files" block: the files added, modified or removed incustom/since the previous rescan, with(replaces sdk/X)on the ones that replace an SDK module. A change limited to custom files is not reported as "No changes detected". Nothing extra is printed when the list is empty or the backend does not send the field. Needs project-chip/certification-tool-backend#413.The added, modified and removed lines are colored green, yellow and red (
colorize_changeincolorize.py). The+,~,-markers and labels stay,TH_CLI_NO_COLORis honored, and the codes are stripped when the output is not a terminal.