From 6b5698a4ec8d5cad044f08a80327e55e5cdedbf3 Mon Sep 17 00:00:00 2001 From: Crazypedia Date: Sun, 5 Jul 2026 13:02:57 -0400 Subject: [PATCH] fix(tests): repair stale TestFile.h includes and stop hardcoding g++ in test CMakeLists PR #550 moved TestFile.h from Tests/TactilityCore to Tests/Tactility, but AppManifestParsingTest.cpp and PropertiesFileTest.cpp still include the old path, so the test build fails on main. The per-suite 'set(CMAKE_CXX_COMPILER g++)' lines override whatever compiler the build was configured with. On hosts where /usr/bin/g++ is older than the project's C++23 baseline (e.g. g++ 11), the tests then fail to compile (static operator() in MessageQueue.h/Semaphore.h) even though the firmware itself builds fine with the configured toolchain. Removing the override lets the tests inherit the top-level compiler as usual. Co-Authored-By: Claude Fable 5 --- Tests/Tactility/CMakeLists.txt | 1 - Tests/Tactility/Source/AppManifestParsingTest.cpp | 2 +- Tests/Tactility/Source/PropertiesFileTest.cpp | 2 +- Tests/TactilityFreeRtos/CMakeLists.txt | 1 - Tests/TactilityKernel/CMakeLists.txt | 1 - Tests/crypt-module/CMakeLists.txt | 2 -- 6 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Tests/Tactility/CMakeLists.txt b/Tests/Tactility/CMakeLists.txt index 79d3fb7fb..c31fd46e5 100644 --- a/Tests/Tactility/CMakeLists.txt +++ b/Tests/Tactility/CMakeLists.txt @@ -2,7 +2,6 @@ project(TactilityTests) enable_language(C CXX ASM) -set(CMAKE_CXX_COMPILER g++) file(GLOB_RECURSE TEST_SOURCES ${PROJECT_SOURCE_DIR}/Source/*.cpp) add_executable(TactilityTests EXCLUDE_FROM_ALL ${TEST_SOURCES}) diff --git a/Tests/Tactility/Source/AppManifestParsingTest.cpp b/Tests/Tactility/Source/AppManifestParsingTest.cpp index e57565b0c..7b83c2698 100644 --- a/Tests/Tactility/Source/AppManifestParsingTest.cpp +++ b/Tests/Tactility/Source/AppManifestParsingTest.cpp @@ -1,4 +1,4 @@ -#include "../../TactilityCore/Source/TestFile.h" +#include "TestFile.h" #include "../../Tactility/Private/Tactility/app/AppManifestParsing.h" #include "../../Tactility/Private/Tactility/app/AppManifestParsingInternal.h" diff --git a/Tests/Tactility/Source/PropertiesFileTest.cpp b/Tests/Tactility/Source/PropertiesFileTest.cpp index fdf467d63..a8f7d7c6f 100644 --- a/Tests/Tactility/Source/PropertiesFileTest.cpp +++ b/Tests/Tactility/Source/PropertiesFileTest.cpp @@ -1,4 +1,4 @@ -#include "../../TactilityCore/Source/TestFile.h" +#include "TestFile.h" #include "../../Tactility/Include/Tactility/file/PropertiesFile.h" #include "doctest.h" diff --git a/Tests/TactilityFreeRtos/CMakeLists.txt b/Tests/TactilityFreeRtos/CMakeLists.txt index a2558f8ef..312fc056e 100644 --- a/Tests/TactilityFreeRtos/CMakeLists.txt +++ b/Tests/TactilityFreeRtos/CMakeLists.txt @@ -2,7 +2,6 @@ project(TactilityFreeRtosTests) enable_language(C CXX ASM) -set(CMAKE_CXX_COMPILER g++) file(GLOB_RECURSE TEST_SOURCES ${PROJECT_SOURCE_DIR}/Source/*.cpp) add_executable(TactilityFreeRtosTests EXCLUDE_FROM_ALL ${TEST_SOURCES}) diff --git a/Tests/TactilityKernel/CMakeLists.txt b/Tests/TactilityKernel/CMakeLists.txt index c75098f9a..b57060f36 100644 --- a/Tests/TactilityKernel/CMakeLists.txt +++ b/Tests/TactilityKernel/CMakeLists.txt @@ -2,7 +2,6 @@ project(TactilityKernelTests) enable_language(C CXX ASM) -set(CMAKE_CXX_COMPILER g++) file(GLOB_RECURSE TEST_SOURCES ${PROJECT_SOURCE_DIR}/Source/*.cpp) add_executable(TactilityKernelTests EXCLUDE_FROM_ALL ${TEST_SOURCES}) diff --git a/Tests/crypt-module/CMakeLists.txt b/Tests/crypt-module/CMakeLists.txt index 49b662477..407a13532 100644 --- a/Tests/crypt-module/CMakeLists.txt +++ b/Tests/crypt-module/CMakeLists.txt @@ -2,8 +2,6 @@ project(CryptModuleTests) enable_language(C CXX ASM) -set(CMAKE_CXX_COMPILER g++) - file(GLOB_RECURSE TEST_SOURCES ${PROJECT_SOURCE_DIR}/Source/*.cpp) add_executable(CryptModuleTests EXCLUDE_FROM_ALL ${TEST_SOURCES})