From 890ed46b3f2a249dab0fe3ccdeb0e1cf670e0128 Mon Sep 17 00:00:00 2001 From: Dan McGarry Date: Thu, 19 Sep 2024 15:08:58 -0700 Subject: [PATCH] Copy a test file for use in overwrite testing Modifying a test file that is used in multiple tests is causing issues in our test framework. This change splits the file that is overwritten during the testReferenceCommands test to avoid corrupting other tests that are trying to use the same test file --- test/lib/ufe/testReferenceCommands.py | 2 +- test/testSamples/twoSpheres/sphere_ext.usda | 21 ++++++++++++++++++++ test/testSamples/twoSpheres/spheres_ref.usda | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 test/testSamples/twoSpheres/sphere_ext.usda diff --git a/test/lib/ufe/testReferenceCommands.py b/test/lib/ufe/testReferenceCommands.py index e5dc7899ea..07ca47b2f4 100644 --- a/test/lib/ufe/testReferenceCommands.py +++ b/test/lib/ufe/testReferenceCommands.py @@ -66,7 +66,7 @@ def testReloadReferencesCommands(self): # paths to the files used in this test newFile = testUtils.getTestScene('twoSpheres', 'spherexform.usda') - oldFile = testUtils.getTestScene('twoSpheres', 'sphere.usda') + oldFile = testUtils.getTestScene('twoSpheres', 'sphere_ext.usda') bkFile = testUtils.getTestScene('twoSpheres', 'sphere_bk.usda') refFile = testUtils.getTestScene('twoSpheres', 'spheres_ref.usda') diff --git a/test/testSamples/twoSpheres/sphere_ext.usda b/test/testSamples/twoSpheres/sphere_ext.usda new file mode 100644 index 0000000000..31f91256cc --- /dev/null +++ b/test/testSamples/twoSpheres/sphere_ext.usda @@ -0,0 +1,21 @@ +#usda 1.0 +( + defaultPrim = "sphereXform" +) + +def Xform "sphereXform" +{ + double3 xformOp:translate = (10, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + + def Xform "test" + { + } + + def Sphere "sphere" + { + float3[] extent = [(-2, -2, -2), (2, 2, 2)] + color3f[] primvars:displayColor = [(0, 1, 0)] + double radius = 2 + } +} diff --git a/test/testSamples/twoSpheres/spheres_ref.usda b/test/testSamples/twoSpheres/spheres_ref.usda index 0eca6b3400..f63500f6a2 100644 --- a/test/testSamples/twoSpheres/spheres_ref.usda +++ b/test/testSamples/twoSpheres/spheres_ref.usda @@ -4,7 +4,7 @@ ) def Xform "Xform1" ( - prepend references = @sphere.usda@ + prepend references = @sphere_ext.usda@ ) { }