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=bef87bf80a33493102ae844e1bbeb8060efa938b;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/semantic/utest-parse.el b/test/manual/cedet/cedet/semantic/utest-parse.el index 04cf977b220..aa52e5e0b9e 100644 --- a/test/manual/cedet/cedet/semantic/utest-parse.el +++ b/test/manual/cedet/cedet/semantic/utest-parse.el @@ -30,9 +30,8 @@ (require 'semantic) -(defvar semantic-utest-temp-directory (if (fboundp 'temp-directory) - (temp-directory) - temporary-file-directory) +(defvar semantic-utest-temp-directory + (expand-file-name (make-temp-name "CEDET-UTEST-") temporary-file-directory) "Temporary directory to use when creating files.") (defun semantic-utest-fname (name) @@ -868,6 +867,7 @@ INSERTME is the text to be inserted after the deletion." (defun semantic-utest-main() (interactive) "call all utests" + (make-directory semantic-utest-temp-directory) (cedet-utest-log-start "multi-lang parsing") (cedet-utest-log " * C tests...") (semantic-utest-C) @@ -887,7 +887,7 @@ INSERTME is the text to be inserted after the deletion." (semantic-utest-PHP) (cedet-utest-log " * Csharp tests...") (semantic-utest-Csharp) - + (delete-directory semantic-utest-temp-directory) (cedet-utest-log-shutdown "multi-lang parsing") )