diff options
author | Justus Winter <[email protected]> | 2016-09-19 13:59:19 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-09-19 16:49:17 +0000 |
commit | 83a406b38a21d0eeb4963db824a27783c212d2fb (patch) | |
tree | 3b1d927e45962644a92b4056c88aa76795c693bd /tests/gpgscm/tests.scm | |
parent | gpg: Fix regression in fingerprint printing. (diff) | |
download | gnupg-83a406b38a21d0eeb4963db824a27783c212d2fb.tar.gz gnupg-83a406b38a21d0eeb4963db824a27783c212d2fb.zip |
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 <[email protected]>
Diffstat (limited to 'tests/gpgscm/tests.scm')
-rw-r--r-- | tests/gpgscm/tests.scm | 5 |
1 files changed, 4 insertions, 1 deletions
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) |