This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit cb87a19d7dced14a22319c87da4bb2257d9384f3 Author: p-szafonimateusz <[email protected]> AuthorDate: Fri Jan 2 11:53:19 2026 +0100 boards/rv-virt/citest: migrate to NTFC migrate rv-virt/citest to NTFC test cases Signed-off-by: p-szafonimateusz <[email protected]> --- .../qemu-rv/rv-virt/configs/citest/config.yaml | 15 ++++++ .../qemu-rv/rv-virt/configs/citest/defconfig | 1 + .../risc-v/qemu-rv/rv-virt/configs/citest/run.sh | 63 +++++++++++++++++++++- .../qemu-rv/rv-virt/configs/citest/session.json | 13 +++++ 4 files changed, 91 insertions(+), 1 deletion(-) diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest/config.yaml b/boards/risc-v/qemu-rv/rv-virt/configs/citest/config.yaml new file mode 100644 index 00000000000..a934a55c82d --- /dev/null +++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest/config.yaml @@ -0,0 +1,15 @@ +config: + cwd: './' + +product: + name: "rv-virt" + cores: + core0: + name: 'main' + device: 'qemu' + exec_path: 'qemu-system-riscv32' + exec_args: '-semihosting -M virt,aclint=on -smp 1 -bios none -nographic + -drive index=0,id=userdata,if=none,format=raw,file=./fatfs.img + -device virtio-blk-device,bus=virtio-mmio-bus.0,drive=userdata' + conf_path: './.config' + elf_path: './nuttx' diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig index 4c3a48c5653..c711d7defe2 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig @@ -123,6 +123,7 @@ CONFIG_START_YEAR=2021 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_POPEN=y +CONFIG_SYSTEM_SETLOGMASK=y CONFIG_TESTING_CMOCKA=y CONFIG_TESTING_CXXTEST=y CONFIG_TESTING_FMEMOPEN_TEST=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest/run.sh b/boards/risc-v/qemu-rv/rv-virt/configs/citest/run.sh deleted file mode 120000 index c9e283cbeb0..00000000000 --- a/boards/risc-v/qemu-rv/rv-virt/configs/citest/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../../../tools/ci/cirun.sh \ No newline at end of file diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest/run.sh b/boards/risc-v/qemu-rv/rv-virt/configs/citest/run.sh new file mode 100755 index 00000000000..02d15ac6b2b --- /dev/null +++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest/run.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +############################################################################ +# boards/risc-v/qemu-rv/rv-virt/configs/citest64/run.sh +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +set -o xtrace + +# start from nuttx dir +olddir=$(pwd) +nuttdir=${CURRENTCONFDIR}/../../../../../../ +cd ${nuttdir} + +# prepare env +dd if=/dev/zero of=fatfs.img bs=512 count=128K +mkfs.fat fatfs.img +chmod 777 ./fatfs.img + +# enable venv +source ${NTFCDIR}/venv/bin/activate + +# run NTFC +confpath=${CURRENTCONFDIR}/config.yaml +jsonconf=${CURRENTCONFDIR}/session.json +testpath=${NTFCDIR}/external/nuttx-testing +python3 -m ntfc test --testpath=${testpath} --confpath=${confpath} --jsonconf=${jsonconf} + +ret="$?" +echo $ret + +# disable venv +deactivate + +# export test results +artifacts=${ARTIFACTCONFDIR}/ntfc +mkdir -p ${artifacts} +mv pytest.debug.log ${artifacts} +mv result ${artifacts} + +rm -f fatfs.img + +# restore old dir +cd ${olddir} + +exit $ret diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest/session.json b/boards/risc-v/qemu-rv/rv-virt/configs/citest/session.json new file mode 100644 index 00000000000..2a8c05d05da --- /dev/null +++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest/session.json @@ -0,0 +1,13 @@ +{ + "module": { + "include_module": [], + "exclude_module": + [ + "Nuttx_System_Fs_Fs" + ], + "order": [] + }, + "args": { + "kv": [] + } +}
