PPengxiang Hao (James)Update test_cmocka.py
4bb06d3f创建于 2025年8月11日历史提交
文件最后提交记录最后更新时间
1 年前
11 个月前
11 个月前
1 年前
1 年前
README

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
    -P  specify nuttx path
    -F  specify filesystem, for example: /data
    -L  specify log path
    -O  specify ota version
    -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

# Generate Report
```bash
cd utils/report
python3 report_gen.py -l <json log path> -b <branch>