Skip to content

Commit 988ff81

Browse files
CI: enable NTFC tests for qemu-armv8a (arm64)
Enable NTFC for qemu-armv8a (arm64). QEMU for aarch64 architecture should be already on Docker image, so it should work. Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
1 parent 47c7169 commit 988ff81

8 files changed

Lines changed: 170 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
config:
2+
cwd: './'
3+
4+
product:
5+
name: "qemu-armv8a"
6+
cores:
7+
core0:
8+
name: 'main'
9+
device: 'qemu'
10+
exec_path: 'qemu-system-aarch64'
11+
exec_args: '-cpu cortex-a53 -nographic
12+
-machine virt,virtualization=on,gic-version=3
13+
-net none -chardev stdio,id=con,mux=on
14+
-serial chardev:con -mon chardev=con,mode=readline'
15+
conf_path: './build/.config'
16+
elf_path: './build/nuttx'

boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ CONFIG_EXAMPLES_HELLO=y
2626
CONFIG_EXPERIMENTAL=y
2727
CONFIG_FS_PROCFS=y
2828
CONFIG_FS_ROMFS=y
29+
CONFIG_FS_TMPFS=y
2930
CONFIG_HAVE_CXX=y
3031
CONFIG_HAVE_CXXINITIALIZE=y
3132
CONFIG_IDLETHREAD_STACKSIZE=8192
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
############################################################################
3+
# boards/arm64/qemu/qemu-armv8a/configs/citest/run.sh
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
# Licensed to the Apache Software Foundation (ASF) under one or more
8+
# contributor license agreements. See the NOTICE file distributed with
9+
# this work for additional information regarding copyright ownership. The
10+
# ASF licenses this file to you under the Apache License, Version 2.0 (the
11+
# "License"); you may not use this file except in compliance with the
12+
# License. You may obtain a copy of the License at
13+
#
14+
# http://www.apache.org/licenses/LICENSE-2.0
15+
#
16+
# Unless required by applicable law or agreed to in writing, software
17+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
19+
# License for the specific language governing permissions and limitations
20+
# under the License.
21+
#
22+
############################################################################
23+
24+
set -o xtrace
25+
26+
# start from nuttx dir
27+
olddir=$(pwd)
28+
nuttdir=${CURRENTCONFDIR}/../../../../../../
29+
cd ${nuttdir}
30+
31+
# enable venv
32+
source ${NTFCDIR}/venv/bin/activate
33+
34+
# run NTFC
35+
confpath=${CURRENTCONFDIR}/config.yaml
36+
jsonconf=${CURRENTCONFDIR}/session.json
37+
testpath=${NTFCDIR}/external/nuttx-testing
38+
python3 -m ntfc test --testpath=${testpath} --confpath=${confpath} --jsonconf=${jsonconf}
39+
40+
ret="$?"
41+
echo $ret
42+
43+
# disable venv
44+
deactivate
45+
46+
# export test results
47+
artifacts=${ARTIFACTCONFDIR}/ntfc
48+
mkdir -p ${artifacts}
49+
mv pytest.debug.log ${artifacts}
50+
mv result ${artifacts}
51+
52+
# restore old dir
53+
cd ${olddir}
54+
55+
exit $ret
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"module": {
3+
"include_module": [],
4+
"exclude_module":
5+
[
6+
"Nuttx_System_Fs_Fs"
7+
],
8+
"order": []
9+
},
10+
"args": {
11+
"kv": []
12+
}
13+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
config:
2+
cwd: './'
3+
4+
product:
5+
name: "qemu-armv8a-smp"
6+
cores:
7+
core0:
8+
name: 'main'
9+
device: 'qemu'
10+
exec_path: 'qemu-system-aarch64'
11+
exec_args: '-cpu cortex-a53 -nographic -smp 4
12+
-machine virt,virtualization=on,gic-version=3
13+
-net none -chardev stdio,id=con,mux=on
14+
-serial chardev:con -mon chardev=con,mode=readline'
15+
conf_path: './build/.config'
16+
elf_path: './build/nuttx'

boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ CONFIG_EXAMPLES_HELLO=y
2626
CONFIG_EXPERIMENTAL=y
2727
CONFIG_FS_PROCFS=y
2828
CONFIG_FS_ROMFS=y
29+
CONFIG_FS_TMPFS=y
2930
CONFIG_IDLETHREAD_STACKSIZE=16384
3031
CONFIG_INIT_ENTRYPOINT="nsh_main"
3132
CONFIG_INTELHEX_BINARY=y
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
############################################################################
3+
# boards/arm64/qemu/qemu-armv8a/configs/citest_smp/run.sh
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
# Licensed to the Apache Software Foundation (ASF) under one or more
8+
# contributor license agreements. See the NOTICE file distributed with
9+
# this work for additional information regarding copyright ownership. The
10+
# ASF licenses this file to you under the Apache License, Version 2.0 (the
11+
# "License"); you may not use this file except in compliance with the
12+
# License. You may obtain a copy of the License at
13+
#
14+
# http://www.apache.org/licenses/LICENSE-2.0
15+
#
16+
# Unless required by applicable law or agreed to in writing, software
17+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
19+
# License for the specific language governing permissions and limitations
20+
# under the License.
21+
#
22+
############################################################################
23+
24+
set -o xtrace
25+
26+
# start from nuttx dir
27+
olddir=$(pwd)
28+
nuttdir=${CURRENTCONFDIR}/../../../../../../
29+
cd ${nuttdir}
30+
31+
# enable venv
32+
source ${NTFCDIR}/venv/bin/activate
33+
34+
# run NTFC
35+
confpath=${CURRENTCONFDIR}/config.yaml
36+
jsonconf=${CURRENTCONFDIR}/session.json
37+
testpath=${NTFCDIR}/external/nuttx-testing
38+
python3 -m ntfc test --testpath=${testpath} --confpath=${confpath} --jsonconf=${jsonconf}
39+
40+
ret="$?"
41+
echo $ret
42+
43+
# disable venv
44+
deactivate
45+
46+
# export test results
47+
artifacts=${ARTIFACTCONFDIR}/ntfc
48+
mkdir -p ${artifacts}
49+
mv pytest.debug.log ${artifacts}
50+
mv result ${artifacts}
51+
52+
# restore old dir
53+
cd ${olddir}
54+
55+
exit $ret
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"module": {
3+
"include_module": [],
4+
"exclude_module":
5+
[
6+
"Nuttx_System_Fs_Fs"
7+
],
8+
"order": []
9+
},
10+
"args": {
11+
"kv": []
12+
}
13+
}

0 commit comments

Comments
 (0)