Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate more pxrUsdMayaGL tests from plugin/pxr/... to test/... #761

Merged
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 11 additions & 0 deletions test/lib/mayaUsd/render/pxrUsdMayaGL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@ set(TARGET_NAME MAYAUSD_RENDER_PXRUSDMAYAGL_TEST)

# Unit test scripts.
set(TEST_SCRIPT_FILES
testProxyShapeDrawAndTransform.py
testProxyShapeDrawColorAccuracy.py
testProxyShapeDrawColors.py
testProxyShapeDrawLighting.py
testProxyShapeDrawPerformance.py
testProxyShapeDrawPurpose.py
testProxyShapeDrawTimeSampled.py
testProxyShapeDrawUsdChangeProcessing.py
testProxyShapeDrawVisibility.py
testProxyShapeDuplicatePerformance.py
testProxyShapeLiveSurface.py
testProxyShapeRendererSceneMessages.py
testProxyShapeSelectionPerformance.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattyjams

As a FYI, I noticed that both testProxyShapeLiveSurface and testProxyShapeSelectionPerformance fail on my Windows after syncing to the latest dev changes.

@kxl-adsk I believe you mentioned the same failure on your side. I don't think I notice these failures when I originally reviewed this PR but they show up now.

Requires more investigation.

98% tests passed, 2 tests failed out of 127

Label Time Summary:
interactive          = 847.06 sec*proc (14 tests)
pxrUsdMayaGL         = 847.06 sec*proc (14 tests)
translators          = 643.22 sec*proc (52 tests)
ufe                  = 264.30 sec*proc (21 tests)
usdPreviewSurface    =  20.88 sec*proc (2 tests)

Total Test time (real) = 212.37 sec

The following tests FAILED:
         15 - testProxyShapeLiveSurface (Failed)
         17 - testProxyShapeSelectionPerformance (Failed)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, sorry about that @HamedSabri-adsk. They've been passing for me on Linux. I briefly had access to a Windows machine before we left the studio, but I've since lost that. :/

Do you have any logs handy from failed runs of either of those tests? And I assume all of the other pxrUsdMayaGL tests are passing?

Just a wild guess without any more detail for the moment, but the one thing common to these two tests and absent from all the others is the shenanigans they pull dealing with PySide2 and shiboken2 so that they can emulate clicking in the viewports. Maybe there's something there that's problematic on Windows?

Let me know what I can do to help get to the bottom of that!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I saw these when validating your change @mattyjams and before merging. I was confused because @HamedSabri-adsk run the tests and they were passing. The explanation I found is that we can be using builds of Maya with asserts enabled. When we do, these tests will cause Maya to assert when the application is exiting. This then causes the test to fail. You won't get it with the official build of Maya.

The assert seems to be complaining that there are still some shared GL widgets alive when we are releasing resources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the extra info @kxl-adsk. Makes sense then why I might not be seeing those failed asserts.

I took a wild stab at addressing this in #777, so we can continue the investigation there.

testPxrUsdMayaGL.py
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//Last modified: Mon, Feb 26, 2018 11:10:50 AM
//Codeset: UTF-8
requires maya "2016";
requires -nodeType "pxrUsdReferenceAssembly" -dataType "pxrUsdStageData" "pxrUsd" "1.0";
requires -nodeType "mayaUsdProxyShape" "mayaUsdPlugin" "1.0";
requires "stereoCamera" "10.0";
currentUnit -l centimeter -a degree -t film;
fileInfo "application" "maya";
Expand Down Expand Up @@ -74,14 +74,16 @@ createNode camera -s -n "sideShape" -p "side";
setAttr ".o" yes;
createNode transform -n "ProxyShapeDrawAndTransformTest";
rename -uid "24A938C0-0000-731D-5A94-5B3300000248";
createNode pxrUsdReferenceAssembly -n "Cube_1" -p "ProxyShapeDrawAndTransformTest";
rename -uid "24A938C0-0000-731D-5A94-5B2400000246";
setAttr ".isc" yes;
createNode transform -n "Cube_1" -p "ProxyShapeDrawAndTransformTest";
rename -uid "24A938C0-0000-731D-5A94-5B3300000247";
setAttr ".s" -type "double3" 5 5 5 ;
createNode mayaUsdProxyShape -n "Cube_1Shape" -p "Cube_1";
rename -uid "24A938C0-0000-731D-5A94-5B2400000246";
setAttr -k off ".v";
setAttr ".covm[0]" 0 1 1;
setAttr ".cdvm[0]" 0 1 1;
setAttr ".fp" -type "string" "./CubeModel.usda";
setAttr ".pp" -type "string" "/CubeModel";
setAttr ".irp" -type "string" "Collapsed";
setAttr ".rns" -type "string" "NS_Cube_1";
createNode transform -n "MainCamera";
rename -uid "24A938C0-0000-731D-5A94-5B660000024A";
setAttr ".t" -type "double3" 26.60408020281784 -34.003567133002285 20.03570901055328 ;
Expand Down Expand Up @@ -111,9 +113,6 @@ createNode renderLayerManager -n "renderLayerManager";
createNode renderLayer -n "defaultRenderLayer";
rename -uid "24A938C0-0000-731D-5A94-5B1800000244";
setAttr ".g" yes;
createNode hyperLayout -n "hyperLayout1";
rename -uid "24A938C0-0000-731D-5A94-5B2400000247";
setAttr ".ihi" 0;
createNode script -n "uiConfigurationScriptNode";
rename -uid "24A938C0-0000-731D-5A94-5BBA0000024D";
setAttr ".b" -type "string" (
Expand Down Expand Up @@ -218,7 +217,6 @@ select -ne :defaultResolution;
select -ne :hardwareRenderGlobals;
setAttr ".ctrs" 256;
setAttr ".btrs" 512;
connectAttr "hyperLayout1.msg" "Cube_1.hl";
relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message";
relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#usda 1.0
(
defaultPrim = "CubeModel"
upAxis = "Z"
)

def "CubeModel" (
prepend references = @./CubeModel.usda@</CubeModel>
variants = {
string shadingVariant = "Red"
}
)
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//Last modified: Mon, Feb 26, 2018 11:10:50 AM
//Codeset: UTF-8
requires maya "2016";
requires -nodeType "pxrUsdReferenceAssembly" -dataType "pxrUsdStageData" "pxrUsd" "1.0";
requires -nodeType "mayaUsdProxyShape" "mayaUsdPlugin" "1.0";
requires "stereoCamera" "10.0";
currentUnit -l centimeter -a degree -t film;
fileInfo "application" "maya";
Expand Down Expand Up @@ -74,17 +74,16 @@ createNode camera -s -n "sideShape" -p "side";
setAttr ".o" yes;
createNode transform -n "ProxyShapeDrawColorAccuracyTest";
rename -uid "24A938C0-0000-731D-5A94-5B3300000248";
createNode pxrUsdReferenceAssembly -n "Cube_1" -p "ProxyShapeDrawColorAccuracyTest";
rename -uid "24A938C0-0000-731D-5A94-5B2400000246";
addAttr -is true -ci true -sn "usdVariantSet_shadingVariant" -ln "usdVariantSet_shadingVariant"
-dt "string";
setAttr ".isc" yes;
createNode transform -n "Cube_1" -p "ProxyShapeDrawColorAccuracyTest";
rename -uid "24A938C0-0000-731D-5A94-5B3300000247";
setAttr ".s" -type "double3" 5 5 5 ;
setAttr ".fp" -type "string" "./CubeModel.usda";
createNode mayaUsdProxyShape -n "Cube_1Shape" -p "Cube_1";
rename -uid "24A938C0-0000-731D-5A94-5B2400000246";
setAttr -k off ".v";
setAttr ".covm[0]" 0 1 1;
setAttr ".cdvm[0]" 0 1 1;
setAttr ".fp" -type "string" "./CubeModel_Red.usda";
setAttr ".pp" -type "string" "/CubeModel";
setAttr ".irp" -type "string" "Collapsed";
setAttr ".rns" -type "string" "NS_Cube_1";
setAttr ".usdVariantSet_shadingVariant" -type "string" "Red";
createNode transform -n "MainCamera";
rename -uid "24A938C0-0000-731D-5A94-5B660000024A";
setAttr ".t" -type "double3" 11.025 -10.6 6.35 ;
Expand Down Expand Up @@ -119,9 +118,6 @@ createNode renderLayerManager -n "renderLayerManager";
createNode renderLayer -n "defaultRenderLayer";
rename -uid "24A938C0-0000-731D-5A94-5B1800000244";
setAttr ".g" yes;
createNode hyperLayout -n "hyperLayout1";
rename -uid "24A938C0-0000-731D-5A94-5B2400000247";
setAttr ".ihi" 0;
createNode script -n "uiConfigurationScriptNode";
rename -uid "24A938C0-0000-731D-5A94-5BBA0000024D";
setAttr ".b" -type "string" (
Expand Down Expand Up @@ -231,7 +227,6 @@ select -ne :defaultLightSet;
select -ne :hardwareRenderGlobals;
setAttr ".ctrs" 256;
setAttr ".btrs" 512;
connectAttr "hyperLayout1.msg" "Cube_1.hl";
relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message";
relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//Maya ASCII 2016 scene
//Name: stage.ma
//Name: ProxyShapeDrawColorsTest.ma
//Last modified: Tue, Apr 24, 2018 04:48:58 PM
//Codeset: UTF-8
requires maya "2016";
requires -nodeType "px_renderGlobals" "px_render" "1.0";
requires -nodeType "displayPoints" "Type" "2.0a";
currentUnit -l centimeter -a degree -t film;
fileInfo "application" "maya";
Expand Down Expand Up @@ -197,8 +196,6 @@ createNode shadingEngine -n "lambert2SG";
setAttr ".ro" yes;
createNode materialInfo -n "materialInfo4";
rename -uid "C4409900-0000-69A0-5ADF-9AFE0000075F";
createNode px_renderGlobals -s -n "px_renderGlobals1";
rename -uid "9A6AA900-0000-2DE7-5ADF-C25900000345";
createNode nodeGraphEditorInfo -n "hyperShadePrimaryNodeEditorSavedTabsInfo";
rename -uid "9A6AA900-0000-2DE7-5ADF-C26A0000035A";
setAttr ".tgi[0].tn" -type "string" "Untitled_1";
Expand Down Expand Up @@ -227,9 +224,6 @@ select -ne :initialShadingGroup;
setAttr ".ro" yes;
select -ne :initialParticleSE;
setAttr ".ro" yes;
select -ne :defaultRenderGlobals;
setAttr ".ren" -type "string" "px_render";
setAttr ".outf" 3;
select -ne :defaultResolution;
setAttr ".pa" 1;
select -ne :hardwareRenderGlobals;
Expand Down Expand Up @@ -270,4 +264,4 @@ connectAttr "typeBlinn1.msg" ":defaultShaderList1.s" -na;
connectAttr "typeBlinn2.msg" ":defaultShaderList1.s" -na;
connectAttr "lambert2.msg" ":defaultShaderList1.s" -na;
connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na;
// End of stage.ma
// End of ProxyShapeDrawColorsTest.ma
Loading