]> 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 17:04:09 +0000 (19:04 +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/srecode/test-getset.el

index c70be41e351e665b1248a8a8d69dddc9650f7840..2d544cc07028b1a978cef3389b59baa68de5a2fd 100644 (file)
@@ -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?