Skip to content

Commit

Permalink
Merge pull request #1443 from Autodesk/t_gamaj/MAYA-112050/pxr_temp_i…
Browse files Browse the repository at this point in the history
…n_build_area

MAYA-112050 - Pxr tests will use build area for temporary files.
  • Loading branch information
Krystian Ligenza authored Jun 15, 2021
2 parents 06ffd43 + e6edc37 commit 191dc21
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugin/pxr/cmake/macros/Public.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,15 @@ function(pxr_register_test TEST_NAME)
"--pre-path=${_testPrePath}" ${testCmd}
)

# Set a temporary folder path for the test
# Note: replace bad chars in test_name with _.
string(REGEX REPLACE "[:<>\|]" "_" SANITIZED_TEST_NAME ${TEST_NAME})
set(TEST_TEMP_DIR "${CMAKE_BINARY_DIR}/test/Temporary/${SANITIZED_TEST_NAME}")
set_property(TEST "${TEST_NAME}" APPEND PROPERTY ENVIRONMENT
"TMP=${TEST_TEMP_DIR}"
"TEMP=${TEST_TEMP_DIR}")
file(MAKE_DIRECTORY ${TEST_TEMP_DIR})

# But in some cases, we need to pass cmake properties directly to cmake
# run_test, rather than configuring the environment
if (bt_RUN_SERIAL)
Expand Down

0 comments on commit 191dc21

Please sign in to comment.