Skip to content

Commit

Permalink
Set environment variable prior to running test, as
Browse files Browse the repository at this point in the history
updates to os.environ aren't picked up in C++ on Windows.

(Internal change: 1883994)
  • Loading branch information
sunyab authored and pixar-oss committed Aug 31, 2018
1 parent bc107fe commit 420469c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions pxr/usd/lib/sdr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ pxr_register_test(testSdrRegistry
COMMAND "${CMAKE_INSTALL_PREFIX}/tests/testSdrRegistry"
ENV
PXR_DISABLE_STANDARD_PLUG_SEARCH_PATH=1
PXR_NDR_SKIP_DISCOVERY_PLUGIN_DISCOVERY=1
)
11 changes: 6 additions & 5 deletions pxr/usd/lib/sdr/testenv/testSdrRegistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ def test_Registry(self):
set())

# Instantiating the registry will kick off the discovery process.
# Don't do the usual discovery plugin search in case this is a
# monolithic build. That will find any built-in plugins and
# this test isn't expecting that. Instead we'll list the plugins
# we want explicitly.
os.environ["PXR_NDR_SKIP_DISCOVERY_PLUGIN_DISCOVERY"] = ""
# This test assumes the PXR_NDR_SKIP_DISCOVERY_PLUGIN_DISCOVERY has
# been set prior to being run to ensure built-in plugins are not
# found. Instead we'll list the plugins we want explicitly.

# Setting this from within the script does not work on Windows.
# os.environ["PXR_NDR_SKIP_DISCOVERY_PLUGIN_DISCOVERY"] = ""
reg = Sdr.Registry()
reg.SetExtraDiscoveryPlugins([fsdpType, tdpType])

Expand Down

0 comments on commit 420469c

Please sign in to comment.