]> git.eshelyaron.com Git - emacs.git/commitdiff
Make unit tests use randomized file names
authorDavid Engster <dengste@eml.cc>
Mon, 4 Nov 2013 22:15:03 +0000 (23:15 +0100)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 15:59:25 +0000 (17:59 +0200)
* 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

index 62153d9afa6c1e162686648f8beddfcd18009d55..13656661f9dc5595a253f00f5ec684ce8a4424e7 100644 (file)
    "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"))))
 (semantic-stltest "map")
 ;; I know, not a class...
 (semantic-stltest "iostream")
+(delete-file semantic-stltest-filename)