From 169463e3a94a74227bf1269d610391020fdd3813 Mon Sep 17 00:00:00 2001 From: sunyab Date: Wed, 23 Feb 2022 22:20:04 -0800 Subject: [PATCH] Fix recently-added testUsdAbcIndexedGeomArb Invoke usdcat directly instead of going through the test script which simply does the same thing. This is similar to how the usdcat tests are set up and avoids issues where usdcat may not be in the PATH when the test is run. See #1635 (Internal change: 2217289) --- pxr/usd/plugin/usdAbc/CMakeLists.txt | 7 ++-- .../testenv/testUsdAbcIndexedGeomArb.py | 38 ------------------- 2 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 pxr/usd/plugin/usdAbc/testenv/testUsdAbcIndexedGeomArb.py diff --git a/pxr/usd/plugin/usdAbc/CMakeLists.txt b/pxr/usd/plugin/usdAbc/CMakeLists.txt index 014e646342..fb169cf2e8 100644 --- a/pxr/usd/plugin/usdAbc/CMakeLists.txt +++ b/pxr/usd/plugin/usdAbc/CMakeLists.txt @@ -70,7 +70,6 @@ pxr_test_scripts( testenv/testUsdAbcConversionSubdiv.py testenv/testUsdAbcFaceset.py testenv/testUsdAbcIndexedProperties.py - testenv/testUsdAbcIndexedGeomArb.py testenv/testUsdAbcInstancing.py testenv/testUsdAbcIsConstant.py testenv/testUsdAbcP_OldEncoding.py @@ -115,8 +114,8 @@ pxr_install_test_dir( ) pxr_install_test_dir( - SRC testenv/testUsdAbcIndexedGeomArb - DEST testUsdAbcIndexedGeomArb + SRC testenv/testUsdAbcIndexedGeomArb + DEST testUsdAbcIndexedGeomArb ) pxr_install_test_dir( @@ -213,7 +212,7 @@ pxr_register_test(testUsdAbcIndexedProperties pxr_register_test(testUsdAbcIndexedGeomArb PYTHON - COMMAND "${CMAKE_INSTALL_PREFIX}/tests/testUsdAbcIndexedGeomArb" + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat hasColorSet.abc --out good_primvars_namespace_after_fix.usda" DIFF_COMPARE good_primvars_namespace_after_fix.usda EXPECTED_RETURN_CODE 0 ENV diff --git a/pxr/usd/plugin/usdAbc/testenv/testUsdAbcIndexedGeomArb.py b/pxr/usd/plugin/usdAbc/testenv/testUsdAbcIndexedGeomArb.py deleted file mode 100644 index 86493b69e4..0000000000 --- a/pxr/usd/plugin/usdAbc/testenv/testUsdAbcIndexedGeomArb.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/pxrpythonsubst -# -# Copyright 2017 Pixar -# -# Licensed under the Apache License, Version 2.0 (the "Apache License") -# with the following modification; you may not use this file except in -# compliance with the Apache License and the following modification to it: -# Section 6. Trademarks. is deleted and replaced with: -# -# 6. Trademarks. This License does not grant permission to use the trade -# names, trademarks, service marks, or product names of the Licensor -# and its affiliates, except as required to comply with Section 4(c) of -# the License and to reproduce the content of the NOTICE file. -# -# You may obtain a copy of the Apache License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the Apache License with the above modification is -# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the Apache License for the specific -# language governing permissions and limitations under the Apache License. - -import unittest, os, sys - -class TestUsdAbcIndexedGeomArb(unittest.TestCase): - def test_IndexedGeomArb(self): - name = "hasColorSet.abc" - abcFile = os.path.join("testUsdAbcIndexedGeomArb", name) - cmd = 'usdcat' - if sys.platform.startswith('win'): - cmd = 'usdcat.exe' - - os.system("%s %s" % (cmd, abcFile)) - -if __name__ == "__main__": - unittest.main()