tests FEATURE run tests in a separate repositories
Fixes This patch also allows running all tests at once.
Also, this fixes setting the other two enviromental variables. The
previous code did NOT set two variables, but only one (with a value that
included the name of the second one).
@@ -32,7 +32,12 @@ endforeach(test_name)
foreach(test_name IN LISTS tests)
target_link_libraries(${test_name} ${CMOCKA_LIBRARIES} sysrepo)
add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
- set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT "MALLOC_CHECK_=3 CMOCKA_TEST_ABORT=1")
+ set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT
+ "MALLOC_CHECK_=3"
+ "CMOCKA_TEST_ABORT=1"
+ "SYSREPO_REPOSITORY_PATH=${PROJECT_BINARY_DIR}/test_repositories/${test_name}"
+ "SYSREPO_SHM_PREFIX=_tests_sr_${test_name}"
+ )
endforeach(test_name)
# measure_performance benchmark binary
