Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency of test codegen on controller-clusters.zapt state. #26703

Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions examples/chip-tool/templates/tests/commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public:
TestList() : Command("list") {};
CHIP_ERROR Run() override
{
{{#chip_tests "../../../../src/app/tests/suites/ciTests.json"}}printf("{{filename}}\n");{{/chip_tests}}
{{#chip_tests "../../../../src/app/tests/suites/ciTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}}

return CHIP_NO_ERROR;
}
Expand All @@ -30,7 +30,7 @@ public:
ManualTestList() : Command("list-manual") {};
CHIP_ERROR Run() override
{
{{#chip_tests "../../../../src/app/tests/suites/manualTests.json"}}printf("{{filename}}\n");{{/chip_tests}}
{{#chip_tests "../../../../src/app/tests/suites/manualTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}}

return CHIP_NO_ERROR;
}
Expand All @@ -49,10 +49,10 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds
#if CONFIG_ENABLE_YAML_TESTS
make_unique<TestList>(),
make_unique<ManualTestList>(),
{{#chip_tests "../../../../src/app/tests/suites/ciTests.json"}}
{{#chip_tests "../../../../src/app/tests/suites/ciTests.json" includeAllClusters=true}}
make_unique<{{filename}}Suite>(credsIssuerConfig),
{{/chip_tests}}
{{#chip_tests "../../../../src/app/tests/suites/manualTests.json"}}
{{#chip_tests "../../../../src/app/tests/suites/manualTests.json" includeAllClusters=true}}
make_unique<{{filename}}Suite>(credsIssuerConfig),
{{/chip_tests}}
#endif // CONFIG_ENABLE_YAML_TESTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#chip_tests tests}}
{{#chip_tests tests includeAllClusters=true}}
class {{filename}}Suite: public TestCommand
{
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public:
TestList() : Command("list") {};
CHIP_ERROR Run() override
{
{{#chip_tests "ciTests.json"}}printf("{{filename}}\n");{{/chip_tests}}
{{#chip_tests "ciTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}}

return CHIP_NO_ERROR;
}
Expand All @@ -31,7 +31,7 @@ public:
ManualTestList() : Command("list-manual") {};
CHIP_ERROR Run() override
{
{{#chip_tests "manualTests.json"}}printf("{{filename}}\n");{{/chip_tests}}
{{#chip_tests "manualTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}}

return CHIP_NO_ERROR;
}
Expand All @@ -50,10 +50,10 @@ void registerCommandsTests(Commands & commands)
#if CONFIG_ENABLE_YAML_TESTS
make_unique<TestList>(),
make_unique<ManualTestList>(),
{{#chip_tests "ciTests.json"}}
{{#chip_tests "ciTests.json" includeAllClusters=true}}
make_unique<{{filename}}>(),
{{/chip_tests}}
{{#chip_tests "manualTests.json"}}
{{#chip_tests "manualTests.json" includeAllClusters=true}}
make_unique<{{filename}}>(),
{{/chip_tests}}
#endif // CONFIG_ENABLE_YAML_TESTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#chip_tests tests useSynthesizeWaitForReport=true}}
{{#chip_tests tests useSynthesizeWaitForReport=true includeAllClusters=true}}
class {{filename}}: public TestCommandBridge
{
public:
Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/templates/tests-commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

std::unique_ptr<TestCommand>GetTestCommand(std::string testName)
{
{{#chip_tests "../linux/apps/app1/ciTests.json"}}
{{#chip_tests "../linux/apps/app1/ciTests.json" includeAllClusters=true}}
if (testName == "{{filename}}")
{
return std::unique_ptr<{{filename}}Suite>(new {{filename}}Suite());
Expand All @@ -22,7 +22,7 @@ std::unique_ptr<TestCommand>GetTestCommand(std::string testName)

void PrintTestCommands()
{
{{#chip_tests "../linux/apps/app1/ciTests.json"}}
{{#chip_tests "../linux/apps/app1/ciTests.json" includeAllClusters=true}}
{{#first}}
ChipLogError(chipTool, "Supported commands:");
{{/first}}
Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-cert-bins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb
# ZAP Development install, so that it runs on both x64 and arm64
# Generally this should match with the ZAP version that is used for codegen within the
# specified SHA
ARG ZAP_VERSION=v2023.05.16-nightly
ARG ZAP_VERSION=v2023.05.22-nightly

# Ensure TARGETPLATFORM is set
RUN case ${TARGETPLATFORM} in \
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup/zap.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"mac-arm64",
"windows-amd64"
],
"tags": ["version:2@v2023.05.16-nightly.1"]
"tags": ["version:2@v2023.05.22-nightly.1"]
}
]
}
2 changes: 1 addition & 1 deletion scripts/setup/zap.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2023.05.16-nightly
v2023.05.22-nightly
2 changes: 1 addition & 1 deletion scripts/tools/zap/zap_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Use scripts/tools/zap/version_update.py to manage ZAP versioning as many
# files may need updating for versions
#
MIN_ZAP_VERSION = '2023.5.16'
MIN_ZAP_VERSION = '2023.5.22'


class ZapTool:
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/examples/TestGenExample.zapt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#chip_tests "ciTests.json"}}
{{#chip_tests "ciTests.json" includeAllClusters=true}}
{{#chip_tests_config}}
"Argument Name {{name}}"
"Argument Type {{type}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace chip {

{{#chip_tests_only_clusters}}
{{#chip_tests_only_clusters includeAllClusters=true}}
{{#chip_tests_only_cluster_commands}}

struct {{name}}Command
Expand Down