From: David Engster Date: Mon, 4 Nov 2013 22:15:03 +0000 (+0100) Subject: Make unit tests use randomized file names X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=529fe15d605548b84d23552abe18d979e0f3ae03;p=emacs.git Make unit tests use randomized file names * tests/cedet/semantic/stltest.el: * tests/cedet/semantic/utest-parse.el: * tests/cedet/srecode/fields-utest.el: * tests/cedet/srecode/test-getset.el: * tests/cedet/srecode/test.el: * tests/eieio/eieio-test-persist.el: Make all those tests use `make-temp-name' for their test files, so that tests can run in parallel. --- diff --git a/test/manual/cedet/cedet/srecode/test-getset.el b/test/manual/cedet/cedet/srecode/test-getset.el index c70be41e351..2d544cc0702 100644 --- a/test/manual/cedet/cedet/srecode/test-getset.el +++ b/test/manual/cedet/cedet/srecode/test-getset.el @@ -49,7 +49,10 @@ private: ;;; Master Harness ;; -(defvar srecode-utest-getset-testfile "/tmp/srecode-utest-getset.cpp" +(defvar srecode-utest-getset-testfile + (expand-file-name + (concat (make-temp-name "srecode-utest-getset-") ".cpp") + temporary-file-directory) "File used to do testing.") ;;;###autoload @@ -127,6 +130,8 @@ private: (re-search-forward "miscFunction" pos)) )) + (when (file-exists-p srecode-utest-getset-testfile) + (delete-file srecode-utest-getset-testfile)) (cedet-utest-log-shutdown "SRECODE Get/Set" nil ; How to detect a problem?