Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,13 @@
- any-glob-to-any-file: 'CMakeLists.txt'
- any-glob-to-any-file: 'cmake/**'
- any-glob-to-any-file: 'tools/*.mk'
- any-glob-to-any-file: 'tools/*.sh'

"Area: CI":
- changed-files:
- any-glob-to-any-file: '.github/**'
- any-glob-to-any-file: 'tools/ci/**'
- any-glob-to-any-file: 'tools/testbuild.sh'

"Area: Crypto":
- changed-files:
Expand Down
2 changes: 2 additions & 0 deletions Documentation/testing/citests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ CI migration to NTFC is in progress. Configurations currently using NTFC:
- risc-v/qemu-rv: ``rv-virt/citest``
- sim/sim: ``sim/citest``
- arm/imx6: ``sabre-6quad/citest``
- arm64/qemu: ``qemu-armv8a/citest``
- arm64/qemu: ``qemu-armv8a/citest_smp``

NTFC exports test logs as CI artifacts. This allows test logs (including ``ostest``
output) to be downloaded directly from the CI for all targets where the ``citest``
Expand Down
16 changes: 16 additions & 0 deletions boards/arm64/qemu/qemu-armv8a/configs/citest/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
config:
cwd: './'

product:
name: "qemu-armv8a"
cores:
core0:
name: 'main'
device: 'qemu'
exec_path: 'qemu-system-aarch64'
exec_args: '-cpu cortex-a53 -nographic
-machine virt,virtualization=on,gic-version=3
-net none -chardev stdio,id=con,mux=on
-serial chardev:con -mon chardev=con,mode=readline'
conf_path: './build/.config'
elf_path: './build/nuttx'
2 changes: 2 additions & 0 deletions boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CONFIG_EXAMPLES_HELLO=y
CONFIG_EXPERIMENTAL=y
CONFIG_FS_PROCFS=y
CONFIG_FS_ROMFS=y
CONFIG_FS_TMPFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=8192
Expand Down Expand Up @@ -54,6 +55,7 @@ CONFIG_START_MONTH=3
CONFIG_START_YEAR=2022
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_SETLOGMASK=y
CONFIG_SYSTEM_SYSTEM=y
CONFIG_SYSTEM_TIME64=y
CONFIG_TESTING_GETPRIME=y
Expand Down
55 changes: 55 additions & 0 deletions boards/arm64/qemu/qemu-armv8a/configs/citest/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
############################################################################
# boards/arm64/qemu/qemu-armv8a/configs/citest/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}

# 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}

# restore old dir
cd ${olddir}

exit $ret
13 changes: 13 additions & 0 deletions boards/arm64/qemu/qemu-armv8a/configs/citest/session.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"module": {
"include_module": [],
"exclude_module":
[
"Nuttx_System_Fs_Fs"
],
"order": []
},
"args": {
"kv": []
}
}
16 changes: 16 additions & 0 deletions boards/arm64/qemu/qemu-armv8a/configs/citest_smp/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
config:
cwd: './'

product:
name: "qemu-armv8a-smp"
cores:
core0:
name: 'main'
device: 'qemu'
exec_path: 'qemu-system-aarch64'
exec_args: '-cpu cortex-a53 -nographic -smp 4
-machine virt,virtualization=on,gic-version=3
-net none -chardev stdio,id=con,mux=on
-serial chardev:con -mon chardev=con,mode=readline'
conf_path: './build/.config'
elf_path: './build/nuttx'
2 changes: 2 additions & 0 deletions boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CONFIG_EXAMPLES_HELLO=y
CONFIG_EXPERIMENTAL=y
CONFIG_FS_PROCFS=y
CONFIG_FS_ROMFS=y
CONFIG_FS_TMPFS=y
CONFIG_IDLETHREAD_STACKSIZE=16384
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
Expand All @@ -50,6 +51,7 @@ CONFIG_START_MONTH=3
CONFIG_START_YEAR=2022
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_SETLOGMASK=y
CONFIG_SYSTEM_SYSTEM=y
CONFIG_SYSTEM_TASKSET=y
CONFIG_SYSTEM_TIME64=y
Expand Down
55 changes: 55 additions & 0 deletions boards/arm64/qemu/qemu-armv8a/configs/citest_smp/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
############################################################################
# boards/arm64/qemu/qemu-armv8a/configs/citest_smp/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}

# 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}

# restore old dir
cd ${olddir}

exit $ret
13 changes: 13 additions & 0 deletions boards/arm64/qemu/qemu-armv8a/configs/citest_smp/session.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"module": {
"include_module": [],
"exclude_module":
[
"Nuttx_System_Fs_Fs"
],
"order": []
},
"args": {
"kv": []
}
}
2 changes: 1 addition & 1 deletion tools/testbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ function refresh {
}

function run {
if [ ${RUN} -ne 0 ] && [ -z ${cmake} ]; then
if [ ${RUN} -ne 0 ]; then
run_script="$path/run.sh"
if [ -x $run_script ]; then
echo " Running NuttX..."
Expand Down
Loading