[Bf-blender-cvs] [429d9ee441f] temp-sybren-usd-patch-02: USD: Allow running unit tests without 'make install' step

Sybren A. Stüvel noreply at git.blender.org
Fri Nov 29 15:17:10 CET 2019


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)



More information about the Bf-blender-cvs mailing list