From b9546a33e90df60e2d47735b4627de4eb97ba6b9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 8 Sep 2009 12:03:32 -0400 Subject: QAR-1619: Finish replacing RunBuildTest.cmake with run_build_test.py. Because the details of RunBuildTest.cmake versus run_build_test.py had to be changed in so many different places, introduce LL_TEST_COMMAND CMake macro (in LLTestCommand.cmake) to encapsulate construction of the actual command line. Use LL_TEST_COMMAND in LL_ADD_PROJECT_UNIT_TESTS, LL_ADD_INTEGRATION_TEST, the big indra/test monolith and the various LslCompilerMacros. Fix run_build_test.py to pass through the test executable's own options (e.g. --touch, --output) without inspection. Defend it against the case when the platform-specific library path environment variable doesn't yet exist. Make it report errors only on nonzero test-program rc. Remove RunBuildTest.cmake. --- indra/test/CMakeLists.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index d8c3d45c5f..3e42f6929b 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -153,16 +153,11 @@ ELSE(WINDOWS) set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib) ENDIF(WINDOWS) -SET(TEST_CMD ${TEST_EXE} --output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt --touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt) - +LL_TEST_COMMAND("${LD_LIBRARY_PATH}" + "${TEST_EXE}" "--output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt" "--touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt") ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt - COMMAND ${CMAKE_COMMAND} - ARGS - -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH} - "-DTEST_CMD:STRING=\"${TEST_CMD}\"" - -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake - + COMMAND ${LL_TEST_COMMAND_value} DEPENDS test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "C++ unit tests" -- cgit v1.2.3