Skip to content

Commit

Permalink
HYDRA-1207 - fix and re-enable case testSceneBrowser (#182)
Browse files Browse the repository at this point in the history
* adjust test code in sceneBrowser to make the case happy on SdfPathVector value

* fix the build failure on old USD version for Maya 2025

* update the comment
  • Loading branch information
lilike-adsk authored Oct 3, 2024
1 parent d9c3de1 commit cc3b496
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,21 @@ void AdskHydraSceneBrowserTestFixture::CompareValueContent(const pxr::VtValue& v
std::string actualValue = valueText.toStdString();

std::ostringstream valueStream;
#if PXR_VERSION < 2408
valueStream << value;
#else
if (value.IsHolding<pxr::SdfPathVector>()) {
// Special case for SdfPathVector.
// See https://github.com/PixarAnimationStudios/OpenUSD/commit/1d19b1d
pxr::SdfPathVector paths = value.Get<pxr::SdfPathVector>();
for (pxr::SdfPath const& path : paths) {
valueStream << path << "\n";
}
}
else {
valueStream << value;
}
#endif
std::string expectedValue = valueStream.str();

if (!MatchesFallbackTextOutput(expectedValue)) {
Expand Down
3 changes: 1 addition & 2 deletions test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ endif(MayaUsd_FOUND)

# Code coverage is not computed for the Hydra scene browser.
if (NOT CODE_COVERAGE)
# To be reenabled after investigation: HYDRA-1207
#list(APPEND INTERACTIVE_TEST_SCRIPT_FILES testSceneBrowser.py)
list(APPEND INTERACTIVE_TEST_SCRIPT_FILES testSceneBrowser.py)
endif()

# Interactive Unit test scripts for mesh adapter (launched with maya.exe instead of mayapy.exe)
Expand Down

0 comments on commit cc3b496

Please sign in to comment.