1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

tests: Improve temporary directory handling.

* tests/gpgscm/ffi.c (ffi_init): Rename 'mkdtemp'.
* tests/gpgscm/tests.scm (mkdtemp): New function that uses a sensible
location and template if no arguments are given.
(with-temporary-working-directory): Simplify accordingly.
(make-temporary-file): Likewise.
* tests/openpgp/run-tests.scm (run-tests-parallel-isolated): Likewise.
(run-tests-sequential-isolated): Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-08-10 11:54:11 +02:00
parent efe973dab7
commit d9240a3a46
3 changed files with 14 additions and 5 deletions

View file

@ -128,7 +128,7 @@
(unlink-recursively t::directory)
(t::report)) results::procs)
(exit (results::report)))
(let* ((wd (mkdtemp "gpgscm-XXXXXX"))
(let* ((wd (mkdtemp))
(test (car tests'))
(test' (test::set-directory wd))
(setup' (setup::set-directory wd)))
@ -154,7 +154,7 @@
(unlink-recursively t::directory))
results::procs)
(exit (results::report)))
(let* ((wd (mkdtemp "gpgscm-XXXXXX"))
(let* ((wd (mkdtemp))
(test (car tests'))
(test' (test::set-directory wd))
(setup' (setup::set-directory wd)))