Przeglądaj źródła

ci: add rsource test app

Renz Bagaporo 5 lat temu
rodzic
commit
f77eeb34d5

+ 6 - 0
tools/test_apps/build_system/rsource_test/CMakeLists.txt

@@ -0,0 +1,6 @@
+# The following lines of boilerplate have to be in your project's
+# CMakeLists in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(rsource_test)

+ 5 - 0
tools/test_apps/build_system/rsource_test/Kconfig.extra

@@ -0,0 +1,5 @@
+menu "RSOURCE test"
+    config RSOURCE_EXTRA_CONFIG
+        bool "rsource extra config"
+        default y
+endmenu

+ 8 - 0
tools/test_apps/build_system/rsource_test/Makefile

@@ -0,0 +1,8 @@
+#
+# This is a project Makefile. It is assumed the directory this Makefile resides in is a
+# project subdirectory.
+#
+
+PROJECT_NAME := rsource_test
+
+include $(IDF_PATH)/make/project.mk

+ 1 - 0
tools/test_apps/build_system/rsource_test/README.txt

@@ -0,0 +1 @@
+This project tests that use of rsource in Kconfig files. The main component will source a Kconfig file depending on the target (IDF_TARGET), which in turn will source a Kconfig file in the project directory -- all specified via relative paths.

+ 6 - 0
tools/test_apps/build_system/rsource_test/main/CMakeLists.txt

@@ -0,0 +1,6 @@
+idf_component_register(SRCS "test_main.c"
+                       INCLUDE_DIRS ".")
+
+if(NOT CONFIG_RSOURCE_EXTRA_CONFIG)
+    message(FATAL_ERROR "RSOURCE config not included")
+endif()

+ 1 - 0
tools/test_apps/build_system/rsource_test/main/Kconfig

@@ -0,0 +1 @@
+rsource "port/$IDF_TARGET/Kconfig"

+ 3 - 0
tools/test_apps/build_system/rsource_test/main/component.mk

@@ -0,0 +1,3 @@
+ifndef CONFIG_RSOURCE_EXTRA_CONFIG
+    $(error RSOURCE config not included)
+endif

+ 1 - 0
tools/test_apps/build_system/rsource_test/main/port/esp32/Kconfig

@@ -0,0 +1 @@
+rsource "../../../Kconfig.extra"

+ 1 - 0
tools/test_apps/build_system/rsource_test/main/port/esp32s2/Kconfig

@@ -0,0 +1 @@
+rsource "../../../Kconfig.extra"

+ 3 - 0
tools/test_apps/build_system/rsource_test/main/test_main.c

@@ -0,0 +1,3 @@
+void app_main(void)
+{
+}