[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 909e1b9 158/316: (ede-detect-ute
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 909e1b9 158/316: (ede-detect-utest-init-dirmatch): Force the dirmatch configdatastash to be unbound to force arduino to flush any cached values. |
Date: |
Fri, 27 Jan 2017 20:03:36 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 909e1b9ff3814607f05648f2da1b9dc3cf0e565b
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
(ede-detect-utest-init-dirmatch): Force the dirmatch configdatastash to be
unbound to force arduino to flush any cached values.
---
test/manual/cedet/cedet/ede/detect-utest.el | 87 +++++++++++++++++++--------
1 file changed, 63 insertions(+), 24 deletions(-)
diff --git a/test/manual/cedet/cedet/ede/detect-utest.el
b/test/manual/cedet/cedet/ede/detect-utest.el
index 0355785..9ad1d57 100644
--- a/test/manual/cedet/cedet/ede/detect-utest.el
+++ b/test/manual/cedet/cedet/ede/detect-utest.el
@@ -1,6 +1,6 @@
;;; ede/detect.el --- Tests for detecting different kinds of projects.
;;
-;; Copyright (C) 2014 Eric M. Ludlam
+;; Copyright (C) 2014, 2015 Eric M. Ludlam
;;
;; Author: Eric M. Ludlam <address@hidden>
;;
@@ -194,6 +194,17 @@ It is passed the root project found.")
)
"List of testing entries that do not use `diretest' feature.")
+(defvar ede-detect-utest-linux-extra-project-entries
+ (list
+ (ede-detect-entry "linux driver" :file "src/linux/drivers/block/ub.c"
+ :classp 'ede-linux-project-p)
+ (ede-detect-entry "linux" :file "src/linux/Makefile"
+ :classp 'ede-linux-project-p)
+ (ede-detect-entry "linux sub" :file "src/linux/scripts/ver_linux"
+ :classp 'ede-linux-project-p)
+ )
+ "List of testing entries that do not use `diretest' feature.")
+
(defvar ede-detect-utest-project-dirmatch-entries
(list
(ede-detect-entry "dirmatch sub"
@@ -240,9 +251,11 @@ It is passed the root project found.")
(ede-detect-utest-basedir)))
;;;###autoload
-(defun ede-detect-utest ()
- "Test out the detection scheme for EDE."
+(defun ede-detect-utest (&optional FLAG)
+ "Test out the detection scheme for EDE.
+Optional FLAG is for re-running a subset of tests with an alternate config."
(interactive)
+ (unless FLAG (setq FLAG 'none))
(save-excursion
;; Make sure the dirtest project is set-up, but without
;; loading in the project type.
@@ -261,23 +274,35 @@ It is passed the root project found.")
;; (message (eieio-object-name pc) ))
;; Start Logging
- (cedet-utest-log-setup "EDE DETECT")
+ (cond
+ ((eq FLAG 'none)
+ (cedet-utest-log-setup "EDE DETECT"))
+ ((eq FLAG 'linux)
+ (cedet-utest-log-setup "EDE LINUX EXTRA DETECT"))
+ )
(let ((errlog nil))
;; Test all the primary project types.
- (ede-detect-utest-loop ede-detect-utest-project-entries)
-
- ;; Make sure we didn't accidentally pull in the project using
- ;; the dirtest project type.
- (ede-detect-utest-validate-loadstate nil)
-
- ;; Now make sure that DIRTEST is testing properly.
- (ede-detect-utest-loop ede-detect-utest-project-dirmatch-entries)
-
- ;; Make sure we did load dirtest - though that should be obvious if prev
- ;; line worked.
- (ede-detect-utest-validate-loadstate t)
+ (cond
+ ((eq FLAG 'none)
+ (ede-detect-utest-loop ede-detect-utest-project-entries FLAG))
+ ((eq FLAG 'linux)
+ (ede-detect-utest-loop ede-detect-utest-linux-extra-project-entries
FLAG))
+ )
+
+ (when (member FLAG '(none))
+ ;; Make sure we didn't accidentally pull in the project using
+ ;; the dirtest project type.
+ (ede-detect-utest-validate-loadstate nil)
+
+ ;; Now make sure that DIRTEST is testing properly.
+ (ede-detect-utest-loop ede-detect-utest-project-dirmatch-entries FLAG)
+
+ ;; Make sure we did load dirtest - though that should be obvious if pre
+ ;; line worked.
+ (ede-detect-utest-validate-loadstate t)
+ )
;; Now lets retry the basics with INODE support turned off -- assuming
;; that our test platform supports it in the first place.
@@ -289,27 +314,41 @@ It is passed the root project found.")
(cedet-utest-log "\n-- Retry All Tests w/ INODE optimizations
disabled.")
;; ReTry all the primary project types.
- (ede-detect-utest-loop ede-detect-utest-project-entries)
+ (cond
+ ((eq FLAG 'none)
+ (ede-detect-utest-loop ede-detect-utest-project-entries FLAG))
+ ((eq FLAG 'linux)
+ (ede-detect-utest-loop
ede-detect-utest-linux-extra-project-entries FLAG))
+ )
;; Now retry that DIRTEST is testing properly.
- (ede-detect-utest-loop ede-detect-utest-project-dirmatch-entries)
+ (when (member FLAG '(none))
+ (ede-detect-utest-loop
ede-detect-utest-project-dirmatch-entries FLAG))
)
(setq ede--disable-inode nil)))
;; Close out the test suite.
+ (let ((msg (cond ((eq FLAG 'none)
+ "")
+ ((eq FLAG 'linux)
+ "LINUX "))))
(cedet-utest-log-shutdown
- "EDE DETECT"
+ (concat "EDE " msg "DETECT")
(when errlog
- (format "%s Failures found." (length errlog))))
- )))
-
+ (format "%s Failures found." (length errlog))))
+ ))))
-(defun ede-detect-utest-loop (test-entries)
+(defun ede-detect-utest-loop (test-entries FLAG)
"Test the primary EDE project types."
(save-excursion
(let ((project-linux-build-directory-default 'same)
- (project-linux-architecture-default "glnx")
+ (project-linux-architecture-default
+ (cond
+ ((eq FLAG 'none)
+ 'same)
+ ((eq FLAG 'linux)
+ "/tmp/")))
(ede-project-directories t) ; safe to load Project.ede
(basedir nil)
(baselen nil)
- [Emacs-diffs] scratch/merge-cedet-tests 377e041 142/316: Move tests in cedet/semantic, (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 377e041 142/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ae78cf0 140/316: Tests: Add ERT test for the C Bovinator, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 0897a28 127/316: Test file for Project.ede proj., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 3fd7717 192/316: Synchronize cedet/srecode with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 558874e 169/316: Update comments, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests db5f56b 172/316: (cedet-integ-test): Post a PASSED message., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 40b4bd4 204/316: Adedd `ede-detect-utest', Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 24be9ac 184/316: Insert tag's code if it's there, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6bd181e 224/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests df0e0e6 193/316: Synchronize cedet/srecode with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 909e1b9 158/316: (ede-detect-utest-init-dirmatch): Force the dirmatch configdatastash to be unbound to force arduino to flush any cached values.,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 50cce19 183/316: Added lib dir and make-type argument, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 82586cd 209/316: eieio: Move to obsolete and use the one that ships with Emacs, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 7eeab10 240/316: (cit-remove-and-do-shared-lib): Enable for use with Make projects too. Create the srcs in a new lib directory., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 27001fd 271/316: Accept the make-tipe argument to control tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9679584 296/316: Remove compatibility function `cedet-called-interactively-p'., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 2316f19 173/316: Add whitespace at the end of a filled buffer, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ef97bdd 203/316: (cedet-utest-batch): Disable saving EDE's cache file., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 764db86 236/316: (cit-remove-add-to-project-cpp): Wait for make to finish., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e492fd9 301/316: (semantic-ia-utest-file-list): Add testunion.cpp., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c561582 298/316: Improve test utilities, Edward John Steere, 2017/01/27