Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,4 @@ def test_isolateSelectMultipleInstances(self):


if __name__ == "__main__":
import platform
if platform.system() == "Windows":
# Logged as HYDRA-2237: Workaround for pre-existing Maya crash during
# process exit on Windows. See testIsolateSelectPerShape.py for
# details.
import sys, ctypes, ctypes.wintypes
suite = fixturesUtils.loadTestsFromDict(globals())
runner = unittest.TextTestRunner(stream=sys.__stderr__, verbosity=1)
results = runner.run(suite)
exitCode = 0 if results.wasSuccessful() else 1
sys.__stdout__.flush()
sys.__stderr__.flush()
kernel32 = ctypes.windll.kernel32
kernel32.GetCurrentProcess.restype = ctypes.wintypes.HANDLE
kernel32.TerminateProcess.argtypes = [ctypes.wintypes.HANDLE,
ctypes.wintypes.UINT]
kernel32.TerminateProcess(kernel32.GetCurrentProcess(), exitCode)
else:
fixturesUtils.runTests(globals())
fixturesUtils.runTests(globals())
24 changes: 1 addition & 23 deletions test/lib/mayaUsd/render/mayaToHydra/testIsolateSelectPerShape.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,26 +212,4 @@ def test_isolateSelectPerShape(self):


if __name__ == "__main__":
import platform
if platform.system() == "Windows":
# Logged as HYDRA-2237: Workaround for pre-existing Maya crash during
# process exit: ufe_0.dll's static attrSubjects destructor
# crashes due to DLL unload ordering. os._exit still triggers
# DllMain(DLL_PROCESS_DETACH) on Windows, so we must use
# TerminateProcess to kill the process without running any DLL
# teardown. Test results are fully reported by the runner
# before this point.
import sys, unittest, ctypes, ctypes.wintypes
suite = fixturesUtils.loadTestsFromDict(globals())
runner = unittest.TextTestRunner(stream=sys.__stderr__, verbosity=1)
results = runner.run(suite)
exitCode = 0 if results.wasSuccessful() else 1
sys.__stdout__.flush()
sys.__stderr__.flush()
kernel32 = ctypes.windll.kernel32
kernel32.GetCurrentProcess.restype = ctypes.wintypes.HANDLE
kernel32.TerminateProcess.argtypes = [ctypes.wintypes.HANDLE,
ctypes.wintypes.UINT]
kernel32.TerminateProcess(kernel32.GetCurrentProcess(), exitCode)
else:
fixturesUtils.runTests(globals())
fixturesUtils.runTests(globals())
Loading