Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Created December 10, 2024 10:55
Show Gist options
  • Save lupyuen/b39d4d3f0627ed0a140ba154c8cac7eb to your computer and use it in GitHub Desktop.
Save lupyuen/b39d4d3f0627ed0a140ba154c8cac7eb to your computer and use it in GitHub Desktop.
## Pytest
cd $HOME/nuttx-build-farm
./run-job-macos.sh risc-v-05
exit
# $ ps aux | grep qemu
# qemu-system-riscv32 -M virt -bios ./nuttx -nographic -drive index=0,id=userdata,if=none,format=raw,file=./fatfs.img -device virtio-blk-device,bus=virtio-mmio-bus.0,drive=userdata
# tee /private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/rv-virt_20241210_184405.log
# /bin/bash -c qemu-system-riscv32 -M virt -bios ./nuttx -nographic -drive index=0,id=userdata,if=none,format=raw,file=./fatfs.img -device virtio-blk-device,bus=virtio-mmio-bus.0,drive=userdata | tee /private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/rv-virt_20241210_184405.log
# /opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/Resources/Python.app/Contents/MacOS/Python -m pytest -m qemu or rv_virt ./ -B rv-virt -P /private/tmp/run-job-macos/nuttx -L /private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu -R qemu -C --json=/private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/pytest.json
# bash /private/tmp/run-job-macos/nuttx/../nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/run
## ls -l /tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu
## cp /tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/* .
## rv-virt_20241210_175024.log
## python3 -m pytest -m qemu or rv_virt ./ -B rv-virt -P /private/tmp/run-job-macos/nuttx -L /private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu -R qemu -C --json=/private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/pytest.json
## python3 \
## -m pytest \
## -m qemu or rv_virt ./ \
## -B rv-virt \
## -P /private/tmp/run-job-macos/nuttx \
## -L /private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu \
## -R qemu \
## -C \
## --json=/private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/pytest.json
## cd /private/tmp/run-job-macos/nuttx/tools/ci/testrun/script
## python3 -m pytest -m 'qemu or rv_virt' ./ -B rv-virt -P /private/tmp/run-job-macos/nuttx -L /private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu -R qemu -C --json=/private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/pytest.json
cd tools/ci/testrun/script
python3 -m venv .venv
source .venv/bin/activate
pip3 install pytest pexpect serial
cd /private/tmp/run-job-macos/nuttx/tools/ci/testrun/script
python3 -m pytest -m 'qemu or rv_virt' ./ -B rv-virt -P /private/tmp/run-job-macos/nuttx -L /private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu -R qemu -C
exit
python3 \
-m pytest \
-m 'qemu or rv_virt' ./ \
-B rv-virt \
-P /private/tmp/run-job-macos/nuttx \
-L /private/tmp/run-job-macos/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu \
-R qemu \
-C
exit
python3 \
-m pytest \
-m 'qemu or rv_virt' ./ \
-B rv-virt \
-P $HOME/riscv/nuttx \
-L $HOME/riscv/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu \
-R qemu \
-C \
--json=$HOME/riscv/nuttx/boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/pytest.json
exit
python3 -m venv .venv
source .venv/bin/activate
pip3 install pytest
python3 \
-m pytest \
-m 'qemu or rv_virt' ./ \
-B rv-virt \
-P . \
-L boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu \
-R qemu \
-C \
--json=boards/risc-v/qemu-rv/rv-virt/configs/citest/logs/rv-virt/qemu/pytest.json
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment