mirror of
https://github.com/apache/nuttx.git
synced 2026-08-02 20:59:02 +00:00
[BUG] CI Test sim:citest fails intermittently for Linux sim-01 nuttx#16088 https://gist.github.com/lupyuen/849562eaf87b93411098c96ada4d43c5 nsh> cmocka --skip test_case_posix_timer|test_case_oneshot|write_default|read_default|burst_test|gpiotest01|test_playback.*|test_interaction.*|test_stress.*|test_capture.* Cmocka Test Start. Missing <source> Usage: cmocka_driver_block -m <source> Where: -m <source> Block device or mtd device mount location. ... [ RUN ] drivertest_pm [ ERROR ] --- 0 != 3 [ LINE ] --- drivertest_pm.c:199: error: Failure! [ FAILED ] drivertest_pm [==========] tests: 1 test(s) run. [ PASSED ] 0 test(s). [ FAILED ] tests: 1 test(s), listed below: [ FAILED ] drivertest_pm ... [ RUN ] drivertest_posix_timer [ ERROR ] --- 2019 is not within the range [1990, 2010] [ LINE ] --- drivertest_posix_timer.c:162: error: Failure! [ FAILED ] drivertest_posix_timer [==========] tests: 1 test(s) run. [ PASSED ] 0 test(s). [ FAILED ] tests: 1 test(s), listed below: [ FAILED ] drivertest_posix_timer Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com> |
||
|---|---|---|
| .. | ||
| env | ||
| script | ||
| utils | ||
| pytest.ini | ||
| README.md | ||
Requirements
- Python 3.6 or above
- pexpect + minicom
- pytest
sudo apt-get install minicom
cd env
pip3 install -r requirements.txt
Pytest Original Parameter useage refer to help
Customized Parameters
pytest
-D specify device, for example: /dev/ttyUSB0
-B specify board, for example: sim,best1600_ep
-P specify nuttx path
-F specify filesystem, for example: /data
-L specify log path
-O specify ota version, for example: VELA-2.0
-S enable sudo as run sim
-C enable pre-checkin run
-U specify core: ap, audio, cp, sensor, tee
-M serial or minicom
-R specify target type: target|sim|qemu|module
Example
cd script
# testsuite
pytest test_[testsuite].py -D /dev/ttyUSBx -B <board> -L <logpath> -F <filesystem folder> -P <nuttx path> -R <target|sim|qemu|module>
# mark
pytest -m <mark_name> ./ -D /dev/ttyUSBx -B <board> -L <logpath> -F <filesystem folder> -P <nuttx path> -R <target|sim|qemu|module> --json=<logpath>/pytest.json
# sim
pytest -m sim ./ -B sim -P <nuttx path> -L <logpath> -F <filesystem folder> -P <nuttx path> -R <target|sim|qemu|module> --json=<logpath>/pytest.json
# stress test
pytest -m miwear ./ -B miwear -P <nuttx path> -L <logpath> -F <filesystem path> --json=<logpath>/pytest.json --count=100 --repeat-scope=session
Generate Report
cd utils/report
python3 report_gen.py -l <json log path> -b <branch>