tests,w32: Make cleanup more robust.
authorJustus Winter <justus@g10code.com>
Tue, 8 Nov 2016 13:11:23 +0000 (14:11 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 8 Nov 2016 15:02:55 +0000 (16:02 +0100)
* tests/openpgp/run-tests.scm (run-tests-parallel): Catch errors when
removing the working directory.  On Windows this can fail if there is
still a process using one of the files there.
(run-tests-sequential): Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
tests/openpgp/run-tests.scm

index 9e9bc3d..23ff8a2 100644 (file)
       (if (null? tests')
          (let ((results (pool::wait)))
            (for-each (lambda (t)
-                       (unlink-recursively t::directory)
+                       (catch (echo "Removing" t::directory "failed:" *error*)
+                              (unlink-recursively t::directory))
                        (t::report)) results::procs)
            (exit (results::report)))
          (let* ((wd (mkdtemp))
       (if (null? tests')
          (let ((results (pool::wait)))
            (for-each (lambda (t)
-                       (unlink-recursively t::directory))
+                       (catch (echo "Removing" t::directory "failed:" *error*)
+                              (unlink-recursively t::directory)))
                      results::procs)
            (exit (results::report)))
          (let* ((wd (mkdtemp))