Skip to content
Snippets Groups Projects
Commit ba0d43d1 authored by Raymond Toy's avatar Raymond Toy
Browse files

Merge branch 'issue-159-use-local-tmp-dir' into 'master'

Fix #159:  Don't use /tmp as a path for temp files

Closes #159

See merge request cmucl/cmucl!116
parents 0d3cbc39 1c99e654
No related branches found
No related tags found
No related merge requests found
...@@ -18,8 +18,10 @@ ...@@ -18,8 +18,10 @@
(declare (ignore arg)) (declare (ignore arg))
form) form)
(defparameter *test-path* (defparameter *tmp-dir*
(merge-pathnames (make-pathname :name :unspecific :type :unspecific (merge-pathnames (make-pathname :directory '(:relative "tmp")
:name :unspecific
:type :unspecific
:version :unspecific) :version :unspecific)
*load-truename*) *load-truename*)
"Directory for temporary test files.") "Directory for temporary test files.")
...@@ -777,10 +779,11 @@ ...@@ -777,10 +779,11 @@
(define-test issue.140.two-way-stream (define-test issue.140.two-way-stream
(:tag :issues) (:tag :issues)
(ensure-directories-exist *tmp-dir*)
(with-open-file (in (merge-pathnames "issues.lisp" cmucl-test-runner::*load-path*) (with-open-file (in (merge-pathnames "issues.lisp" cmucl-test-runner::*load-path*)
:direction :input :direction :input
:external-format :utf-8) :external-format :utf-8)
(with-open-file (out "/tmp/output.tst" (with-open-file (out (merge-pathnames "output.tst" *tmp-dir*)
:direction :output :direction :output
:external-format :utf-8 :external-format :utf-8
:if-exists :supersede) :if-exists :supersede)
...@@ -803,15 +806,15 @@ ...@@ -803,15 +806,15 @@
;; Create 3 output streams. The exact external formats aren't ;; Create 3 output streams. The exact external formats aren't
;; really important here as long as they're different for each file ;; really important here as long as they're different for each file
;; so we can tell if we got the right answer. ;; so we can tell if we got the right answer.
(with-open-file (s1 "/tmp/broad-1" (with-open-file (s1 (merge-pathnames "broad-1" *tmp-dir*)
:direction :output :direction :output
:if-exists :supersede :if-exists :supersede
:external-format :latin1) :external-format :latin1)
(with-open-file (s2 "/tmp/broad-2" (with-open-file (s2 (merge-pathnames "broad-2" *tmp-dir*)
:direction :output :direction :output
:if-exists :supersede :if-exists :supersede
:external-format :utf-8) :external-format :utf-8)
(with-open-file (s3 "/tmp/broad-3" (with-open-file (s3 (merge-pathnames "broad-3" *tmp-dir*)
:direction :output :direction :output
:if-exists :supersede :if-exists :supersede
:external-format :utf-16) :external-format :utf-16)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment