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/files-tests.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tests/files-tests.c') diff --git a/src/tests/files-tests.c b/src/tests/files-tests.c index 2ebe659d..2267a603 100644 --- a/src/tests/files-tests.c +++ b/src/tests/files-tests.c @@ -34,6 +34,7 @@ #include "config.h" #include "tools/tools_util.h" #include "util/util.h" +#include "tests/common.h" static char tpl_dir[] = "file-tests-dir-XXXXXX"; static char *dir_path; @@ -312,6 +313,8 @@ int main(int argc, char *argv[]) poptFreeContext(pc); debug_level = debug; + tests_set_cwd(); + Suite *s = files_suite(); SRunner *sr = srunner_create(s); /* If CK_VERBOSITY is set, use that, otherwise it defaults to CK_NORMAL */ -- cgit