diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-25 18:46:51 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-25 18:46:51 -0400 |
| commit | 499bbc2e33172dd19f130dc33ced217e51bc48ed (patch) | |
| tree | a47f40199fdcda9d33bb14c07ec57f8510573311 /tests | |
| parent | b6987fdaadb750a4cf89f4eba58ce8d19ee282c7 (diff) | |
| download | stasis-499bbc2e33172dd19f130dc33ced217e51bc48ed.tar.gz | |
Restrict tests from finding STASIS's .git directory
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index dd68231..26c4250 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -17,7 +17,10 @@ if (BASH_PROGRAM AND TESTS_RT) file(REAL_PATH ${rt_file} rt_name) string(REGEX REPLACE ${ext_pattern} "" rt_name ${rt_file}) add_test (${rt_name} ${BASH_PROGRAM} ${rt_file}) - endforeach() + set_property(TEST ${rt_name} + PROPERTY ENVIRONMENT "GIT_CEILING_DIRECTORIES=${CMAKE_BINARY_DIR}" + ) +endforeach() endif() foreach(source_file ${source_files}) @@ -49,5 +52,7 @@ foreach(source_file ${source_files}) PROPERTIES SKIP_RETURN_CODE 127) set_property(TEST ${test_executable} - PROPERTY ENVIRONMENT "STASIS_SYSCONFDIR=${CMAKE_SOURCE_DIR}") + PROPERTY ENVIRONMENT "STASIS_SYSCONFDIR=${CMAKE_SOURCE_DIR}" + PROPERTY ENVIRONMENT "GIT_CEILING_DIRECTORIES=${CMAKE_BINARY_DIR}" + ) endforeach() |
