From c375debf5ac6408e48f5fdfa43f53b6a1d1f3d73 Mon Sep 17 00:00:00 2001 From: Keli Li Date: Wed, 2 Oct 2024 16:15:09 -0400 Subject: [PATCH] adjust test code in sceneBrowser to make the case happy on SdfPathVector value --- .../test/adskHydraSceneBrowserTestFixture.cpp | 11 ++++++++++- test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/adskHydraSceneBrowser/test/adskHydraSceneBrowserTestFixture.cpp b/lib/adskHydraSceneBrowser/test/adskHydraSceneBrowserTestFixture.cpp index 0e9e93c24f..bada54c2c5 100644 --- a/lib/adskHydraSceneBrowser/test/adskHydraSceneBrowserTestFixture.cpp +++ b/lib/adskHydraSceneBrowser/test/adskHydraSceneBrowserTestFixture.cpp @@ -257,7 +257,16 @@ void AdskHydraSceneBrowserTestFixture::CompareValueContent(const pxr::VtValue& v std::string actualValue = valueText.toStdString(); std::ostringstream valueStream; - valueStream << value; + if (value.IsHolding()) { + // Special case for SdfPathVector. + pxr::SdfPathVector paths = value.Get(); + for (pxr::SdfPath const& path : paths) { + valueStream << path << "\n"; + } + } + else { + valueStream << value; + } std::string expectedValue = valueStream.str(); if (!MatchesFallbackTextOutput(expectedValue)) { diff --git a/test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt b/test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt index af7ac68d7a..6775756cce 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt +++ b/test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt @@ -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)