mirror of
https://github.com/apache/nuttx.git
synced 2026-09-11 03:16:45 +00:00
Documentation: add instructions how to run NTFC locally
add instructions how to run NTFC locally Assisted-by: Claude Code Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
parent
179bf35fdd
commit
6ffbbbd39d
1 changed files with 51 additions and 0 deletions
|
|
@ -23,6 +23,57 @@ CI runtime test cases use NTFC. Configurations with an NTFC runner include:
|
|||
- :doc:`arm64/qemu </platforms/arm64/qemu/boards/qemu-armv8a/index>`: ``qemu-armv8a/citest``
|
||||
- :doc:`arm64/qemu </platforms/arm64/qemu/boards/qemu-armv8a/index>`: ``qemu-armv8a/citest_smp``
|
||||
|
||||
Running a CI Test Target Locally
|
||||
================================
|
||||
|
||||
Run NTFC from the top-level NuttX source directory. The relative paths in a
|
||||
target's ``config.yaml`` file, including the NuttX configuration and image
|
||||
paths, are resolved from that directory. A working NuttX build environment
|
||||
and any emulator or hardware required by the target must already be available.
|
||||
|
||||
Create a Python 3.10 or newer virtual environment and install the NTFC and test
|
||||
case versions currently used by NuttX CI:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ python3 -m venv ../ntfc-venv
|
||||
$ . ../ntfc-venv/bin/activate
|
||||
$ python -m pip install ntfc==0.0.1
|
||||
$ git clone --branch release-0.0.2 --depth 1 \
|
||||
https://github.com/apache/nuttx-ntfc-testing ../nuttx-ntfc-testing
|
||||
|
||||
Build the target in the usual way. For example, the simulator CI
|
||||
configuration uses the Make build:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ ./tools/configure.sh sim:citest
|
||||
$ make
|
||||
|
||||
Configurations whose ``config.yaml`` refers to ``./build/nuttx`` require an
|
||||
out-of-tree CMake build instead. For example, build ``qemu-armv8a:citest``
|
||||
with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ cmake -B build -DBOARD_CONFIG=qemu-armv8a:citest -GNinja
|
||||
$ cmake --build build
|
||||
|
||||
Then pass the test case checkout and the target's NTFC configuration files to
|
||||
NTFC. For ``sim:citest`` this is:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ python -m ntfc test \
|
||||
--testpath=../nuttx-ntfc-testing \
|
||||
--confpath=boards/sim/sim/sim/configs/citest/config.yaml \
|
||||
--jsonconf=boards/sim/sim/sim/configs/citest/session.json
|
||||
|
||||
For another target, replace the build target and both configuration paths with
|
||||
the files from that target's ``configs/<configuration>`` directory. NTFC
|
||||
selects the applicable tests from the NuttX configuration and image and stores
|
||||
the test results under ``result/`` by default.
|
||||
|
||||
NTFC exports test logs as CI artifacts. This allows test logs (including
|
||||
:doc:`ostest </applications/testing/ostest/index>` output) to be downloaded
|
||||
directly from the CI for all targets where the ``citest`` configuration is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue