Commit 29eed1c7 by Edward Thomson

clar: use a custom temp directory name

parent 4bb6ffb6
......@@ -454,6 +454,7 @@ IF (BUILD_CLAR)
SET(CLAR_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources" CACHE PATH "Path to test resources.")
ADD_DEFINITIONS(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\")
ADD_DEFINITIONS(-DCLAR_RESOURCES=\"${TEST_RESOURCES}\")
ADD_DEFINITIONS(-DCLAR_TMPDIR=\"libgit2_tests\")
INCLUDE_DIRECTORIES(${CLAR_PATH})
FILE(GLOB_RECURSE SRC_TEST ${CLAR_PATH}/*/*.c ${CLAR_PATH}/*/*.h)
......
......@@ -72,7 +72,12 @@ static void clar_unsandbox(void)
static int build_sandbox_path(void)
{
#ifdef CLAR_TMPDIR
const char path_tail[] = CLAR_TMPDIR "_XXXXXX";
#else
const char path_tail[] = "clar_tmp_XXXXXX";
#endif
size_t len;
if (find_tmp_path(_clar_path, sizeof(_clar_path)) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment