Commit: 429d9ee441f89e8082c434dad09e0f32d189863d
Author: Sybren A. Stüvel
Date:   Fri Nov 29 15:16:23 2019 +0100
Branches: temp-sybren-usd-patch-02
https://developer.blender.org/rB429d9ee441f89e8082c434dad09e0f32d189863d

USD: Allow running unit tests without 'make install' step

When the PXR_PLUGINPATH_NAME environment variable is defined, the USD
library uses it to find its JSON files. This allows the unit tests to
run without having to 'make install' Blender.

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

M       tests/gtests/usd/CMakeLists.txt

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

diff --git a/tests/gtests/usd/CMakeLists.txt b/tests/gtests/usd/CMakeLists.txt
index a8831b66100..9345e0d573a 100644
--- a/tests/gtests/usd/CMakeLists.txt
+++ b/tests/gtests/usd/CMakeLists.txt
@@ -69,4 +69,12 @@ BLENDER_SRC_GTEST_EX(
   EXTRA_LIBS "${LIB}"
   COMMAND_ARGS --test-assets-dir "${CMAKE_SOURCE_DIR}/../lib/tests")
 
+# When the PXR_PLUGINPATH_NAME environment variable is defined, the USD 
library uses it to find its JSON files.
+# This allows the unit tests to run without having to 'make install' Blender.
+get_property(_usd_TEST_ENV
+  TEST usd_test
+  PROPERTY ENVIRONMENT)
+set_tests_properties(usd_test PROPERTIES ENVIRONMENT 
"${_usd_TEST_ENV};PXR_PLUGINPATH_NAME=${LIBDIR}/usd/lib/usd")
+unset(_usd_TEST_ENV)
+
 setup_liblinks(usd_test)

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to