Skip to content

Commit

Permalink
Debugging for OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
debloip-adsk committed Jul 17, 2024
1 parent 1c366dc commit 2d9fedf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/lib/mayaUsd/render/mayaToHydra/cpp/testHydraPrim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

#include "testUtils.h"

#include <pxr/imaging/hd/utils.h>

#include <ufe/path.h>
#include <ufe/pathString.h>

Expand Down Expand Up @@ -43,3 +45,12 @@ TEST(TestHydraPrim, fromAppPath)

ASSERT_FALSE(sceneIndexPath.IsEmpty());
}

TEST(TestHydraPrim, printSceneIndex)
{
const auto& sceneIndices = GetTerminalSceneIndices();
ASSERT_GT(sceneIndices.size(), 0u);
auto siRoot = sceneIndices.front();

HdUtils::PrintSceneIndex(std::cout, siRoot);
}
5 changes: 5 additions & 0 deletions test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import mayaUtils
import ufe

from testUtils import PluginLoaded

class TestStageVariants(mtohUtils.MayaHydraBaseTestCase): #Subclassing mtohUtils.MayaHydraBaseTestCase to be able to call self.assertSnapshotClose
# MayaHydraBaseTestCase.setUpClass requirement.
_file = __file__
Expand Down Expand Up @@ -56,6 +58,9 @@ def test_UsdStageVariants(self):
ufeGlobalSel = ufe.GlobalSelection.get()
ufeGlobalSel.clear()
ufeGlobalSel.append(cubesItems)
cmds.refresh(force=True)
cmds.loadPlugin('mayaHydraCppTests')
cmds.mayaHydraCppTest(f="TestHydraPrim.printSceneIndex")
self.assertSnapshotClose("oneCube.png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT)
ufeGlobalSel.clear()

Expand Down

0 comments on commit 2d9fedf

Please sign in to comment.