diff --git a/.github/workflows/buildmgr.yml b/.github/workflows/buildmgr.yml index 5ecf7f147..dbc86bdd8 100644 --- a/.github/workflows/buildmgr.yml +++ b/.github/workflows/buildmgr.yml @@ -308,6 +308,7 @@ jobs: CI_CBUILD_INSTALLER: ${{ github.workspace }}/cbuild_install.sh CMSIS_PACK_ROOT: ${{ github.workspace }}/packs GCC_TOOLCHAIN_ROOT: ${{ github.workspace }}/${{ matrix.toolchain_root }} + GCC_TOOLCHAIN_10_3_1: ${{ github.workspace }}/${{ matrix.toolchain_root }} CI_ARCH: ${{ matrix.arch }} strategy: #fail-fast: true diff --git a/tools/buildmgr/cbuild/src/CbuildModel.cpp b/tools/buildmgr/cbuild/src/CbuildModel.cpp index 159727ffc..233ec5656 100644 --- a/tools/buildmgr/cbuild/src/CbuildModel.cpp +++ b/tools/buildmgr/cbuild/src/CbuildModel.cpp @@ -473,10 +473,9 @@ bool CbuildModel::GetCompatibleToolchain(const string& name, const string& versi } if (selectedVersion.empty()) { - // no compatible registered toolchain was found, search for a suitable config file - if (GetToolchainConfig(toolchainConfigFiles, name, versionRange)) { - return true; - } + // no compatible registered toolchain was found + LogMsg("M616", VAL("NAME", name)); + return false; } else { // registered toolchain was found m_toolchainRegisteredVersion = selectedVersion; diff --git a/tools/buildmgr/cbuild/src/CbuildMsgs.cpp b/tools/buildmgr/cbuild/src/CbuildMsgs.cpp index c60c85ee2..4a398471b 100644 --- a/tools/buildmgr/cbuild/src/CbuildMsgs.cpp +++ b/tools/buildmgr/cbuild/src/CbuildMsgs.cpp @@ -82,6 +82,7 @@ void InitMessageTable() table["M613"] = MessageEntry(MsgLevel::LEVEL_ERROR, CRLF_B, "File '%PATH%' has unexpected format!" ); table["M614"] = MessageEntry(MsgLevel::LEVEL_ERROR, CRLF_B, "Missing access sequence delimiter: '%ACCSEQDELIM%'!" ); table["M615"] = MessageEntry(MsgLevel::LEVEL_ERROR, CRLF_B, "%PROP% '%VAL%' was not found in the loaded packs!" ); + table["M616"] = MessageEntry(MsgLevel::LEVEL_ERROR, CRLF_B, "compiler registration environment variable missing, format: %NAME%_TOOLCHAIN___"); table["M630"] = MessageEntry(MsgLevel::LEVEL_WARNING, CRLF_B, "Device '%DEV%' is substituted with variant '%VAR%'." ); table["M631"] = MessageEntry(MsgLevel::LEVEL_WARNING, CRLF_B, "Project must have exactly one target element!" ); diff --git a/tools/buildmgr/test/testinput/Examples/GCC/AccessSequence/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/AccessSequence/CMakeLists.txt.ref index c5c418b48..bce7200ba 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/AccessSequence/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/AccessSequence/CMakeLists.txt.ref @@ -128,6 +128,8 @@ set(CXX_FLAGS_C:/Temp/devtools/tools/buildmgr/test/testinput/Examples/GCC/Access # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/Asm/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/Asm/CMakeLists.txt.ref index d71d1e226..cc0008533 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/Asm/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/Asm/CMakeLists.txt.ref @@ -125,6 +125,8 @@ set(AS_FLAGS_C:/sandbox/devtools/build/TestOutput/TestData/Examples/GCC/Asm/GAS. # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/BranchProtection/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/BranchProtection/CMakeLists.txt.ref index 59fb28a5c..5babc7e73 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/BranchProtection/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/BranchProtection/CMakeLists.txt.ref @@ -48,6 +48,8 @@ set(LIB_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "10.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/Build_GCC/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/Build_GCC/CMakeLists.txt.ref index 20b794d70..a64f0b3b5 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/Build_GCC/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/Build_GCC/CMakeLists.txt.ref @@ -51,6 +51,8 @@ set(LIB_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/Build_GPP/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/Build_GPP/CMakeLists.txt.ref index 01b5306f5..2c5992eac 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/Build_GPP/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/Build_GPP/CMakeLists.txt.ref @@ -55,6 +55,8 @@ set(LIB_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/DupFilename/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/DupFilename/CMakeLists.txt.ref index 73e841408..a2c739818 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/DupFilename/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/DupFilename/CMakeLists.txt.ref @@ -32,6 +32,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/FlagOrder/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/FlagOrder/CMakeLists.txt.ref index 84e43bfe2..588b3d560 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/FlagOrder/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/FlagOrder/CMakeLists.txt.ref @@ -38,6 +38,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/Flags/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/Flags/CMakeLists.txt.ref index 4e489fec0..9e6c6f35e 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/Flags/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/Flags/CMakeLists.txt.ref @@ -55,6 +55,8 @@ set(CC_FLAGS_C:/Users/Test/AppData/Local/Arm/Packs/ARM/CMSIS/5.8.0/CMSIS/RTOS2/R # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/Library/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/Library/CMakeLists.txt.ref index aad8ba2a5..4bf51fd1f 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/Library/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/Library/CMakeLists.txt.ref @@ -35,6 +35,8 @@ set(CXX_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "10.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.2.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/LibraryCustom/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/LibraryCustom/CMakeLists.txt.ref index 7fbdaa13d..ef8b072d3 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/LibraryCustom/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/LibraryCustom/CMakeLists.txt.ref @@ -35,6 +35,8 @@ set(CXX_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "10.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.2.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessing/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessing/CMakeLists.txt.ref index dc08aae58..58e5185c9 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessing/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessing/CMakeLists.txt.ref @@ -45,6 +45,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessingDefines/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessingDefines/CMakeLists.txt.ref index c60f56998..3bc4efbc2 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessingDefines/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessingDefines/CMakeLists.txt.ref @@ -62,6 +62,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessingSrcFile/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessingSrcFile/CMakeLists.txt.ref index 67d4e16ec..a594b8ddb 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessingSrcFile/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/LinkerPreProcessingSrcFile/CMakeLists.txt.ref @@ -39,6 +39,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/Minimal/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/Minimal/CMakeLists.txt.ref index b7e832e7e..a264c126e 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/Minimal/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/Minimal/CMakeLists.txt.ref @@ -40,6 +40,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/NestedGroups/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/NestedGroups/CMakeLists.txt.ref index c555e4a1e..062e10ceb 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/NestedGroups/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/NestedGroups/CMakeLists.txt.ref @@ -70,6 +70,8 @@ set(CC_FLAGS_C:/sandbox/devtools/build/TestOutput/TestData/Examples/GCC/NestedGr # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/Pre Include/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/Pre Include/CMakeLists.txt.ref index 0f38920e7..9a11b3ff6 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/Pre Include/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/Pre Include/CMakeLists.txt.ref @@ -62,6 +62,8 @@ set(PRE_INC_LOCAL_C:/Users/Test/AppData/Local/Arm/Packs/Keil/PreIncludeTestPack/ # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/RelativePath/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/RelativePath/CMakeLists.txt.ref index 78e5832d9..40c29168d 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/RelativePath/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/RelativePath/CMakeLists.txt.ref @@ -42,6 +42,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.3.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/StandardLibrary/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/StandardLibrary/CMakeLists.txt.ref index 2303f80bc..92d72760a 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/StandardLibrary/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/StandardLibrary/CMakeLists.txt.ref @@ -39,6 +39,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/devtools/tools/buildmgr/cbuildgen/config/GCC.10.3.1.cmake") include ("C:/sandbox/devtools/tools/buildmgr/cbuildgen/config/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project1/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project1/CMakeLists.txt.ref index 7f2daf316..8f8e1bdad 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project1/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project1/CMakeLists.txt.ref @@ -102,6 +102,8 @@ set(CXX_FLAGS_C:/Sandbox/devtools-external/build/testoutput/GCC/TranslationContr # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.2.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project2/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project2/CMakeLists.txt.ref index 10d16d6cd..fac806402 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project2/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project2/CMakeLists.txt.ref @@ -124,6 +124,8 @@ set(CXX_FLAGS_C:/Sandbox/devtools-external/build/testoutput/GCC/TranslationContr # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.2.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project3/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project3/CMakeLists.txt.ref index a5eaf1a94..1800c1328 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project3/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/TranslationControl/Project3/CMakeLists.txt.ref @@ -68,6 +68,8 @@ set(CXX_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "10.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.2.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/TrustZone/CM33_ns/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/TrustZone/CM33_ns/CMakeLists.txt.ref index 0685f81ab..21f4a95ca 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/TrustZone/CM33_ns/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/TrustZone/CM33_ns/CMakeLists.txt.ref @@ -49,6 +49,8 @@ set(LIB_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "9.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.2.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/TrustZone/CM33_s/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/TrustZone/CM33_s/CMakeLists.txt.ref index 422ea29ec..8d8a33088 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/TrustZone/CM33_s/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/TrustZone/CM33_s/CMakeLists.txt.ref @@ -43,6 +43,8 @@ set(CC_SRC_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "10.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.2.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/testinput/Examples/GCC/Whitespace/CMakeLists.txt.ref b/tools/buildmgr/test/testinput/Examples/GCC/Whitespace/CMakeLists.txt.ref index 82a5bc506..1083bd85d 100644 --- a/tools/buildmgr/test/testinput/Examples/GCC/Whitespace/CMakeLists.txt.ref +++ b/tools/buildmgr/test/testinput/Examples/GCC/Whitespace/CMakeLists.txt.ref @@ -48,6 +48,8 @@ set(LIB_FILES # Toolchain config map +set(REGISTERED_TOOLCHAIN_ROOT "C:/Compilers/GCC/10.3.1/bin") +set(REGISTERED_TOOLCHAIN_VERSION "10.3.1") set(TOOLCHAIN_VERSION_MIN "10.2.1") include ("C:/sandbox/cbuild/etc/GCC.10.2.1.cmake") include ("C:/sandbox/cbuild/etc/CMSIS-Build-Utils.cmake") diff --git a/tools/buildmgr/test/unittests/src/CbuildModelTests.cpp b/tools/buildmgr/test/unittests/src/CbuildModelTests.cpp index 6550e6606..f5abbf57d 100644 --- a/tools/buildmgr/test/unittests/src/CbuildModelTests.cpp +++ b/tools/buildmgr/test/unittests/src/CbuildModelTests.cpp @@ -14,22 +14,19 @@ class CbuildModelTests : public CbuildModel, public ::testing::Test { }; -TEST_F(CbuildModelTests, GetCompatibleToolchain_Select_Latest) { +TEST_F(CbuildModelTests, GetCompatibleToolchain_NotRegistered) { string name = "AC6", versionRange = "6.5.0:6.18.0", dir; string toolchainDir = testinput_folder + "/toolchain"; - string expectedToolchainVersion = "6.16.0"; - string expectedToolchainConfig = toolchainDir + "/AC6.6.16.0.cmake"; - RteFsUtils::NormalizePath(expectedToolchainConfig); vector envVars; - // Select latest compatible toolchain + // Check not registered toolchains ASSERT_TRUE(RteFsUtils::CreateDirectories(toolchainDir)); ASSERT_TRUE(RteFsUtils::CreateTextFile(toolchainDir + "/AC6.6.6.4.cmake", "")); ASSERT_TRUE(RteFsUtils::CreateTextFile(toolchainDir + "/AC6.6.16.0.cmake", "")); ASSERT_TRUE(RteFsUtils::CreateTextFile(toolchainDir + "/GCC.6.19.0.cmake", "")); - EXPECT_TRUE(GetCompatibleToolchain(name, versionRange, toolchainDir, envVars)); - EXPECT_EQ(m_toolchainConfigVersion, expectedToolchainVersion); - EXPECT_EQ(m_toolchainConfig, expectedToolchainConfig); + EXPECT_FALSE(GetCompatibleToolchain(name, versionRange, toolchainDir, envVars)); + EXPECT_TRUE(m_toolchainConfigVersion.empty()); + EXPECT_TRUE(m_toolchainConfig.empty()); ASSERT_TRUE(RteFsUtils::RemoveDir(toolchainDir)); } @@ -61,25 +58,6 @@ TEST_F(CbuildModelTests, GetCompatibleToolchain_Invalid_Files) { ASSERT_TRUE(RteFsUtils::RemoveDir(toolchainDir)); } -TEST_F(CbuildModelTests, GetCompatibleToolchain_Select_Latest_recursively) { - string name = "AC6", versionRange = "6.5.0:6.18.0", dir; - string toolchainDir = testinput_folder + "/toolchain"; - string expectedToolchainVersion = "6.16.0"; - string expectedToolchainConfig = toolchainDir + "/Test/AC6.6.16.0.cmake"; - RteFsUtils::NormalizePath(expectedToolchainConfig); - vector envVars; - - // Select latest compatible toolchain - ASSERT_TRUE(RteFsUtils::CreateDirectories(toolchainDir+"/Test")); - ASSERT_TRUE(RteFsUtils::CreateTextFile(toolchainDir + "/Test/AC6.6.6.4.cmake", "")); - ASSERT_TRUE(RteFsUtils::CreateTextFile(toolchainDir + "/Test/AC6.6.16.0.cmake", "")); - ASSERT_TRUE(RteFsUtils::CreateTextFile(toolchainDir + "/Test/GCC.6.19.0.cmake", "")); - EXPECT_TRUE(GetCompatibleToolchain(name, versionRange, toolchainDir, envVars)); - EXPECT_EQ(m_toolchainConfigVersion, expectedToolchainVersion); - EXPECT_EQ(m_toolchainConfig, expectedToolchainConfig); - ASSERT_TRUE(RteFsUtils::RemoveDir(toolchainDir)); -} - TEST_F(CbuildModelTests, GetCompatibleToolchain_Registered) { string name = "AC6", versionRange = "6.17.0:6.18.0", dir; string toolchainDir = testinput_folder + "/toolchain";