From 3e28bdef8bd8dea36858021ee53194952c6c18af Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Mon, 25 Jan 2016 22:04:14 +0900 Subject: [PATCH] wrap delete-file in protect for cygwin The file may still be referenced by the parent process. Fixes issue #302. --- tests/ffi/ffi-tests.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/ffi/ffi-tests.scm b/tests/ffi/ffi-tests.scm index e01509b5..f6cdb144 100644 --- a/tests/ffi/ffi-tests.scm +++ b/tests/ffi/ffi-tests.scm @@ -30,11 +30,12 @@ (load lib-file) tests ... ;; on any failure leave the stub and c file for reference - (cond - ((= orig-failures (test-failure-count)) - (delete-file stub-file) - (delete-file c-file))) - (delete-file lib-file))) + (protect (exn (else #f)) + (cond + ((= orig-failures (test-failure-count)) + (delete-file stub-file) + (delete-file c-file))) + (delete-file lib-file)))) (else (test-assert (string-append "couldn't compile " name) #f))))))))