From 2e072ad017cf41673e7f5a7ff44aebb4624e4ee7 Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Thu, 11 Apr 2024 17:23:50 +0800 Subject: [PATCH] ztest: include: unittest: relocate cpu.h and include only if unit-test The `cpu.h` is meant to be a hack around Zephyr's dependencies for unit-test, relocate it to a folder that's included only by unit-test. Signed-off-by: Yong Cong Sin --- cmake/modules/unittest.cmake | 1 + subsys/testsuite/ztest/{ => unittest}/include/zephyr/arch/cpu.h | 0 2 files changed, 1 insertion(+) rename subsys/testsuite/ztest/{ => unittest}/include/zephyr/arch/cpu.h (100%) diff --git a/cmake/modules/unittest.cmake b/cmake/modules/unittest.cmake index e9b767f5877..892358999cf 100644 --- a/cmake/modules/unittest.cmake +++ b/cmake/modules/unittest.cmake @@ -81,6 +81,7 @@ endforeach() list(APPEND INCLUDE subsys/testsuite/ztest/include/zephyr + subsys/testsuite/ztest/unittest/include subsys/testsuite/include/zephyr subsys/testsuite/ztest/include subsys/testsuite/include diff --git a/subsys/testsuite/ztest/include/zephyr/arch/cpu.h b/subsys/testsuite/ztest/unittest/include/zephyr/arch/cpu.h similarity index 100% rename from subsys/testsuite/ztest/include/zephyr/arch/cpu.h rename to subsys/testsuite/ztest/unittest/include/zephyr/arch/cpu.h