.travis.yml: don't hide compile failure

Fix compile warnings that snuck in while the test was broken.
This commit is contained in:
Noam Postavsky 2015-11-13 21:59:06 -05:00
parent d79c395f22
commit 00e08b148d
6 changed files with 41 additions and 18 deletions

View File

@ -8,7 +8,7 @@ install:
- prereqs
- '"$EMACS" --version'
script:
- byte-compile
- ert-tests
- folded_call byte-compile
- folded_call ert-tests
- check-recipes
- check-whitespace

View File

@ -22,6 +22,10 @@
(require 'el-get-recipes)
(require 'el-get-build)
(defvar warning-minimum-log-level)
(defvar warning-minimum-level)
(declare-function warning-numeric-level "warnings" (level))
(defvar el-get-check--last-file-or-buffer nil
"The last file-or-buffer checked.")

View File

@ -227,6 +227,14 @@ entry."
((debug error)
(error "Error reading file %s: %S" filename err))))
(defun el-get-package-is-installed (package)
"Return true if PACKAGE is installed"
(and (file-directory-p (el-get-package-directory package))
(string= "installed"
(el-get-read-package-status package))))
(defalias 'el-get-package-installed-p #'el-get-package-is-installed)
;;
;; Some tools

View File

@ -16,6 +16,16 @@
(require 'el-get-core)
(require 'el-get-recipes)
(eval-and-compile
(unless (fboundp 'string-suffix-p) ; introduced in 24.4
(defun string-suffix-p (suffix string &optional ignore-case)
"Return non-nil if SUFFIX is a suffix of STRING.
If IGNORE-CASE is non-nil, the comparison is done without paying
attention to case differences."
(let ((start-pos (- (length string) (length suffix))))
(and (>= start-pos 0)
(eq t (compare-strings suffix nil nil
string start-pos nil ignore-case)))))))
(defun el-get-dependencies (packages)
"Return the list of packages to install in order."
(multiple-value-bind (plist all-sorted-p non-sorted)
@ -102,6 +112,9 @@ A `:minimum-emacs-version' property may also be present."
(interactive (list (el-get-read-package-with-status "Auto-get dependencies of" "installed") t))
(unless (el-get-package-installed-p package)
(error "Tried to get Package-Requires of non-installed package, `%s'!" package))
(eval-and-compile
(require 'lisp-mnt) ; `lm-header'
(require 'thingatpt)) ; `read-from-whole-string'
(loop with deps and min-emacs and sub-pkgs
for pdir in (el-get-load-path package)
do (loop for file in (directory-files pdir t "\\.el\\'" t)

View File

@ -239,14 +239,6 @@ package names."
(unless (plist-member recipe :type)
(error "el-get: package `%s' has incomplete recipe (no :type)" package))))
(defun el-get-package-is-installed (package)
"Return true if PACKAGE is installed"
(and (file-directory-p (el-get-package-directory package))
(string= "installed"
(el-get-read-package-status package))))
(defalias 'el-get-package-installed-p #'el-get-package-is-installed)
(defun el-get-read-package-name (action &optional filtered)
"Ask user for a package name in minibuffer, with completion.
@ -589,11 +581,11 @@ PACKAGE may be either a string or the corresponding symbol."
(defun el-get-reload (package &optional package-status-alist)
"Reload PACKAGE."
(declare (advertised-calling-convention (package) "Feb 2015"))
(interactive
(progn
(el-get-clear-status-cache)
(list (el-get-read-package-with-status "Reload" "installed"))))
(declare (advertised-calling-convention (package) "Feb 2015"))
(el-get-verbose-message "el-get-reload: %s" package)
(el-get-with-status-sources ()
(let* ((all-features features)

View File

@ -21,10 +21,12 @@ if [ "$EMACS" = 'emacs-snapshot' ]; then
check-whitespace() { :; }
else
prereqs() {
(mkdir pkg && cd pkg &&
pkg_compat23=https://raw.githubusercontent.com/mirrors/emacs/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09
ert_compat=https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205
(mkdir -p pkg && cd pkg &&
curl --silent --show-error --location \
--remote-name https://raw.githubusercontent.com/mirrors/emacs/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09/lisp/emacs-lisp/package.el \
--remote-name https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205/lisp/emacs-lisp/ert{,-x}.el)
--remote-name $pkg_compat23/lisp/emacs-lisp/package.el \
--remote-name $ert_compat/lisp/emacs-lisp/ert.el --remote-name $ert_compat/lisp/emacs-lisp/ert-x.el)
}
check-recipes() {
"$EMACS" -Q -L . -batch -l el-get-check -f el-get-check-recipe-batch \
@ -36,17 +38,21 @@ else
}
fi
folded_call() {
travis_fold start $1
$1
ret=$?
travis_fold end $1
return $ret
}
ert-tests() {
travis_fold start ert-tests
"$EMACS" -batch -Q -L pkg/ -L . -l test/el-get-tests.el -f ert-run-tests-batch-and-exit
travis_fold end ert-tests
}
byte-compile() {
travis_fold start byte-compiling
"$EMACS" -Q -L pkg/ -L . -L methods/ -batch --eval '(setq byte-compile-error-on-warn t)' \
-f batch-byte-compile *.el methods/*.el
travis_fold end byte-compiling
}
# show definitions for log