emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/merge-cedet-tests 784b5c8 231/316: Make unit tests


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

branch: scratch/merge-cedet-tests
commit 784b5c87f25ef5c0460ddcd7f355a3ed35e63a0b
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.el |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/test/manual/cedet/cedet/srecode/test.el 
b/test/manual/cedet/cedet/srecode/test.el
index 3b52d6e..0461ace 100644
--- a/test/manual/cedet/cedet/srecode/test.el
+++ b/test/manual/cedet/cedet/srecode/test.el
@@ -291,7 +291,8 @@ INSIDE SECTION: ARG HANDLER ONE")
 
 ;;; Master Harness
 ;;
-(defvar srecode-utest-testfile "/tmp/srecode-utest.srt"
+(defvar srecode-utest-testfile
+  (expand-file-name (concat (make-temp-name "srecode-utest-") ".srt") 
temporary-file-directory)
   "File used to do testing.")
 
 ;;;###autoload
@@ -323,7 +324,9 @@ INSIDE SECTION: ARG HANDLER ONE")
        "SRECODE Templates"
        nil ; How to detect a problem?
        )
-      )))
+      ))
+  (when (file-exists-p srecode-utest-testfile)
+    (delete-file srecode-utest-testfile)))
 
 ;;; Project test
 ;;
@@ -370,7 +373,9 @@ INSIDE SECTION: ARG HANDLER ONE")
          (error "Project template found when not in project")))
 
       ;;
-      )))
+      ))
+  (when (file-exists-p srecode-utest-testfile)
+    (delete-file srecode-utest-testfile)))
 
 
 (provide 'cedet/srecode/test)



reply via email to

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