[system]: locally run panic test app doc

This commit is contained in:
Jakob Hasse 2021-04-07 12:00:59 +08:00
parent 509afa839e
commit 5bcb189fe4
2 changed files with 39 additions and 1 deletions

View File

@ -55,8 +55,21 @@ The test apps should be grouped into subdirectories by category. Categories are:
* `security` contains tests on the chip security features.
# Test Apps local execution
All the following instructions are general. Part of them may be complemented by more particular instructions in the corresponding app's README.
* Append relevant `sdkconfig.ci.<CONFIG>` to the sdkconfig for the configuration under test
## Requirements
The following requirements need to be satisfied in the IDF python virtual environment.
* ttfw needs to be in the `PYTHONPATH`. Add it like this: `export PYTHONPATH=$PYTHONPATH:$IDF_PATH/tools/ci/python_packages`
* Install all requirements from `tools/ci/python_packages/ttfw_idf/requirements.txt`: `pip install -r $IDF_PATH/tools/ci/python_packages/ttfw_idf/requirements.txt`
You should also set the port via the environment variable ESPPORT to prevent the tools from looking and iterating over all serial ports. The latter causes much trouble, currently:
```
export ESPPORT=/dev/ttyUSB<X>
```
## Execution
* Create an sdkconfig file from the relevant `sdkconfig.ci.<CONFIG>` and `sdkconfig.defaults`: `cat sdkconfig.defaults sdkconfig.ci.<CONFIG> > sdkconfig`
* Run `idf.py menuconfig` to configure local project attributes
* Run `idf.py build` to build the test app
* Run `python app_test.py` to run the test locally

View File

@ -1,2 +1,27 @@
| Supported Targets | ESP32 | ESP32-S2 |
| ----------------- | ----- | -------- |
# Building
Several configurations are provided as `sdkconfig.ci.XXX` and serve as a template.
## Example with configuration "panic" for target ESP32
```
idf.py set-target esp32
cat sdkconfig.defaults sdkconfig.ci.panic > sdkconfig
idf.py build
```
# Running
All the setup needs to be done as described in the [test apps README](../../README.md), except that the test cases need to be specified when running the app:
```
python app_test.py test_panic_illegal_instruction
```
Multiple test cases are passed as additional arguments:
```
python app_test.py test_panic_illegal_instruction test_panic_int_wdt test_panic_storeprohibited
```
*Note that you need to pick the correct test cases at run time according to the configuration you built before. The above examples are for configuration "panic"*