Skip to content

Commit 0bd1a4c

Browse files
committed
Update docs
1 parent 0692146 commit 0bd1a4c

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

docs/en/contributing.rst

+30-10
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,34 @@ Also:
109109
Testing
110110
*******
111111

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.
115116

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:
117118

118119
.. code-block:: json
119120
120121
{
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+
],
121139
"targets": {
122-
"esp32h2": false,
123140
"esp32s2": false
124141
}
125142
}
@@ -130,7 +147,7 @@ For example, in the sketch:
130147
.. code-block:: arduino
131148
132149
/*
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
134151
*/
135152
136153
And in the ``README.md`` file:
@@ -139,8 +156,8 @@ And in the ``README.md`` file:
139156
140157
Currently, this example supports the following targets.
141158
142-
| Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 | ESP32-S3 |
143-
| ----------------- | ----- | -------- | -------- | -------- |
159+
| Supported Targets | ESP32 | ESP32-H2 | ESP32-S3 | ESP32-C3 | ESP32-C6 |
160+
| ----------------- | ----- | -------- | -------- | -------- | -------- |
144161
145162
Example Template
146163
****************
@@ -341,8 +358,11 @@ CI JSON File
341358

342359
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:
343360

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.
346366
* ``platforms``: A dictionary that specifies the supported platforms. The key is the platform name and the value is a boolean that specifies if
347367
the platform is supported. By default, all platforms are assumed to be supported.
348368
* ``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

Comments
 (0)