Skip to content

Commit 3786886

Browse files
krypton36pull[bot]
authored andcommitted
Allow simulated apps to have separate templates. (#25378)
1 parent 37e0402 commit 3786886

File tree

4 files changed

+146
-73
lines changed

4 files changed

+146
-73
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "Placeholder templates",
3+
"version": "chip-v1",
4+
"helpers": [
5+
"partials/helper.js",
6+
"common/StringHelper.js",
7+
"templates/app/helper.js",
8+
"templates/chip/helper.js",
9+
"common/ClusterTestGeneration.js",
10+
"chip-tool/templates/helper.js",
11+
"chip-tool/templates/tests/helper.js"
12+
],
13+
"resources": {
14+
"pics-metafile": "../../../../../../src/app/tests/suites/certification/PICS.yaml",
15+
"certification-metadir": "../../../../../../src/app/tests/suites/certification",
16+
"test-metadir": "../../../../../../src/app/tests/suites"
17+
},
18+
"override": "../../../../../../src/app/zap-templates/common/override.js",
19+
"partials": [
20+
{
21+
"name": "header",
22+
"path": "../../../../../../src/app/zap-templates/partials/header.zapt"
23+
},
24+
{
25+
"name": "test_cluster",
26+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/test_cluster.zapt"
27+
},
28+
{
29+
"name": "test_step",
30+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/test_step.zapt"
31+
},
32+
{
33+
"name": "test_step_response",
34+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/test_step_response.zapt"
35+
},
36+
{
37+
"name": "maybeCheckExpectedValue",
38+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedValue.zapt"
39+
},
40+
{
41+
"name": "maybeCheckExpectedConstraints",
42+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt"
43+
},
44+
{
45+
"name": "maybeSaveAs",
46+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/saveAs/maybeSaveAs.zapt"
47+
},
48+
{
49+
"name": "setupSaveAs",
50+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/saveAs/setupSaveAs.zapt"
51+
},
52+
{
53+
"name": "teardownSaveAs",
54+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/saveAs/teardownSaveAs.zapt"
55+
},
56+
{
57+
"name": "commandValue",
58+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/command_value.zapt"
59+
},
60+
{
61+
"name": "valueEquals",
62+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/value_equals.zapt"
63+
}
64+
],
65+
"templates": [
66+
{
67+
"path": "../../../../templates/tests-commands.zapt",
68+
"name": "Tests Commands header",
69+
"output": "test/Commands.h"
70+
}
71+
]
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "Placeholder templates",
3+
"version": "chip-v1",
4+
"helpers": [
5+
"partials/helper.js",
6+
"common/StringHelper.js",
7+
"templates/app/helper.js",
8+
"templates/chip/helper.js",
9+
"common/ClusterTestGeneration.js",
10+
"chip-tool/templates/helper.js",
11+
"chip-tool/templates/tests/helper.js"
12+
],
13+
"resources": {
14+
"pics-metafile": "../../../../../../src/app/tests/suites/certification/PICS.yaml",
15+
"certification-metadir": "../../../../../../src/app/tests/suites/certification",
16+
"test-metadir": "../../../../../../src/app/tests/suites"
17+
},
18+
"override": "../../../../../../src/app/zap-templates/common/override.js",
19+
"partials": [
20+
{
21+
"name": "header",
22+
"path": "../../../../../../src/app/zap-templates/partials/header.zapt"
23+
},
24+
{
25+
"name": "test_cluster",
26+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/test_cluster.zapt"
27+
},
28+
{
29+
"name": "test_step",
30+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/test_step.zapt"
31+
},
32+
{
33+
"name": "test_step_response",
34+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/test_step_response.zapt"
35+
},
36+
{
37+
"name": "maybeCheckExpectedValue",
38+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedValue.zapt"
39+
},
40+
{
41+
"name": "maybeCheckExpectedConstraints",
42+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt"
43+
},
44+
{
45+
"name": "maybeSaveAs",
46+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/saveAs/maybeSaveAs.zapt"
47+
},
48+
{
49+
"name": "setupSaveAs",
50+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/saveAs/setupSaveAs.zapt"
51+
},
52+
{
53+
"name": "teardownSaveAs",
54+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/saveAs/teardownSaveAs.zapt"
55+
},
56+
{
57+
"name": "commandValue",
58+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/command_value.zapt"
59+
},
60+
{
61+
"name": "valueEquals",
62+
"path": "../../../../../../examples/chip-tool/templates/tests/partials/value_equals.zapt"
63+
}
64+
],
65+
"templates": [
66+
{
67+
"path": "../../../../templates/tests-commands.zapt",
68+
"name": "Tests Commands header",
69+
"output": "test/Commands.h"
70+
}
71+
]
72+
}

examples/placeholder/templates/templates.json

-72
This file was deleted.

scripts/tools/zap_regen_all.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ def getGlobalTemplatesTargets():
257257
# a name like <zap-generated/foo.h>
258258
output_dir = os.path.join(
259259
'zzz_generated', 'placeholder', example_name, 'zap-generated')
260-
template = 'examples/placeholder/templates/templates.json'
260+
template = os.path.join(
261+
'examples', 'placeholder', 'linux', 'apps', example_name, 'templates', 'templates.json')
261262

262263
targets.append(ZAPGenerateTarget.MatterIdlTarget(filepath))
263264
targets.append(ZAPGenerateTarget(filepath, output_dir=output_dir, template=template))

0 commit comments

Comments
 (0)