summaryrefslogtreecommitdiff
path: root/indra/test
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2010-06-18 17:38:21 -0400
committerNat Goodspeed <nat@lindenlab.com>2010-06-18 17:38:21 -0400
commit477fb26c1ef458b6b552c7ac42bd0f18a483770f (patch)
tree446268a9b4126c176ea733a0efb736832030df24 /indra/test
parentcb50a2395bc37f1f7833171a976f67af9f2df66d (diff)
Centralize LD_LIBRARY_PATH logic with new SET_TEST_PATH macro.
Add ${SHARED_LIB_STAGING_DIR_RELEASE} to LD_LIBRARY_PATH for executing tests: otherwise Debug-build tests can't find (e.g.) the aprutil DLL, for which we don't build/package a debug variant. Leverage discovery that a CMake macro can accept a target variable name argument for LL_TEST_COMMAND macro.
Diffstat (limited to 'indra/test')
-rw-r--r--indra/test/CMakeLists.txt14
1 files changed, 4 insertions, 10 deletions
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index c1360987a5..955c77c041 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -13,6 +13,7 @@ include(LLXML)
include(LScript)
include(Linking)
include(Tut)
+include(LLAddBuildTest)
include(GoogleMock)
@@ -117,19 +118,12 @@ endif (WINDOWS)
get_target_property(TEST_EXE test LOCATION)
-IF(WINDOWS)
- set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
-ELSEIF(DARWIN)
- set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib)
-ELSE(WINDOWS)
- set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib)
-ENDIF(WINDOWS)
-
-LL_TEST_COMMAND("${LD_LIBRARY_PATH}"
+SET_TEST_PATH(LD_LIBRARY_PATH)
+LL_TEST_COMMAND(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 ${LL_TEST_COMMAND_value}
+ COMMAND ${command}
DEPENDS test
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "C++ unit tests"