From 81caec8c609891fea21d04bdfbecb3a0739bc06e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 31 Jul 2020 14:26:13 +0200 Subject: Fix blender_test runner build on the buildbot on Linux and macOS Add our own copy of the gtest discovery scripts from CMake a few reasons: * Use the very latest version which supports PRE_TEST for Windows * Fix usage of [] symbols in file paths that fail with the zsh shell * Disable asan leak checker when discovering tests This means Windows also no longer requires the very latest CMake 3.18. --- tests/gtests/runner/BlenderAddTests.cmake | 3 --- tests/gtests/runner/CMakeLists.txt | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 tests/gtests/runner/BlenderAddTests.cmake (limited to 'tests/gtests/runner') diff --git a/tests/gtests/runner/BlenderAddTests.cmake b/tests/gtests/runner/BlenderAddTests.cmake deleted file mode 100644 index c4f5c8aba8a..00000000000 --- a/tests/gtests/runner/BlenderAddTests.cmake +++ /dev/null @@ -1,3 +0,0 @@ -# Disable ASAN leak detection when trying to discover tests. -set(ENV{ASAN_OPTIONS} "detect_leaks=0") -include(GoogleTestAddTests) diff --git a/tests/gtests/runner/CMakeLists.txt b/tests/gtests/runner/CMakeLists.txt index 87cc124bda8..4153567ff42 100644 --- a/tests/gtests/runner/CMakeLists.txt +++ b/tests/gtests/runner/CMakeLists.txt @@ -75,10 +75,12 @@ unset(_test_libs) # This runs the blender_test executable with `--gtest_list_tests`, then # exposes those tests individually to the ctest runner. # See https://cmake.org/cmake/help/v3.18/module/GoogleTest.html -include(GoogleTest) +# +# We have our own modified copy of this CMake module. +include(GTest) set(_GOOGLETEST_DISCOVER_TESTS_SCRIPT - ${CMAKE_CURRENT_LIST_DIR}/BlenderAddTests.cmake + ${CMAKE_SOURCE_DIR}/build_files/cmake/Modules/GTestAddTests.cmake ) gtest_discover_tests(blender_test -- cgit v1.2.3