Skip to content

Commit ccdb45e

Browse files
authored
Merge pull request #869 from david-cermak/fix/test_build_v6.0
fix(CI): Fix test component dir after IDFv6.0 update
2 parents ecb7dae + 18418c8 commit ccdb45e

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# The following four lines of boilerplate have to be in your project's CMakeLists
22
# in this exact order for cmake to work correctly
33
cmake_minimum_required(VERSION 3.16)
4-
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/tools/unit-test-app/components)
54

65
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6+
7+
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "6.0")
8+
set(test_component_dir $ENV{IDF_PATH}/tools/test_apps/components)
9+
else()
10+
set(test_component_dir $ENV{IDF_PATH}/tools/unit-test-app/components)
11+
endif()
12+
13+
set(EXTRA_COMPONENT_DIRS ${test_component_dir})
14+
715
project(test_app)
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
# This is the project CMakeLists.txt file for the test subproject
22
cmake_minimum_required(VERSION 3.16)
33

4+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
5+
6+
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "6.0")
7+
set(test_component_dir $ENV{IDF_PATH}/tools/test_apps/components)
8+
else()
9+
set(test_component_dir $ENV{IDF_PATH}/tools/unit-test-app/components)
10+
endif()
11+
412
set(EXTRA_COMPONENT_DIRS ../../esp_websocket_client
5-
"$ENV{IDF_PATH}/tools/unit-test-app/components")
13+
${test_component_dir})
614

7-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
815
project(websocket_unit_test)
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# This is the project CMakeLists.txt file for the test subproject
22
cmake_minimum_required(VERSION 3.16)
33

4-
set(EXTRA_COMPONENT_DIRS ../.. "$ENV{IDF_PATH}/tools/unit-test-app/components")
5-
64
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
5+
6+
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "6.0")
7+
set(test_component_dir $ENV{IDF_PATH}/tools/test_apps/components)
8+
else()
9+
set(test_component_dir $ENV{IDF_PATH}/tools/unit-test-app/components)
10+
endif()
11+
12+
set(EXTRA_COMPONENT_DIRS ../..
13+
${test_component_dir})
14+
715
project(mdns_test)

0 commit comments

Comments
 (0)