a9183756-gh / Arduino-CMake-Toolchain

CMake toolchain for all Arduino compatible boards
MIT License
135 stars 40 forks source link

Esp32 tests fail #52

Open michal-kowalczyk opened 2 years ago

michal-kowalczyk commented 2 years ago

I found that support for ESP32 is broken (most likely due to changes on Espressif end).

I run unit tests for ESP32:

cmake ../Arduino-CMake-Toolchain/Tests/
ctest -R esp32.esp32 --verbose

Here's one of errors:

3:         Start   3: esp32.esp32
3: 
3: 3: Test command: /bin/sh "/home/michalkowalczyk/room-access/stasik/toolchain-test/Arduino-CMake-Toolchain/Tests/RunTestWrapper.sh" "/home/michalkowalczyk/room-access/stasik/toolchain-test/Test/test_results/esp32.esp32/esp32.esp32" "/usr/bin/cmake" "-D" "CMAKE_GENERATOR=Unix Makefiles" "-D" "ARDUINO_TOOLCHAIN_DIR=/home/michalkowalczyk/room-access/stasik/toolchain-test/Arduino-CMake-Toolchain" "-D" "ARDUINO_BUILD_ROOT_DIR=/home/michalkowalczyk/room-access/stasik/toolchain-test/Test/build/esp32.esp32" "-D" "ARDUINO_SYSTEM_ROOT_DIR=/home/michalkowalczyk/room-access/stasik/toolchain-test/Test/toolchain/esp32.esp32" "-D" "ARDUINO_RESULT_ROOT_DIR=/home/michalkowalczyk/room-access/stasik/toolchain-test/Test/test_results/esp32.esp32" "-D" "ARDUINO_BOARD_OPTIONS_FILE=" "-D" "ARDUINO_BOARD_ID=esp32.esp32" "-D" "ARDUINO_PKG_MGR_DL_CACHE=/home/michalkowalczyk/room-access/stasik/toolchain-test/Test/_pkg_mgr/downloads" "-D" "ARDUINO_SKIP_REGULAR_EXPRESSION=" "-P" "/home/michalkowalczyk/room-access/stasik/toolchain-test/Arduino-CMake-Toolchain/Tests/RunBoardTest.cmake"
3: 3: Test timeout computed to be: 1500
3: 3: COMMAND /usr/bin/cmake -G Unix Makefiles -D CMAKE_TOOLCHAIN_FILE=/home/michalkowalczyk/room-access/stasik/toolchain-test/Arduino-CMake-Toolchain/Arduino-toolchain.cmake -D ARDUINO_SYSTEM_FILE=/home/michalkowalczyk/room-access/stasik/toolchain-test/Test/toolchain/esp32.esp32/esp32.esp32/ArduinoSystem.cmake -D CMAKE_VERBOSE_MAKEFILE=TRUE /home/michalkowalczyk/room-access/stasik/toolchain-test/Arduino-CMake-Toolchain/Examples/01_hello_world WORKING_DIRECTORY /home/michalkowalczyk/room-access/stasik/toolchain-test/Test/build/esp32.esp32/esp32.esp32 OUTPUT_VARIABLE _configure_content ERROR_VARIABLE _configure_content RESULT_VARIABLE _result
3: 3: -- The CXX compiler identification is unknown
3: 3: -- Indexing Arduino libraries for the project
3: 3: CMake Error at CMakeLists.txt:3 (project):
3: 3:   The CMAKE_CXX_COMPILER:
3: 3: 
3: 3:     {runtime.tools.xtensa-esp32-elf-gcc.path}/bin/xtensa-esp32-elf-g++
3: 3: 
3: 3:   is not a full path and was not found in the PATH.
3: 3: 
3: 3:   Tell CMake where to find the compiler by setting either the environment
3: 3:   variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
3: 3:   to the compiler, or to the compiler name if it is in the PATH.
3: 3: 
3: 3: 
3: 3: -- Configuring incomplete, errors occurred!
3: 3: See also "/home/michalkowalczyk/room-access/stasik/toolchain-test/Test/build/esp32.esp32/esp32.esp32/CMakeFiles/CMakeOutput.log".
3: 3: See also "/home/michalkowalczyk/room-access/stasik/toolchain-test/Test/build/esp32.esp32/esp32.esp32/CMakeFiles/CMakeError.log".
3: 3: 
3: 3: CMake Error at /home/michalkowalczyk/room-access/stasik/toolchain-test/Arduino-CMake-Toolchain/Tests/RunBoardTest.cmake:201 (message):
3: 3:   Configure failed!!!
3: 3: 
3: 3: 
3:   3/118 Test   #3: esp32.esp32 ..............................***Failed    0.27 sec

It seems that recursive property resolution doesn't work.

michal-kowalczyk commented 2 years ago

I created a PR with a fix: https://github.com/a9183756-gh/Arduino-CMake-Toolchain/pull/53