Skip to content

Commit

Permalink
Merge pull request #2090 from dgovil/cpp_cli_tools
Browse files Browse the repository at this point in the history
UsdCat: Initial conversion to C++

(Internal change: 2257592)
  • Loading branch information
pixar-oss committed Dec 9, 2022
2 parents 29d7f4d + 771389d commit eee14ca
Show file tree
Hide file tree
Showing 3 changed files with 329 additions and 257 deletions.
17 changes: 5 additions & 12 deletions pxr/usd/bin/usdcat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
set(PXR_PREFIX pxr/usd)
set(PXR_PACKAGE usd)

pxr_python_bin(usdcat
DEPENDENCIES
ar
pxr_cpp_bin(usdcat
LIBRARIES
tf
sdf
usd
)
usdUtils
)

pxr_install_test_dir(
SRC testenv/testCatToFile
DEST testUsdCatOutToFile
)

pxr_register_test(testUsdCatOutToFile
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat input.usda --out output.usda"
DIFF_COMPARE output.usda
EXPECTED_RETURN_CODE 0
Expand All @@ -26,7 +26,6 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdCatVariadicCatting
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat a.usd b.usd c.usd"
EXPECTED_RETURN_CODE 0
)
Expand All @@ -37,7 +36,6 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdCatMissingOrInvalidFiles1
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat hello.txt"
EXPECTED_RETURN_CODE 1
)
Expand All @@ -48,7 +46,6 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdCatMissingOrInvalidFiles2
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat foo.usda"
EXPECTED_RETURN_CODE 1
)
Expand All @@ -59,14 +56,12 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdCatMask
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat --mask /InsideMask --flatten --skipSourceFileComment input.usda -o output.usda"
DIFF_COMPARE output.usda
EXPECTED_RETURN_CODE 0
)

pxr_register_test(testUsdCatMask2
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat --mask /InsideMask input.usda -o output.usda"
EXPECTED_RETURN_CODE 1
)
Expand All @@ -77,7 +72,6 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdCatLoadOnly
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat --loadOnly input.usda"
EXPECTED_RETURN_CODE 0
)
Expand All @@ -88,7 +82,6 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdCatLayerMetadata
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdcat --layerMetadata input.usda -o output.usda"
DIFF_COMPARE output.usda
EXPECTED_RETURN_CODE 0
Expand Down
Loading

0 comments on commit eee14ca

Please sign in to comment.