diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index 53401f4..aaf79a9 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -45,7 +45,7 @@ jobs: - name: Run tests run: | - west build -b native_sim -t run tests -p + west build -b native_sim -t run tests/app -p - name: Run driver tests run: | diff --git a/tests/Kconfig b/tests/Kconfig deleted file mode 100644 index 6669869..0000000 --- a/tests/Kconfig +++ /dev/null @@ -1,2 +0,0 @@ - -rsource "../app/Kconfig" diff --git a/tests/.gitignore b/tests/app/.gitignore similarity index 100% rename from tests/.gitignore rename to tests/app/.gitignore diff --git a/tests/CMakeLists.txt b/tests/app/CMakeLists.txt similarity index 76% rename from tests/CMakeLists.txt rename to tests/app/CMakeLists.txt index d0788f9..fc587a5 100644 --- a/tests/CMakeLists.txt +++ b/tests/app/CMakeLists.txt @@ -1,8 +1,8 @@ # Copyright (c) The Libre Solar Project Contributors # SPDX-License-Identifier: Apache-2.0 -set(BOARD_ROOT ${CMAKE_SOURCE_DIR}/..) -set(DTS_ROOT ${CMAKE_SOURCE_DIR}/..) +set(BOARD_ROOT ${CMAKE_SOURCE_DIR}/../..) +set(DTS_ROOT ${CMAKE_SOURCE_DIR}/../..) #set(BOARD "native_posix") #set(ZEPHYR_TOOLCHAIN_VARIANT "host") @@ -15,16 +15,16 @@ add_definitions(-DUNIT_TEST=1) add_definitions(-DUNITY_OUTPUT_COLOR) add_definitions(-DUNITY_EXCLUDE_SETJMP) -add_subdirectory(../app/src build/app) +add_subdirectory(../../app/src build/app) zephyr_include_directories(./src) -zephyr_include_directories(../app/src) +zephyr_include_directories(../../app/src) -zephyr_include_directories(../../modules/thingset/src) -zephyr_include_directories(../../modules/unity/src) +zephyr_include_directories(../../../modules/thingset/src) +zephyr_include_directories(../../../modules/unity/src) target_sources(app PRIVATE - ../../modules/unity/src/unity.c + ../../../modules/unity/src/unity.c src/main.cpp src/tests_bat_charger.cpp src/tests_daq.cpp diff --git a/tests/app/Kconfig b/tests/app/Kconfig new file mode 100644 index 0000000..2e9957e --- /dev/null +++ b/tests/app/Kconfig @@ -0,0 +1,2 @@ + +rsource "../../app/Kconfig" diff --git a/tests/boards/native_sim.overlay b/tests/app/boards/native_sim.overlay similarity index 100% rename from tests/boards/native_sim.overlay rename to tests/app/boards/native_sim.overlay diff --git a/tests/prj.conf b/tests/app/prj.conf similarity index 100% rename from tests/prj.conf rename to tests/app/prj.conf diff --git a/tests/src/daq_stub.h b/tests/app/src/daq_stub.h similarity index 100% rename from tests/src/daq_stub.h rename to tests/app/src/daq_stub.h diff --git a/tests/src/main.cpp b/tests/app/src/main.cpp similarity index 100% rename from tests/src/main.cpp rename to tests/app/src/main.cpp diff --git a/tests/src/tests.h b/tests/app/src/tests.h similarity index 100% rename from tests/src/tests.h rename to tests/app/src/tests.h diff --git a/tests/src/tests_bat_charger.cpp b/tests/app/src/tests_bat_charger.cpp similarity index 100% rename from tests/src/tests_bat_charger.cpp rename to tests/app/src/tests_bat_charger.cpp diff --git a/tests/src/tests_daq.cpp b/tests/app/src/tests_daq.cpp similarity index 100% rename from tests/src/tests_daq.cpp rename to tests/app/src/tests_daq.cpp diff --git a/tests/src/tests_dcdc.cpp b/tests/app/src/tests_dcdc.cpp similarity index 100% rename from tests/src/tests_dcdc.cpp rename to tests/app/src/tests_dcdc.cpp diff --git a/tests/src/tests_device_status.cpp b/tests/app/src/tests_device_status.cpp similarity index 100% rename from tests/src/tests_device_status.cpp rename to tests/app/src/tests_device_status.cpp diff --git a/tests/src/tests_load.cpp b/tests/app/src/tests_load.cpp similarity index 100% rename from tests/src/tests_load.cpp rename to tests/app/src/tests_load.cpp diff --git a/tests/src/tests_power_port.cpp b/tests/app/src/tests_power_port.cpp similarity index 100% rename from tests/src/tests_power_port.cpp rename to tests/app/src/tests_power_port.cpp