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

Added multi-format serialisation test for shared LayerManager #1866

Merged

Conversation

jonjondev
Copy link
Contributor

As requested by @kxl-adsk in PR #1792 (comment), I've gone ahead and added a test for the updated LayerManager to test multi-format serialisation, similar to the one added here.

@fabal fabal force-pushed the J-Mo63/multi-format-serialisation-test branch from 91f07dd to e821478 Compare November 30, 2021 23:58
@fabal fabal force-pushed the J-Mo63/multi-format-serialisation-test branch from e821478 to bef30a1 Compare December 1, 2021 23:04
@jonjondev
Copy link
Contributor Author

Hey @kxl-adsk, looks the test is just having some issues in Windows. I can't exactly test on my end, but do you know why there might be a permissions issue during cleanup?

======================================================================
    ERROR: testMultipleFormatsSerialisation (testLayerManagerSerialization.testLayerManagerSerialization)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "S:\jenkins\workspace\ecg-mayausd-branch-preflight-2022-python3-windows\ecg-maya-usd\maya-usd\test\lib\mayaUsd\nodes\testLayerManagerSerialization.py", line 357, in testMultipleFormatsSerialisation
        shutil.rmtree(self._currentTestDir)
      File "P:\shared\Artifactory\Windows\rundev-2022\202112010615\runtime\2daf616\runTime\Python37\lib\shutil.py", line 516, in rmtree
        return _rmtree_unsafe(path, onerror)
      File "P:\shared\Artifactory\Windows\rundev-2022\202112010615\runtime\2daf616\runTime\Python37\lib\shutil.py", line 400, in _rmtree_unsafe
        onerror(os.unlink, fullname, sys.exc_info())
      File "P:\shared\Artifactory\Windows\rundev-2022\202112010615\runtime\2daf616\runTime\Python37\lib\shutil.py", line 398, in _rmtree_unsafe
        os.unlink(fullname)
    PermissionError: [WinError 5] Access is denied: 'C:\\Temp\\LayerManagerTest1mrfl5b6\\TestLayer.usd'

@kxl-adsk
Copy link

kxl-adsk commented Dec 2, 2021

Test is trying to write to a folder it doesn’t have permission in our Jenkins environment. This is why we recommend tests to write to the build folder as per earlier conversation.

@jonjondev
Copy link
Contributor Author

Test is trying to write to a folder it doesn’t have permission in our Jenkins environment. This is why we recommend tests to write to the build folder as per earlier conversation.

And in this scenario it's already been cd'd into the build directory or is there a path variable that will get me there? Our test system does not make a distinction between source and build so it's hard to understand what's going on in the PF.

@seando-adsk
Copy link
Collaborator

I'm not sure why this new test is having a problem removing the folder it created for the new test. I see other uses of rmtree in this test and those are working. What I would suggest trying is using the env var MAYA_APP_DIR that is set for each test here: https://github.com/Autodesk/maya-usd/blob/dev/cmake/test.cmake#L341. Each test gets its own temporary folder (in the build folder).

@fabal fabal force-pushed the J-Mo63/multi-format-serialisation-test branch from bef30a1 to b6f3a3b Compare December 6, 2021 01:38
@jonjondev
Copy link
Contributor Author

Thanks for the tip @seando-adsk! I think I figured it out, however there now seems to be a (probably unrelated) issue with another test, but only on MayaUsd - Maya Master [USD max, Python 3, Interactive] (Linux):

======================================================================
FAIL: testInstancedIsolateSelect (__main__.testVP2RenderDelegateIsolateSelect)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/S/jenkins/workspace/ecg-mayausd-branch-preflight-cotd-python3-pxrusd-max-interactive-linux/ecg-maya-usd/maya-usd/test/lib/mayaUsd/render/vp2RenderDelegate/testVP2RenderDelegateIsolateSelect.py", line 248, in testInstancedIsolateSelect
    self.assertSnapshotClose('autoLoadSelected_instance_stage.png')
  File "/home/S/jenkins/workspace/ecg-mayausd-branch-preflight-cotd-python3-pxrusd-max-interactive-linux/ecg-maya-usd/maya-usd/test/lib/mayaUsd/render/vp2RenderDelegate/testVP2RenderDelegateIsolateSelect.py", line 64, in assertSnapshotClose
    retVal = self.assertImagesClose(baselineImage, snapshotImage)
  File "/home/S/jenkins/workspace/ecg-mayausd-branch-preflight-cotd-python3-pxrusd-max-interactive-linux/ecg-maya-usd/maya-usd/test/testUtils/imageUtils.py", line 193, in assertImagesClose
    self.fail(msg)
AssertionError: Images differed by 0.041357334407528444 (max allowed: 0.0001):
  /home/S/jenkins/workspace/ecg-mayausd-branch-preflight-cotd-python3-pxrusd-max-interactive-linux/ecg-maya-usd/maya-usd/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateIsolateSelectTest/baseline/autoLoadSelected_instance_stage.png
  /home/S/jenkins/workspace/ecg-mayausd-branch-preflight-cotd-python3-pxrusd-max-interactive-linux/build/RelWithDebInfo/test/lib/mayaUsd/render/vp2RenderDelegate/testVP2RenderDelegateIsolateSelectOutput/autoLoadSelected_instance_stage.png

Please let me know if you think it's related to the added test or not.

@kxl-adsk
Copy link

kxl-adsk commented Dec 7, 2021

Indeed. It looks unrelated. Let’s merge this one.

@kxl-adsk kxl-adsk merged commit 47ad5db into Autodesk:dev Dec 7, 2021
@jonjondev jonjondev deleted the J-Mo63/multi-format-serialisation-test branch December 7, 2021 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants