Skip to content

Commit

Permalink
adjust test code in sceneBrowser to make the case happy on SdfPathVec…
Browse files Browse the repository at this point in the history
…tor value
  • Loading branch information
lilike-adsk committed Oct 2, 2024
1 parent d9c3de1 commit c375deb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,16 @@ void AdskHydraSceneBrowserTestFixture::CompareValueContent(const pxr::VtValue& v
std::string actualValue = valueText.toStdString();

std::ostringstream valueStream;
valueStream << value;
if (value.IsHolding<pxr::SdfPathVector>()) {
// Special case for SdfPathVector.
pxr::SdfPathVector paths = value.Get<pxr::SdfPathVector>();
for (pxr::SdfPath const& path : paths) {
valueStream << path << "\n";
}
}
else {
valueStream << value;
}
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 c375deb

Please sign in to comment.