mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <justus@g10code.com>
This commit is contained in:
parent
998643666c
commit
83a406b38a
4 changed files with 21 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue