[Bf-blender-cvs] [f08bf4bd6b6] tmp_libupdate_34: Fix: Startup issues for some tests on windows

Ray Molenkamp noreply at git.blender.org
Mon Aug 22 17:24:48 CEST 2022


Commit: f08bf4bd6b6fded516dfa788c14eb2e50aeed68c
Author: Ray Molenkamp
Date:   Mon Aug 22 09:24:36 2022 -0600
Branches: tmp_libupdate_34
https://developer.blender.org/rBf08bf4bd6b6fded516dfa788c14eb2e50aeed68c

Fix: Startup issues for some tests on windows

Wrong path was set to the shared libs.

===================================================================

M	build_files/cmake/Modules/GTestTesting.cmake
M	build_files/cmake/macros.cmake
M	tests/python/CMakeLists.txt

===================================================================

diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake
index ee960bf31b1..b0774a1b1ac 100644
--- a/build_files/cmake/Modules/GTestTesting.cmake
+++ b/build_files/cmake/Modules/GTestTesting.cmake
@@ -98,7 +98,7 @@ macro(BLENDER_SRC_GTEST_EX)
         ENVIRONMENT LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS}
       )
       if(WIN32)
-        set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT "PATH=$<TARGET_FILE_DIR:blender>/blender.shared/;$ENV{PATH}")
+        set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/;$ENV{PATH}")
       endif()
     endif()
     if(WIN32)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 28194b5737d..43d6f06cc12 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -405,7 +405,7 @@ function(blender_add_test_suite)
       --test-release-dir "${_test_release_dir}"
   )
   if(WIN32)
-    set_tests_properties(${ARGS_SUITE_NAME} PROPERTIES ENVIRONMENT "PATH=$<TARGET_FILE_DIR:blender>/blender.shared/;$ENV{PATH}")
+    set_tests_properties(${ARGS_SUITE_NAME} PROPERTIES ENVIRONMENT "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/;$ENV{PATH}")
   endif()
   unset(_test_release_dir)
 endfunction()
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index 0b900064bf6..ce4ebb2ac77 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -32,7 +32,7 @@ function(add_blender_test testname)
     LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS}
   )
   if(WIN32)
-    set_tests_properties(${testname} PROPERTIES ENVIRONMENT "PATH=$<TARGET_FILE_DIR:blender>/blender.shared/;$ENV{PATH}")
+    set_tests_properties(${testname} PROPERTIES ENVIRONMENT "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/;$ENV{PATH}")
   endif()
 endfunction()
 
@@ -51,7 +51,7 @@ function(add_python_test testname testscript)
     LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS}
   )
   if(WIN32)
-    set_tests_properties(${testname} PROPERTIES ENVIRONMENT "PATH=$<TARGET_FILE_DIR:blender>/blender.shared/;$ENV{PATH}")
+    set_tests_properties(${testname} PROPERTIES ENVIRONMENT "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/;$ENV{PATH}")
   endif()
 endfunction()



More information about the Bf-blender-cvs mailing list