@@ -109,17 +109,34 @@ Also:
109
109
Testing
110
110
*******
111
111
112
- Be sure you have tested the example in all the supported targets. If the example works only with specific targets,
113
- edit/add the ``ci.json `` in the same folder as the sketch to specify the supported targets. By default,
114
- all targets are assumed to be supported.
112
+ Be sure you have tested the example in all the supported targets. If the example some specific hardware requirements,
113
+ edit/add the ``ci.json `` in the same folder as the sketch to specify the required configurations from ``sdkconfig ``.
114
+ This will ensure that the CI system will run the test only on the targets that have the required configurations.
115
+ You can check the available configurations in the ``sdkconfig `` file in the ``tools/esp32-arduino-libs/<target> `` folder.
115
116
116
- Here is an example of the ``ci.json `` file where the example does not support ESP32-H2 and ESP32-S2 :
117
+ Here is an example of the ``ci.json `` file where the example requires Wi-Fi to work properly :
117
118
118
119
.. code-block :: json
119
120
120
121
{
122
+ "requires" : [
123
+ " CONFIG_SOC_WIFI_SUPPORTED=y"
124
+ ]
125
+ }
126
+
127
+ Sometimes, the example might not be supported by some target, even if the target has the required configurations
128
+ (like resources limitations or requiring a specific SoC). To avoid compilation errors, you can add the target to the ``ci.json ``
129
+ file so the CI system will force to skip the test on that target.
130
+
131
+ Here is an example of the ``ci.json `` file where the example is requires Wi-Fi to work properly but is also not supported by the ESP32-S2 target:
132
+
133
+ .. code-block :: json
134
+
135
+ {
136
+ "requires" : [
137
+ " CONFIG_SOC_WIFI_SUPPORTED=y"
138
+ ],
121
139
"targets" : {
122
- "esp32h2" : false ,
123
140
"esp32s2" : false
124
141
}
125
142
}
@@ -130,7 +147,7 @@ For example, in the sketch:
130
147
.. code-block :: arduino
131
148
132
149
/*
133
- THIS FEATURE IS SUPPORTED ONLY BY ESP32-S2 AND ESP32-C3
150
+ THIS FEATURE REQUIRES WI-FI SUPPORT AND IS NOT AVAILABLE FOR ESP32-S2
134
151
*/
135
152
136
153
And in the ``README.md `` file:
@@ -139,8 +156,8 @@ And in the ``README.md`` file:
139
156
140
157
Currently, this example supports the following targets.
141
158
142
- | Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 | ESP32-S3 |
143
- | ----------------- | ----- | -------- | -------- | -------- |
159
+ | Supported Targets | ESP32 | ESP32-H2 | ESP32-S3 | ESP32- C3 | ESP32-C6 |
160
+ | ----------------- | ----- | -------- | -------- | -------- | -------- |
144
161
145
162
Example Template
146
163
****************
@@ -341,8 +358,11 @@ CI JSON File
341
358
342
359
The ``ci.json `` file is used to specify how the test suite and sketches will handled by the CI system. It can contain the following fields:
343
360
344
- * ``targets ``: A dictionary that specifies the supported targets. The key is the target name and the value is a boolean that specifies if the
345
- target is supported. By default, all targets are assumed to be supported. This field is also valid for examples.
361
+ * ``requires ``: A list of configurations in ``sdkconfig `` that are required to run the test suite. The test suite will only run on the targets
362
+ that have the required configurations. By default, no configurations are required.
363
+ * ``targets ``: A dictionary that specifies the targets for which the tests will be run. The key is the target name and the value is a boolean
364
+ that specifies if the test should be run for that target. By default, all targets are enabled as long as they have the required configurations
365
+ specified in the ``requires `` field. This field is also valid for examples.
346
366
* ``platforms ``: A dictionary that specifies the supported platforms. The key is the platform name and the value is a boolean that specifies if
347
367
the platform is supported. By default, all platforms are assumed to be supported.
348
368
* ``extra_tags ``: A list of extra tags that the runner will require when running the test suite in hardware. By default, no extra tags are required.
0 commit comments