[cmake-developers] set_tests_properties and several environment variables
Andreas Schneider
asn at cryptomilk.org
Tue Jun 25 06:46:37 EDT 2013
Hi,
I have a strange issue with set_tests_properties() and several ENVIRONMENT
definitions. Only the last one shows up in the generated ctest file.
So this:
add_cmocka_test(testsuite testsuite.c ${CMOCKA_LIBRARY})
set_tests_properties(
testsuite
PROPERTIES
ENVIRONMENT LD_PRELOAD=${CMAKE_BINARY_DIR}/src/libnss_wrapper.so
ENVIRONMENT NSS_WRAPPER_PASSWD=${CMAKE_CURRENT_BINARY_DIR}/passwd
ENVIRONMENT NSS_WRAPPER_GROUP=${CMAKE_CURRENT_BINARY_DIR}/group
ENVIRONMENT NSS_WRAPPER_HOSTS=${CMAKE_CURRENT_BINARY_DIR}/hosts)
results in:
asn at magrathea:~/workspace/projects/nss_wrapper/build> cat
tests/CTestTestfile.cmake
# CMake generated Testfile for
# Source directory: /home/asn/workspace/projects/nss_wrapper/tests
# Build directory: /home/asn/workspace/projects/nss_wrapper/build/tests
#
# This file includes the relevent testing commands required for
# testing this directory and lists subdirectories to be tested as well.
ADD_TEST(testsuite
"/home/asn/workspace/projects/nss_wrapper/build/tests/testsuite")
SET_TESTS_PROPERTIES(testsuite PROPERTIES ENVIRONMENT
"NSS_WRAPPER_GROUP=/home/asn/workspace/projects/nss_wrapper/build/tests/group")
I miss three env variables, so my test fails ...
Should I open a bug or is this knows?
cmake version 2.8.11.1
http://git.cryptomilk.org/projects/nss_wrapper.git/tree/
-- andreas
--
Andreas Schneider GPG-ID: F33E3FC6
www.cryptomilk.org asn at cryptomilk.org
More information about the cmake-developers
mailing list