emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/merge-cedet-tests bef87bf 290/316: Make unit tests


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests bef87bf 290/316: Make unit tests use randomized file names
Date: Fri, 27 Jan 2017 20:03:48 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit bef87bf80a33493102ae844e1bbeb8060efa938b
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/semantic/utest-parse.el |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/manual/cedet/cedet/semantic/utest-parse.el 
b/test/manual/cedet/cedet/semantic/utest-parse.el
index 04cf977..aa52e5e 100644
--- a/test/manual/cedet/cedet/semantic/utest-parse.el
+++ b/test/manual/cedet/cedet/semantic/utest-parse.el
@@ -30,9 +30,8 @@
 
 (require 'semantic)
 
-(defvar semantic-utest-temp-directory (if (fboundp 'temp-directory)
-                                         (temp-directory)
-                                       temporary-file-directory)
+(defvar semantic-utest-temp-directory
+  (expand-file-name (make-temp-name "CEDET-UTEST-") temporary-file-directory)
   "Temporary directory to use when creating files.")
 
 (defun semantic-utest-fname (name)
@@ -868,6 +867,7 @@ INSERTME is the text to be inserted after the deletion."
 (defun semantic-utest-main()
   (interactive)
   "call all utests"
+  (make-directory semantic-utest-temp-directory)
   (cedet-utest-log-start "multi-lang parsing")
   (cedet-utest-log " * C tests...")
   (semantic-utest-C)
@@ -887,7 +887,7 @@ INSERTME is the text to be inserted after the deletion."
   (semantic-utest-PHP)
   (cedet-utest-log " * Csharp tests...")
   (semantic-utest-Csharp)
-
+  (delete-directory semantic-utest-temp-directory)
   (cedet-utest-log-shutdown "multi-lang parsing")
   )
 



reply via email to

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