[Git][cmucl/cmucl][master] Remove test files from tests

Raymond Toy rtoy at common-lisp.net
Sat Mar 3 22:29:10 UTC 2018


Raymond Toy pushed to branch master at cmucl / cmucl


Commits:
3c56ed8c by Raymond Toy at 2018-03-03T14:28:53-08:00
Remove test files from tests

The tests create some files in /tmp.  Remove them when the test script
ends so that we get a clean directory.

I think this fixes the issue with the osx-runner sometimes failing
because it can't remove the temp files that I created locally when
testing locally.

- - - - -


1 changed file:

- bin/run-tests.sh


Changes:

=====================================
bin/run-tests.sh
=====================================
--- a/bin/run-tests.sh
+++ b/bin/run-tests.sh
@@ -34,12 +34,19 @@ done
 # Shift out the options
 shift $[$OPTIND - 1]
 
-# Create the test directory needed issue.45 test.
-
+# Create the test directory needed by the issue.45 test.
 rm -rf test-tmp
 mkdir test-tmp
 ln -s /bin/ls test-tmp/ls-link
 
+# Cleanup temp files and directories that we created during testing.
+function cleanup {
+    rm -f /tmp/trac.36.bom.txt /tmp/trac.43.txt
+    rm -rf /tmp/foo
+}
+
+trap cleanup EXIT
+
 if [ $# -eq 0 ]; then
     # No args so run all the tests
     $LISP -noinit -load tests/run-tests.lisp -eval '(cmucl-test-runner:run-all-tests)'



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/3c56ed8c550e509b3f080e531017fb727b30b4a5

---
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/3c56ed8c550e509b3f080e531017fb727b30b4a5
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20180303/32a24b51/attachment.html>


More information about the cmucl-cvs mailing list