From c132878d581e53494606bc90adf3b3f5a63c6ee9 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/stltest.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/manual/cedet/cedet/semantic/stltest.el b/test/manual/cedet/cedet/semantic/stltest.el index 62153d9afa6..13656661f9d 100644 --- a/test/manual/cedet/cedet/semantic/stltest.el +++ b/test/manual/cedet/cedet/semantic/stltest.el @@ -75,11 +75,16 @@ "right" "scientific" "showbase" "showpoint" "showpos" "skipws" "unitbuf" "uppercase" "ws")) +(defvar semantic-stltest-filename + (expand-file-name + (concat (make-temp-name "stltest-") ".cpp") + temporary-file-directory)) + (defun semantic-stltest (class) "Test completions on CLASS." (semantic-mode 1) (with-current-buffer - (find-file-noselect "/tmp/stltest.cpp") + (find-file-noselect semantic-stltest-filename) (erase-buffer) (insert (symbol-value (intern (concat "semantic-stltest-" class "-buf")))) @@ -101,3 +106,4 @@ (semantic-stltest "map") ;; I know, not a class... (semantic-stltest "iostream") +(delete-file semantic-stltest-filename) -- 2.39.2