From 83a406b38a21d0eeb4963db824a27783c212d2fb Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 19 Sep 2016 15:59:19 +0200 Subject: tests: Use descriptive temporary file names. * tests/gpgscm/ffi.c (do_get_isotime): New function. (ffi_init): Add parameter 'scriptname', bind new function and scriptname. * tests/gpgscm/ffi.h (ffi_init): Update prototype. * tests/gpgscm/main.c (main): Hand in the script name. * tests/gpgscm/tests.scm (mkdtemp): Use current time and script name for the names of temporary directories. Signed-off-by: Justus Winter --- tests/gpgscm/tests.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/gpgscm/tests.scm') diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm index 8283ebad9..0738bc687 100644 --- a/tests/gpgscm/tests.scm +++ b/tests/gpgscm/tests.scm @@ -253,7 +253,10 @@ ;; generic name is used. (define (mkdtemp . components) (_mkdtemp (if (null? components) - (path-join (getenv "TMP") "gpgscm-XXXXXX") + (path-join (getenv "TMP") + (string-append "gpgscm-" (get-isotime) "-" + (basename-suffix *scriptname* ".scm") + "-XXXXXX")) (apply path-join components)))) (macro (with-temporary-working-directory form) -- cgit v1.2.3