From 9fb59763bce293c2490e0b9f8e97bb1f74ba0910 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 26 Feb 2010 09:04:11 -0500 Subject: Add --with-test-dir option to configure All 'make check' tests will chdir() into this directory before running the suite. This provides the option of having temporary files generated in a tmpfs or ramdisk --- src/tests/sysdb-tests.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tests/sysdb-tests.c') diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index 8b486b691..c6661aef6 100644 --- a/src/tests/sysdb-tests.c +++ b/src/tests/sysdb-tests.c @@ -29,6 +29,7 @@ #include "util/util.h" #include "confdb/confdb_setup.h" #include "db/sysdb_private.h" +#include "tests/common.h" #define TESTS_PATH "tests_sysdb" #define TEST_CONF_FILE "tests_conf.ldb" @@ -3297,6 +3298,8 @@ int main(int argc, const char *argv[]) { } poptFreeContext(pc); + tests_set_cwd(); + ret = unlink(TESTS_PATH"/"LOCAL_SYSDB_FILE); if (ret != EOK && errno != ENOENT) { fprintf(stderr, "Could not delete the test ldb file (%d) (%s)\n", -- cgit