From ff7fce9739027b5760e9a218a7b3be652e6dc584 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Fri, 7 Apr 2023 10:41:58 +0800 Subject: [PATCH] ci: fixed custom partition table subtype test not compiling for linux --- .../custom_partition_subtypes/CMakeLists.txt | 9 +++++++-- .../custom_partition_subtypes/main/CMakeLists.txt | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/test_apps/build_system/custom_partition_subtypes/CMakeLists.txt b/tools/test_apps/build_system/custom_partition_subtypes/CMakeLists.txt index 5735e62225..0153334d81 100644 --- a/tools/test_apps/build_system/custom_partition_subtypes/CMakeLists.txt +++ b/tools/test_apps/build_system/custom_partition_subtypes/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +set(COMPONENTS main partition_table custom) project(custom_partition_subtypes) @@ -20,6 +21,10 @@ add_custom_command(OUTPUT ${blank_file} ${partition_size} ${blank_file}) add_custom_target(blank_bin ALL DEPENDS ${blank_file}) -add_dependencies(flash blank_bin) -esptool_py_flash_to_partition(flash "${partition}" "${blank_file}") +idf_build_get_property(target IDF_TARGET) + +if(NOT ${target} STREQUAL "linux") + add_dependencies(flash blank_bin) + esptool_py_flash_to_partition(flash "${partition}" "${blank_file}") +endif() diff --git a/tools/test_apps/build_system/custom_partition_subtypes/main/CMakeLists.txt b/tools/test_apps/build_system/custom_partition_subtypes/main/CMakeLists.txt index f7785d060c..ce71e8127d 100644 --- a/tools/test_apps/build_system/custom_partition_subtypes/main/CMakeLists.txt +++ b/tools/test_apps/build_system/custom_partition_subtypes/main/CMakeLists.txt @@ -1,2 +1,3 @@ -idf_component_register(SRCS test_main.c) +idf_component_register(SRCS test_main.c + REQUIRES esp_partition) target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")