From: zappo Date: Sat, 26 Dec 2009 22:42:40 +0000 (+0000) Subject: Move compilation error handling to new function X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=47b59337d3d62e2016620df05f3b020180dc9428;p=emacs.git Move compilation error handling to new function * test/manual/cedet/cedet-integ-test.el (cit-dist): New require. (cedet-integ-test-proj): Call new cit-dist tests. (cit-compile-and-wait): Split part out to... (cit-wait-for-compilation): New. --- diff --git a/test/manual/cedet/cedet-integ-test.el b/test/manual/cedet/cedet-integ-test.el index bd477116760..e62ae74ef0b 100644 --- a/test/manual/cedet/cedet-integ-test.el +++ b/test/manual/cedet/cedet-integ-test.el @@ -77,8 +77,10 @@ ;; @TODO - ;; 6) Create a distribution file. ;; a Call "make dist" -;; b In a fresh dir, unpack the dist. -;; c Compile that dist. +;; b update the version number +;; c make a new dist. Verify version number. +;; d In a fresh dir, unpack the dist. +;; e Compile that dist. (require 'semantic) (require 'ede) @@ -97,6 +99,7 @@ (require 'cit-el) (require 'cit-texi) (require 'cit-gnustep) +(require 'cit-dist) (defvar cedet-integ-target (expand-file-name "edeproj" cedet-integ-base) "Root of the EDE project integration tests.") @@ -158,6 +161,10 @@ Optional argument MAKE-TYPE is the style of EDE project to test." ;; Do some texinfo documentation. (cit-srecode-fill-texi) + ;; Create a distribution + (find-file (expand-file-name "README" cedet-integ-target)) + (cit-make-dist) + (cit-finish-message "PASSED" make-type) ) @@ -320,21 +327,28 @@ such as 'clean'." ;; 1 g) build the sources. (compile (concat ede-make-command (or ARGS ""))) - (while compilation-in-progress - (accept-process-output) - (sit-for 1)) + (cit-wait-for-compilation) - (save-excursion - (set-buffer "*compilation*") - (goto-char (point-max)) - - (when (re-search-backward " Error " nil t) - (error "Compilation failed!")) - - ) (kill-buffer bufftokill) )) +(defun cit-wait-for-compilation () + "Wait for a compilation to finish." + + (while compilation-in-progress + (accept-process-output) + (sit-for 1)) + + (save-excursion + (set-buffer "*compilation*") + (goto-char (point-max)) + + (when (re-search-backward " Error " nil t) + (error "Compilation failed!")) + + ) + ) + (defun cit-run-target (command) "Run the program (or whatever) that is associated w/ the current target. Use COMMAND to run the program."