浏览代码

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

Nathalie Furmento 8 年之前
父节点
当前提交
9559b6d56a
共有 1 个文件被更改,包括 4 次插入0 次删除
  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);