From bef87bf80a33493102ae844e1bbeb8060efa938b Mon Sep 17 00:00:00 2001 From: David Engster Date: Mon, 4 Nov 2013 23:15:03 +0100 Subject: [PATCH] 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. --- test/manual/cedet/cedet/semantic/utest-parse.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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") ) -- 2.39.5