emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/merge-cedet-tests 529fe15 195/316: Make unit tests


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests 529fe15 195/316: Make unit tests use randomized file names
Date: Sat, 28 Jan 2017 09:10:01 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit 529fe15d605548b84d23552abe18d979e0f3ae03
Author: David Engster <address@hidden>
Commit: Edward John Steere <address@hidden>

    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/srecode/test-getset.el |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/manual/cedet/cedet/srecode/test-getset.el 
b/test/manual/cedet/cedet/srecode/test-getset.el
index c70be41..2d544cc 100644
--- a/test/manual/cedet/cedet/srecode/test-getset.el
+++ b/test/manual/cedet/cedet/srecode/test-getset.el
@@ -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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]