Browse Source

tests/main/mkdtemp.c: also try variables TEMP and TMP, not only TMPDIR

Nathalie Furmento 8 years ago
parent
commit
9559b6d56a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tests/main/mkdtemp.c

+ 4 - 0
tests/main/mkdtemp.c

@@ -31,6 +31,10 @@ int do_test(char *(*func)(char *tmpl))
 	path = starpu_getenv("TMPDIR");
 	if (!path)
 		path = "/tmp";
+	if (!path)
+		path = starpu_getenv("TEMP");
+	if (!path)
+		path = starpu_getenv("TMP");
 	snprintf(dirname, 128, "%s/abcdef_XXXXXX", path);
 	ptr = func(dirname);
 	FPRINTF(stderr, "Directory '%s' (res '%s')\n", dirname, ptr);