[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 8900419 148/316: Added arduino p
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 8900419 148/316: Added arduino project detection |
Date: |
Fri, 27 Jan 2017 20:03:35 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 8900419f3e60994e43c15216db072bc7b0ec08a7
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
Added arduino project detection
* test/manual/cedet/cedet/ede/detect-utest.el:
(ede-detect-utest-project-dirmatch-list): Add arduino. Add subdir
tests for dirmatch and arudino. (ede-detect-utest): Also test for
arduino lib not loading/loading. (ede-detect-utest-arduino-fname):
New. (ede-detect-utest-init-dirmatch): Reconfigure for reading
arduino data out of temp created config files.
---
test/manual/cedet/cedet/ede/detect-utest.el | 46 ++++++++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/test/manual/cedet/cedet/ede/detect-utest.el
b/test/manual/cedet/cedet/ede/detect-utest.el
index 44714f6..588adc8 100644
--- a/test/manual/cedet/cedet/ede/detect-utest.el
+++ b/test/manual/cedet/cedet/ede/detect-utest.el
@@ -47,7 +47,10 @@ Each entry is a cons cell:
(defvar ede-detect-utest-project-dirmatch-list
'(
+ ("src/dirmatch/MyDirmatch/sub/dmlib.cpp" .
ede-detect-test-dirmatch-project-p)
("src/dirmatch/MyDirmatch/MyDirmatch.cpp" .
ede-detect-test-dirmatch-project-p)
+ ("src/arduino/Blink/sub/lib.cpp" . ede-arduino-project-p)
+ ("src/arduino/Blink/Blink.ino" . ede-arduino-project-p)
)
"List of sources to load in projects detected via DIRMATCH feature.
Each entry is a cons cell:
@@ -94,6 +97,12 @@ Each entry is a cons cell:
(push "dirtest noload expected" errlog))
(semantic-ia-utest-log "** Successfully did not load DIRTEST project."))
+ (if (featurep 'ede/arduino)
+ (progn
+ (semantic-ia-utest-log "!! Project type using Arduino loaded
unexpectedly.")
+ (push "arduino noload expected" errlog))
+ (semantic-ia-utest-log "** Successfully did not load Arduino project."))
+
;; Now make sure that DIRTEST is testing properly.
(ede-detect-utest-loop ede-detect-utest-project-dirmatch-list)
@@ -105,6 +114,12 @@ Each entry is a cons cell:
(push "dirtest load expected" errlog))
(semantic-ia-utest-log "** Successfully loaded DIRTEST project."))
+ (if (not (featurep 'ede/arduino))
+ (progn
+ (semantic-ia-utest-log "!! Project type using Arduino didn't
loaded.")
+ (push "arduino load expected" errlog))
+ (semantic-ia-utest-log "** Successfully loaded Arduino project."))
+
;; Close out the test suite.
(cedet-utest-log-shutdown
"EDE DETECT"
@@ -227,8 +242,15 @@ Each entry is a cons cell:
temporary-file-directory)
"A config file to use with DIRTEST.")
+(defvar ede-detect-utest-arduino-fname
+ (expand-file-name (concat (make-temp-name "utest-arduino-") ".txt")
+ temporary-file-directory)
+ "A config file to use with detection of arduino.")
+
(defun ede-detect-utest-init-dirmatch ()
"Init the config file for for dirtesting."
+
+ ;; Setup the DIRMATCH project type.
(let ((mypath (expand-file-name "dirmatch" (ede-detect-utest-basedir))))
;;(message "Dirmatch Location: %s" mypath)
(save-excursion
@@ -236,7 +258,29 @@ Each entry is a cons cell:
(erase-buffer)
(insert "path=" mypath "\n")
(save-buffer 0)
- )))
+ ))
+
+ ;; Override some bits of the ARDUINO project type.
+ (setq ede-arduino-preferences-file ede-detect-utest-arduino-fname)
+
+ (let ((mypath (expand-file-name "arduino" (ede-detect-utest-basedir))))
+ ;;(message "Dirmatch Location: %s" mypath)
+ (save-excursion
+ (set-buffer (semantic-find-file-noselect ede-detect-utest-arduino-fname))
+ (erase-buffer)
+ (insert "sketchbook.path=" mypath "\n"
+ "serial.port=tty00\n"
+ "board=uno\n")
+ (save-buffer 0)
+ ) )
+ ;; Now we need to augment the existing autoloader for arduino.
+ (let* ((arduinoauto (object-assoc 'ede/arduino :file
+ ede-project-class-files))
+ (adm (oref arduinoauto proj-root-dirmatch)))
+ ;; Splice the new tmp pref file into the system.
+ (oset adm :fromconfig ede-arduino-preferences-file))
+
+ )
(ede-add-project-autoload
(ede-project-autoload "dirmatchtest"
- [Emacs-diffs] scratch/merge-cedet-tests 217feb1 080/316: Synchronize cedet/semantic with Emacs., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 217feb1 080/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9641120 108/316: Fake configure.in for project detection purposes., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 85a3b5a 106/316: (cit): Add "cit-projvar.el"., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests adc318b 115/316: New test file., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 216e4f4 129/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ceb9293 130/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 7b417f2 131/316: Tests contributed by Barry OReilly, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6d9366a 135/316: Make 'this' a pointer., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests a3da4e8 121/316: Added new file to test completion on STL classes and namespace., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests a7926fd 155/316: detect-utest.el: (ede-detect-utest-configdir): New fcn (ede-detect-utest-arduino-install): New faux install dir (ede-detect-utest-init-dirmatch): Point at fake intalldir to get fake board., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 8900419 148/316: Added arduino project detection,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 9c2d002 145/316: Added cpproot and java root to detection tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 39048f9 153/316: (ede-detect-utest): Re-run tests with inode optimization disabled., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 14c75f7 175/316: (cit-version): New variable. (semantic): New require, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests fa54ec1 162/316: (isFooLike, A, B, main2): New test tweaked from example by Liang Wang, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 4972b30 176/316: (ede, ede-make): New require (cit-srecode-verify-tags): Fix debugging output on failure. Patch from David Engster (cit-compile-and-wait): Use ede-make-command, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 47c4081 165/316: sample lib srces for dirmatch tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 86ed340 147/316: Additions to detection testing, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 0781aac 164/316: Add comments, require cedet-files., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 7661178 186/316: Improve compilation error checking, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 47b5933 185/316: Move compilation error handling to new function, Edward John Steere, 2017/01/27