You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/06/29 14:31:09 UTC
(nuttx-apps) branch master updated: cmake:port testing applications to CMake build
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-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 20c0a7243 cmake:port testing applications to CMake build
20c0a7243 is described below
commit 20c0a7243c4ecfcdd65ed9e2976583e750fbfe21
Author: xuxin19 <xu...@xiaomi.com>
AuthorDate: Mon Mar 25 21:05:31 2024 +0800
cmake:port testing applications to CMake build
Signed-off-by: xuxin19 <xu...@xiaomi.com>
---
testing/{fstest => arch_libc}/CMakeLists.txt | 18 +-
testing/{fstest => atomic}/CMakeLists.txt | 18 +-
testing/{fstest => cachetest}/CMakeLists.txt | 18 +-
testing/cmocka/CMakeLists.txt | 91 ++++++
testing/{fstest => cpuload}/CMakeLists.txt | 18 +-
testing/crypto/CMakeLists.txt | 106 +++++++
testing/{fstest => cxxtest}/CMakeLists.txt | 16 +-
testing/drivertest/CMakeLists.txt | 346 ++++++++++++++++++++++
testing/{fstest => epoll}/CMakeLists.txt | 20 +-
testing/{fstest => fatutf8}/CMakeLists.txt | 18 +-
testing/{fstest => fdsantest}/CMakeLists.txt | 20 +-
testing/{fstest => fmemopen}/CMakeLists.txt | 16 +-
testing/fstest/CMakeLists.txt | 10 +-
testing/{fstest => gpu}/CMakeLists.txt | 37 ++-
testing/{fstest => irtest}/CMakeLists.txt | 21 +-
testing/{fstest => memstress}/CMakeLists.txt | 18 +-
testing/memtester/CMakeLists.txt | 64 ++++
testing/{fstest => mm}/CMakeLists.txt | 20 +-
testing/{fstest => monkey}/CMakeLists.txt | 21 +-
testing/{fstest => mtd_config_fs}/CMakeLists.txt | 18 +-
testing/{fstest => nand_sim}/CMakeLists.txt | 16 +-
testing/nist-sts/CMakeLists.txt | 77 +++++
testing/nxffs/CMakeLists.txt | 3 +-
testing/{fstest => open_memstream}/CMakeLists.txt | 16 +-
testing/{fstest => opus_ramtest}/CMakeLists.txt | 18 +-
testing/ostest/CMakeLists.txt | 5 +-
testing/ramtest/CMakeLists.txt | 14 +-
testing/{fstest => scanftest}/CMakeLists.txt | 18 +-
testing/{fstest => sensortest}/CMakeLists.txt | 18 +-
testing/{fstest => setest}/CMakeLists.txt | 16 +-
testing/{nxffs => smart}/CMakeLists.txt | 7 +-
testing/{fstest => smart_test}/CMakeLists.txt | 16 +-
testing/{fstest => stressapptest}/CMakeLists.txt | 41 ++-
33 files changed, 982 insertions(+), 197 deletions(-)
diff --git a/testing/fstest/CMakeLists.txt b/testing/arch_libc/CMakeLists.txt
similarity index 79%
copy from testing/fstest/CMakeLists.txt
copy to testing/arch_libc/CMakeLists.txt
index 6445c256b..52dcd1eab 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/arch_libc/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/arch_libc/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_ARCH_LIBC)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_ARCH_LIBC_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_ARCH_LIBC_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_ARCH_LIBC_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_ARCH_LIBC}
+ SRCS
+ arch_libc_test_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/atomic/CMakeLists.txt
similarity index 81%
copy from testing/fstest/CMakeLists.txt
copy to testing/atomic/CMakeLists.txt
index 6445c256b..7e0d9193a 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/atomic/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/atomic/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_ATOMIC)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_ATOMIC_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_ATOMIC_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_ATOMIC_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_ATOMIC}
+ SRCS
+ atomic_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/cachetest/CMakeLists.txt
similarity index 79%
copy from testing/fstest/CMakeLists.txt
copy to testing/cachetest/CMakeLists.txt
index 6445c256b..661887ab5 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/cachetest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/cachetest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_CACHETEST)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_CACHETEST_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_CACHETEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_CACHETEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CACHETEST}
+ SRCS
+ cachetest_main.c)
endif()
diff --git a/testing/cmocka/CMakeLists.txt b/testing/cmocka/CMakeLists.txt
new file mode 100644
index 000000000..11568513e
--- /dev/null
+++ b/testing/cmocka/CMakeLists.txt
@@ -0,0 +1,91 @@
+# ##############################################################################
+# apps/testing/cmocka/CMakeLists.txt
+#
+# 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.
+#
+# ##############################################################################
+
+if(CONFIG_TESTING_CMOCKA)
+
+ set(CMOCKA_DIR ${CMAKE_CURRENT_LIST_DIR}/cmocka)
+
+ if(NOT EXISTS ${CMOCKA_DIR})
+ set(CONFIG_CMOCKA_URL https://github.com/clibs/cmocka/archive)
+
+ FetchContent_Declare(
+ cmocka_fetch
+ URL ${CONFIG_CMOCKA_URL}/1.1.5.zip SOURCE_DIR
+ ${CMAKE_CURRENT_LIST_DIR}/cmocka BINARY_DIR
+ ${CMAKE_BINARY_DIR}/apps/testing/cmocka/cmocka
+ PATCH_COMMAND
+ patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/cmocka <
+ ${CMAKE_CURRENT_LIST_DIR}/0001-cmocka.c-Reduce-the-call-stack-consumption-of-printf.patch
+ && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/cmocka <
+ ${CMAKE_CURRENT_LIST_DIR}/0002-cmocka-feature-to-forwarding-cmocka-log-message-to-c.patch
+ && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/cmocka <
+ ${CMAKE_CURRENT_LIST_DIR}/0003-cmocka-update-method-for-strmatch-to-regex-and-add-list-all-testcases-function.patch
+ && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/cmocka <
+ ${CMAKE_CURRENT_LIST_DIR}/0004-cmocka-xml-report.patch && patch -p0 -d
+ ${CMAKE_CURRENT_LIST_DIR}/cmocka <
+ ${CMAKE_CURRENT_LIST_DIR}/0005-cmocka-cmocka_private-fix-warning-in-cmocka_private.patch
+ && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/cmocka <
+ ${CMAKE_CURRENT_LIST_DIR}/0006-fix-linux-risc-v-compile-error-list_initialize.patch
+ DOWNLOAD_NO_PROGRESS true
+ TIMEOUT 30)
+
+ FetchContent_GetProperties(cmocka_fetch)
+
+ if(NOT cmocka_fetch_POPULATED)
+ FetchContent_Populate(cmocka_fetch)
+ endif()
+ endif()
+
+ nuttx_add_library(cmocka)
+
+ file(GLOB SRCS ${CMOCKA_DIR}/src/*.c)
+
+ set(EXPORT_INCDIR ${CMOCKA_DIR}/include)
+ nuttx_export_header(TARGET cmocka INCLUDE_DIRECTORIES ${EXPORT_INCDIR})
+
+ set(INCDIR ${CMAKE_CURRENT_LIST_DIR} ${EXPORT_INCDIR})
+
+ set(CFLAGS -Dprint_error=nx_print_error -DCMOCKA_PLATFORM_INCLUDE
+ -DHAVE_CLOCK_REALTIME=1 -DHAVE_STRUCT_TIMESPEC=1)
+ if(CONFIG_TESTING_CMOCKA_LEAKDETECT)
+ list(APPEND CFLAGS -DUNIT_TESTING=ON)
+ endif()
+
+ target_sources(cmocka PRIVATE ${SRCS})
+ target_include_directories(cmocka PRIVATE ${INCDIR})
+ target_compile_options(cmocka PRIVATE ${CFLAGS})
+
+ nuttx_add_application(
+ NAME
+ ${CONFIG_TESTING_CMOCKA_PROGNAME}
+ PRIORITY
+ ${CONFIG_TESTING_CMOCKA_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_CMOCKA_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CMOCKA}
+ INCLUDE_DIRECTORIES
+ ${INCDIR}
+ SRCS
+ cmocka_main.c
+ DEPENDS
+ cmocka)
+
+endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/cpuload/CMakeLists.txt
similarity index 83%
copy from testing/fstest/CMakeLists.txt
copy to testing/cpuload/CMakeLists.txt
index 6445c256b..43e776cf6 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/cpuload/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/cpuload/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_CPULOAD)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ cpuload
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ 100
+ STACKSIZE
+ ${CONFIG_DEFAULT_TASK_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CPULOAD}
+ SRCS
+ cpuload_main.c)
endif()
diff --git a/testing/crypto/CMakeLists.txt b/testing/crypto/CMakeLists.txt
new file mode 100644
index 000000000..5db24386f
--- /dev/null
+++ b/testing/crypto/CMakeLists.txt
@@ -0,0 +1,106 @@
+# ##############################################################################
+# apps/testing/crypto/CMakeLists.txt
+#
+# 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.
+#
+# ##############################################################################
+
+if(CONFIG_TESTING_CRYPTO)
+ if(CONFIG_TESTING_CRYPTO_3DES_CBC)
+ nuttx_add_application(
+ NAME
+ des3cbc
+ PRIORITY
+ ${CONFIG_TESTING_CRYPTO_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_CRYPTO_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CRYPTO}
+ SRCS
+ 3descbc.c)
+ endif()
+
+ if(CONFIG_TESTING_CRYPTO_AES_XTS)
+ nuttx_add_application(
+ NAME
+ aesxts
+ PRIORITY
+ ${CONFIG_TESTING_CRYPTO_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_CRYPTO_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CRYPTO}
+ SRCS
+ aesxts.c)
+ endif()
+
+ if(CONFIG_TESTING_CRYPTO_AES_CTR)
+ nuttx_add_application(
+ NAME
+ aesctr
+ PRIORITY
+ ${CONFIG_TESTING_CRYPTO_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_CRYPTO_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CRYPTO}
+ SRCS
+ aesctr.c)
+ endif()
+
+ if(CONFIG_TESTING_CRYPTO_AES_CBC)
+ nuttx_add_application(
+ NAME
+ aescbc
+ PRIORITY
+ ${CONFIG_TESTING_CRYPTO_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_CRYPTO_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CRYPTO}
+ SRCS
+ aescbc.c)
+ endif()
+
+ if(CONFIG_TESTING_CRYPTO_HMAC)
+ nuttx_add_application(
+ NAME
+ hmac
+ PRIORITY
+ ${CONFIG_TESTING_CRYPTO_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_CRYPTO_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CRYPTO}
+ SRCS
+ hmac.c)
+ endif()
+
+ if(CONFIG_TESTING_CRYPTO_HASH)
+ nuttx_add_application(
+ NAME
+ hash
+ PRIORITY
+ ${CONFIG_TESTING_CRYPTO_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_CRYPTO_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CRYPTO}
+ SRCS
+ hash.c)
+ endif()
+
+endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/cxxtest/CMakeLists.txt
similarity index 82%
copy from testing/fstest/CMakeLists.txt
copy to testing/cxxtest/CMakeLists.txt
index 6445c256b..d893638cc 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/cxxtest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/cxxtest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,14 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_CXXTEST)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
+ cxxtest
STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
- PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_DEFAULT_TASK_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_CXXTEST}
+ SRCS
+ cxxtest_main.c)
endif()
diff --git a/testing/drivertest/CMakeLists.txt b/testing/drivertest/CMakeLists.txt
new file mode 100644
index 000000000..8b32aec3d
--- /dev/null
+++ b/testing/drivertest/CMakeLists.txt
@@ -0,0 +1,346 @@
+# ##############################################################################
+# apps/testing/drivertest/CMakeLists.txt
+#
+# 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.
+#
+# ##############################################################################
+
+if(CONFIG_TESTING_DRIVER_TEST)
+ if(CONFIG_TESTING_DRIVER_TEST_SIMPLE)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_simple
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_simple.c)
+ endif()
+
+ if(CONFIG_BCH)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_block
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ INCLUDE_DIRECTORIES
+ ${NUTTX_DIR}/fs
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_block.c)
+ endif()
+
+ if(CONFIG_RTC AND CONFIG_SIG_EVTHREAD)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_rtc
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_rtc.c)
+ endif()
+
+ if(CONFIG_TIMER)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_timer
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_timer.c)
+ endif()
+
+ if(CONFIG_ONESHOT)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_oneshot
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_oneshot.c)
+ endif()
+
+ if(NOT CONFIG_DISABLE_POSIX_TIMERS AND CONFIG_SIG_EVTHREAD)
+ nuttx_add_application(
+ NAME
+ cmocka_posix_timer
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_posix_timer.c)
+ endif()
+
+ if(CONFIG_WATCHDOG AND CONFIG_BOARDCTL_RESET_CAUSE)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_watchdog
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_watchdog.c)
+ endif()
+
+ if(CONFIG_PWM)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_pwm
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_pwm.c)
+ endif()
+
+ if(CONFIG_ADC)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_adc
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_adc.c)
+ endif()
+
+ if(CONFIG_I2C OR CONFIG_SPI)
+ if(CONFIG_SENSORS_BMI160)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_i2c_spi
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_i2c_spi.c)
+ endif()
+ endif()
+
+ if(CONFIG_DEV_GPIO)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_gpio
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_gpio.c)
+ endif()
+
+ if(CONFIG_RELAY)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_relay
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_relay.c)
+ endif()
+
+ if(CONFIG_SERIAL)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_uart
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_uart.c)
+ endif()
+
+ if(CONFIG_AUDIO)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_audio
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_audio.c)
+ endif()
+
+ if(CONFIG_CPUFREQ)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_cpufreq
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_cpufreq.c)
+ endif()
+
+ if(CONFIG_VIDEO_FB)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_framebuffer
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_framebuffer.c)
+ endif()
+
+ if(CONFIG_LCD_DEV)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_lcd
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_lcd.c)
+ endif()
+
+ if(CONFIG_REGULATOR)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_regulator
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_regulator.c)
+ endif()
+
+ if(CONFIG_LV_USE_NUTTX_TOUCHSCREEN)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_touchpanel
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_touchpanel.c)
+ endif()
+
+ if(CONFIG_PM_RUNTIME)
+ nuttx_add_application(
+ NAME
+ cmocka_driver_pm_runtime
+ PRIORITY
+ ${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_DRIVER_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ drivertest_pm_runtime.c)
+ endif()
+
+endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/epoll/CMakeLists.txt
similarity index 81%
copy from testing/fstest/CMakeLists.txt
copy to testing/epoll/CMakeLists.txt
index 6445c256b..082f421f6 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/epoll/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/epoll/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,18 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_EPOLL)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ cmocka_epoll
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_EPOLL_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_EPOLL_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_EPOLL}
+ DEPENDS
+ cmocka
+ SRCS
+ epoll.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/fatutf8/CMakeLists.txt
similarity index 80%
copy from testing/fstest/CMakeLists.txt
copy to testing/fatutf8/CMakeLists.txt
index 6445c256b..6facb8a67 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/fatutf8/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/fatutf8/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_FATUTF8)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_FATUTF8_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_FATUTF8_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_FATUTF8_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_FATUTF8}
+ SRCS
+ fatutf8_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/fdsantest/CMakeLists.txt
similarity index 76%
copy from testing/fstest/CMakeLists.txt
copy to testing/fdsantest/CMakeLists.txt
index 6445c256b..f83dadb9c 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/fdsantest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/fdsantest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,18 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_FDSAN_TEST AND CONFIG_TESTING_FDSAN_TEST_SIMPLE)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ cmocka_fdsan_simple
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_FDSAN_TEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_FDSAN_TEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_FDSAN_TEST}
+ DEPENDS
+ cmocka
+ SRCS
+ fdsantest_simple.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/fmemopen/CMakeLists.txt
similarity index 82%
copy from testing/fstest/CMakeLists.txt
copy to testing/fmemopen/CMakeLists.txt
index 6445c256b..65e69e652 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/fmemopen/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/fmemopen/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,14 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_FMEMOPEN_TEST)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
+ fmemopen_test
STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
- PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ 4096
+ MODULE
+ ${CONFIG_TESTING_FMEMOPEN_TEST}
+ SRCS
+ fmemopen.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/fstest/CMakeLists.txt
index 6445c256b..e9213987a 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/fstest/CMakeLists.txt
@@ -22,10 +22,12 @@ if(CONFIG_TESTING_FSTEST)
nuttx_add_application(
NAME
${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
+ PRIORITY
+ ${CONFIG_TESTING_FSTEST_PRIORITY}
STACKSIZE
${CONFIG_TESTING_FSTEST_STACKSIZE}
- PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ MODULE
+ ${CONFIG_TESTING_FSTEST}
+ SRCS
+ fstest_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/gpu/CMakeLists.txt
similarity index 58%
copy from testing/fstest/CMakeLists.txt
copy to testing/gpu/CMakeLists.txt
index 6445c256b..04006507e 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/gpu/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/gpu/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,35 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_GPU)
+ file(GLOB VG_LITE_SRCS vg_lite/*.c)
+ file(GLOB CURRENT_SRCS *.c)
+ list(REMOVE_ITEM CURRENT_SRCS gpu_main.c)
+
+ set(SRCS gpu_main.c ${CURRENT_SRCS} ${VG_LITE_SRCS})
+
+ set(INCDIR ${CMAKE_CURRENT_LIST_DIR})
+ if(CONFIG_TESTING_GPU_VG_LITE_INCLUDE)
+ list(APPEND INCDIR
+ ${NUTTX_APPS_DIR}/../${CONFIG_TESTING_GPU_VG_LITE_INCLUDE})
+ endif()
+
+ if(CONFIG_LIB_PNG)
+ list(APPEND INCDIR ${NUTTX_APPS_DIR}/../external/libpng
+ ${NUTTX_APPS_DIR}/../external/libpng/libpng)
+ endif()
+
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ gpu_test
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_GPU_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_GPU_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_GPU}
+ INCLUDE_DIRECTORIES
+ ${INCDIR}
+ SRCS
+ ${SRCS})
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/irtest/CMakeLists.txt
similarity index 74%
copy from testing/fstest/CMakeLists.txt
copy to testing/irtest/CMakeLists.txt
index 6445c256b..98d4e8c8e 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/irtest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/irtest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,19 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_IRTEST)
+ file(GLOB CURRENT_SRCS *.cxx)
+ list(REMOVE_ITEM CURRENT_SRCS main.cxx)
+ set(SRCS main.cxx ${CURRENT_SRCS})
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_IRTEST_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_IRTEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_IRTEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_IRTEST}
+ SRCS
+ ${SRCS})
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/memstress/CMakeLists.txt
similarity index 78%
copy from testing/fstest/CMakeLists.txt
copy to testing/memstress/CMakeLists.txt
index 6445c256b..e10d721d9 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/memstress/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/memstress/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_MEMORY_STRESS)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_MEMORY_STRESS_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_MEMORY_STRESS_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_MEMORY_STRESS_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_MEMORY_STRESS}
+ SRCS
+ memorystress_main.c)
endif()
diff --git a/testing/memtester/CMakeLists.txt b/testing/memtester/CMakeLists.txt
new file mode 100644
index 000000000..93f0e176d
--- /dev/null
+++ b/testing/memtester/CMakeLists.txt
@@ -0,0 +1,64 @@
+# ##############################################################################
+# apps/testing/memtester/CMakeLists.txt
+#
+# 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.
+#
+# ##############################################################################
+
+if(CONFIG_UTILS_MEMTESTER)
+
+ set(MEMTESTER_DIR ${CMAKE_CURRENT_LIST_DIR}/memtester)
+
+ if(NOT EXISTS ${MEMTESTER_DIR})
+ set(CONFIG_MEMTESTER_URL
+ https://github.com/jnavila/memtester/archive/refs/heads/master.zip)
+
+ FetchContent_Declare(
+ memtester_fetch
+ URL ${CONFIG_MEMTESTER_URL}SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/memtester
+ BINARY_DIR ${CMAKE_BINARY_DIR}/apps/testing/memtester/memtester
+ DOWNLOAD_NO_PROGRESS true
+ TIMEOUT 30)
+
+ FetchContent_GetProperties(memtester_fetch)
+
+ if(NOT memtester_fetch_POPULATED)
+ FetchContent_Populate(memtester_fetch)
+ endif()
+ endif()
+
+ set(SRCS ${MEMTESTER_DIR}/memtester.c ${MEMTESTER_DIR}/tests.c
+ ${MEMTESTER_DIR}/output.c)
+ set(CFLAGS)
+ if(CONFIG_UTILS_MEMTESTER_NARROW)
+ list(APPEND CFLAGS -DTEST_NARROW_WRITES)
+ endif()
+
+ nuttx_add_application(
+ NAME
+ ${CONFIG_UTILS_MEMTESTER_PROGNAME}
+ PRIORITY
+ ${CONFIG_UTILS_MEMTESTER_PRIORITY}
+ STACKSIZE
+ ${CONFIG_UTILS_MEMTESTER_STACKSIZE}
+ MODULE
+ ${CONFIG_UTILS_MEMTESTER}
+ COMPILE_FLAGS
+ ${CFLAGS}
+ SRCS
+ ${SRCS})
+
+endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/mm/CMakeLists.txt
similarity index 79%
copy from testing/fstest/CMakeLists.txt
copy to testing/mm/CMakeLists.txt
index 6445c256b..2c6f069fe 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/mm/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/mm/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,18 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_MM)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_MM_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_MM_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_MM_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_MM}
+ INCLUDE_DIRECTORIES
+ ${NUTTX_DIR}/mm/mm_heap
+ SRCS
+ mm_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/monkey/CMakeLists.txt
similarity index 76%
copy from testing/fstest/CMakeLists.txt
copy to testing/monkey/CMakeLists.txt
index 6445c256b..e97ca78e0 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/monkey/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/monkey/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,19 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_MONKEY)
+ file(GLOB CURRENT_SRCS *.c)
+ list(REMOVE_ITEM CURRENT_SRCS monkey_main.c)
+ set(SRCS monkey_main.c ${CURRENT_SRCS})
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ monkey
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_MONKEY_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_MONKEY_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_MONKEY}
+ SRCS
+ ${SRCS})
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/mtd_config_fs/CMakeLists.txt
similarity index 75%
copy from testing/fstest/CMakeLists.txt
copy to testing/mtd_config_fs/CMakeLists.txt
index 6445c256b..75397385d 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/mtd_config_fs/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/mtd_config_fs/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE}
+ SRCS
+ mtd_config_fs_test_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/nand_sim/CMakeLists.txt
similarity index 82%
copy from testing/fstest/CMakeLists.txt
copy to testing/nand_sim/CMakeLists.txt
index 6445c256b..68994ebd3 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/nand_sim/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/nand_sim/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,14 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_NAND_SIM)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
+ nand
STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
- PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_NAND_SIM_STACK}
+ MODULE
+ ${CONFIG_TESTING_NAND_SIM}
+ SRCS
+ nand_sim_main.c)
endif()
diff --git a/testing/nist-sts/CMakeLists.txt b/testing/nist-sts/CMakeLists.txt
new file mode 100644
index 000000000..a0a6cf5f0
--- /dev/null
+++ b/testing/nist-sts/CMakeLists.txt
@@ -0,0 +1,77 @@
+# ##############################################################################
+# apps/testing/nist-sts/CMakeLists.txt
+#
+# 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.
+#
+# ##############################################################################
+
+if(CONFIG_TESTING_NIST_STS)
+
+ set(NIST_DIR ${CMAKE_CURRENT_LIST_DIR}/nist-sts)
+
+ if(NOT EXISTS ${NIST_DIR})
+ set(CONFIG_NIST_URL
+ https://csrc.nist.gov/CSRC/media/Projects/Random-Bit-Generation/documents/sts-2_1_2.zip
+ )
+
+ FetchContent_Declare(
+ nist-sts_fetch
+ URL ${CONFIG_NIST_URL} SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/nist-sts
+ BINARY_DIR ${CMAKE_BINARY_DIR}/apps/testing/nist-sts/nist-sts
+ PATCH_COMMAND
+ patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/nist-sts <
+ ${CMAKE_CURRENT_LIST_DIR}/0001-Solve-the-memory-out-of-bounds-problem-in-sts.patch
+ && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/nist-sts <
+ ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-bug-that-crash-in-running-a-single-test-after-ru.patch
+ DOWNLOAD_NO_PROGRESS true
+ TIMEOUT 30)
+
+ FetchContent_GetProperties(nist-sts_fetch)
+
+ if(NOT nist-sts_fetch_POPULATED)
+ FetchContent_Populate(nist-sts_fetch)
+ endif()
+ endif()
+
+ file(GLOB NIST_SRCS ${NIST_DIR}/sts/src/*.c)
+ list(REMOVE_ITEM NIST_SRCS ${NIST_DIR}/sts/src/assess.c)
+
+ set(SRCS ${NIST_DIR}/sts/src/assess.c ${NIST_SRCS})
+
+ set(CFLAGS
+ -Wno-misleading-indentation
+ -Wno-unused-but-set-variable
+ -Wno-strict-prototypes
+ -Wno-undef
+ -Wno-shadow
+ -Wno-unused-variable
+ -Wno-maybe-uninitialized)
+
+ nuttx_add_application(
+ NAME
+ ${CONFIG_TESTING_NIST_STS_PROGNAME}
+ PRIORITY
+ ${CONFIG_TESTING_NIST_STS_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_NIST_STS_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_NIST_STS}
+ COMPILE_FLAGS
+ ${CFLAGS}
+ SRCS
+ ${SRCS})
+
+endif()
diff --git a/testing/nxffs/CMakeLists.txt b/testing/nxffs/CMakeLists.txt
index 208acb83e..17b18b2b1 100644
--- a/testing/nxffs/CMakeLists.txt
+++ b/testing/nxffs/CMakeLists.txt
@@ -19,5 +19,6 @@
# ##############################################################################
if(CONFIG_TESTING_NXFFS)
- nuttx_add_application(NAME nxffs SRCS nxffs_main.c)
+ nuttx_add_application(NAME nxffs MODULE ${CONFIG_TESTING_NXFFS} SRCS
+ nxffs_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/open_memstream/CMakeLists.txt
similarity index 82%
copy from testing/fstest/CMakeLists.txt
copy to testing/open_memstream/CMakeLists.txt
index 6445c256b..fad47958e 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/open_memstream/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/open_memstream/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,14 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_OPEN_MEMSTREAM)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
+ open_memstream_test
STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
- PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ 4096
+ MODULE
+ ${CONFIG_TESTING_FMEMOPEN_TEST}
+ SRCS
+ open_memstream.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/opus_ramtest/CMakeLists.txt
similarity index 80%
copy from testing/fstest/CMakeLists.txt
copy to testing/opus_ramtest/CMakeLists.txt
index 6445c256b..91a517e03 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/opus_ramtest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/opus_ramtest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_OPUS_RAMTEST)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ opus_ramtest
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_OPUS_RAMTEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_OPUS_RAMTEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_OPUS_RAMTEST}
+ SRCS
+ opus_ramtest_main.c)
endif()
diff --git a/testing/ostest/CMakeLists.txt b/testing/ostest/CMakeLists.txt
index f0f882c7d..d40da5d4f 100644
--- a/testing/ostest/CMakeLists.txt
+++ b/testing/ostest/CMakeLists.txt
@@ -143,8 +143,7 @@ if(CONFIG_TESTING_OSTEST)
list(APPEND SRCS smp_call.c)
endif()
- target_sources(apps PRIVATE ${SRCS})
-
- nuttx_add_application(NAME ostest SRCS ostest_main.c)
+ set(OSTEST_SRCS ostest_main.c ${SRCS})
+ nuttx_add_application(NAME ostest SRCS ${OSTEST_SRCS})
endif()
diff --git a/testing/ramtest/CMakeLists.txt b/testing/ramtest/CMakeLists.txt
index 73c09ba38..de27cd89f 100644
--- a/testing/ramtest/CMakeLists.txt
+++ b/testing/ramtest/CMakeLists.txt
@@ -18,6 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_RAMTEST)
- nuttx_add_application(NAME ramtest)
+if(CONFIG_SYSTEM_RAMTEST)
+ nuttx_add_application(
+ NAME
+ ${CONFIG_TESTING_RAMTEST_PROGNAME}
+ PRIORITY
+ ${CONFIG_TESTING_RAMTEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_RAMTEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_RAMTEST}
+ SRCS
+ ramtest.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/scanftest/CMakeLists.txt
similarity index 79%
copy from testing/fstest/CMakeLists.txt
copy to testing/scanftest/CMakeLists.txt
index 6445c256b..02b966fbf 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/scanftest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/scanftest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_SCANFTEST)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_SCANFTEST_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_SCANFTEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_SCANFTEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_SCANFTEST}
+ SRCS
+ scanftest_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/sensortest/CMakeLists.txt
similarity index 79%
copy from testing/fstest/CMakeLists.txt
copy to testing/sensortest/CMakeLists.txt
index 6445c256b..aa8283523 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/sensortest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/sensortest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_SENSORTEST)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_SENSORTEST_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_SENSORTEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_SENSORTEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_SENSORTEST}
+ SRCS
+ sensortest.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/setest/CMakeLists.txt
similarity index 83%
copy from testing/fstest/CMakeLists.txt
copy to testing/setest/CMakeLists.txt
index 6445c256b..42951c451 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/setest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/setest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,14 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_SETEST)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ ${CONFIG_TESTING_SETEST_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_SETEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_SETEST_STACKSIZE}
+ SRCS
+ setest.c)
endif()
diff --git a/testing/nxffs/CMakeLists.txt b/testing/smart/CMakeLists.txt
similarity index 84%
copy from testing/nxffs/CMakeLists.txt
copy to testing/smart/CMakeLists.txt
index 208acb83e..dc4ea7280 100644
--- a/testing/nxffs/CMakeLists.txt
+++ b/testing/smart/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/nxffs/CMakeLists.txt
+# apps/testing/smart/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,6 +18,7 @@
#
# ##############################################################################
-if(CONFIG_TESTING_NXFFS)
- nuttx_add_application(NAME nxffs SRCS nxffs_main.c)
+if(CONFIG_TESTING_SMART)
+ nuttx_add_application(NAME smart MODULE ${CONFIG_TESTING_SMART} SRCS
+ smart_main.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/smart_test/CMakeLists.txt
similarity index 82%
copy from testing/fstest/CMakeLists.txt
copy to testing/smart_test/CMakeLists.txt
index 6445c256b..b1448da17 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/smart_test/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/smart_test/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,14 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_SMART_TEST)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
+ smart_test
STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
- PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ 4096
+ MODULE
+ ${CONFIG_TESTING_SMART_TEST}
+ SRCS
+ smart_test.c)
endif()
diff --git a/testing/fstest/CMakeLists.txt b/testing/stressapptest/CMakeLists.txt
similarity index 57%
copy from testing/fstest/CMakeLists.txt
copy to testing/stressapptest/CMakeLists.txt
index 6445c256b..3e49865fe 100644
--- a/testing/fstest/CMakeLists.txt
+++ b/testing/stressapptest/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# apps/testing/fstest/CMakeLists.txt
+# apps/testing/stressapptest/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
@@ -18,14 +18,39 @@
#
# ##############################################################################
-if(CONFIG_TESTING_FSTEST)
+if(CONFIG_TESTING_STRESSAPPTEST)
+
+ set(SRC_DIR ${CMAKE_CURRENT_LIST_DIR}/stressapptest/src)
+
+ set(SRCS
+ ${SRC_DIR}/main.cc
+ ${SRC_DIR}/adler32memcpy.cc
+ ${SRC_DIR}/disk_blocks.cc
+ ${SRC_DIR}/error_diag.cc
+ ${SRC_DIR}/finelock_queue.cc
+ ${SRC_DIR}/logger.cc
+ ${SRC_DIR}/os.cc
+ ${SRC_DIR}/os_factory.cc
+ ${SRC_DIR}/pattern.cc
+ ${SRC_DIR}/queue.cc
+ ${SRC_DIR}/sat.cc
+ ${SRC_DIR}/sat_factory.cc
+ ${SRC_DIR}/worker.cc)
+
+ set(FLAGS -DHAVE_CONFIG_H -fpermissive)
+
nuttx_add_application(
NAME
- ${CONFIG_TESTING_FSTEST_PROGNAME}
- SRCS
- fstest_main.c
- STACKSIZE
- ${CONFIG_TESTING_FSTEST_STACKSIZE}
+ stressapptest
PRIORITY
- ${CONFIG_TESTING_FSTEST_PRIORITY})
+ ${CONFIG_TESTING_STRESSAPPTEST_PRIORITY}
+ STACKSIZE
+ ${CONFIG_TESTING_STRESSAPPTEST_STACKSIZE}
+ MODULE
+ ${CONFIG_TESTING_STRESSAPPTEST}
+ COMPILE_FLAGS
+ ${FLAGS}
+ SRCS
+ ${SRCS})
+
endif()