+2013-05-14 Glenn Morris <rgm@gnu.org>
+
+ * cus-test.el (cus-test-get-lisp-files): Ignore obsolete/.
+ (cus-test-libs): Fix let-binding of default-directory.
+ (cus-test-noloads): Load all libs for the comparison.
+
2013-05-11 Glenn Morris <rgm@gnu.org>
* cus-test.el (cus-test-libs-noloads): Add a few more files.
;;
;; The basic tests can be run in batch mode. Invoke them with
;;
-;; src/emacs -batch -l admin/cus-test.el -f cus-test-opts
+;; src/emacs -batch -l admin/cus-test.el -f cus-test-opts [all]
;;
;; src/emacs -batch -l admin/cus-test.el -f cus-test-deps
;;
-;; src/emacs -batch -l admin/cus-test.el -f cus-test-libs
+;; src/emacs -batch -l admin/cus-test.el -f cus-test-libs [all]
;;
;; src/emacs -batch -l admin/cus-test.el -f cus-test-noloads
;;
(defun cus-test-get-lisp-files (&optional all)
"Return list of all Lisp files with defcustoms.
-Optional argument ALL non-nil means list all Lisp files."
+Optional argument ALL non-nil means list all (non-obsolete) Lisp files."
(let ((default-directory (expand-file-name "lisp/" source-directory))
(msg "Finding files..."))
(message "%s" msg)
;; Hack to remove leading "./".
(mapcar (lambda (e) (substring e 2))
(apply 'process-lines find-program
+ "-name" "obsolete" "-prune" "-o"
"-name" "[^.]*.el" ; ignore .dir-locals.el
- (unless all
+ (if all
+ '("-print")
(list "-exec" grep-program
"-l" "^[ \t]*(defcustom" "{}" "+"))))
(message "%sdone" msg))))
command-line-args-left
(setq more (pop command-line-args-left)))
(cus-test-load-1
- (let ((default-directory source-directory)
- (emacs (expand-file-name "src/emacs"))
- skipped)
+ (let* ((default-directory source-directory)
+ (emacs (expand-file-name "src/emacs"))
+ skipped)
(or (file-executable-p emacs)
- (error "No Emacs executable in %ssrc" default-directory))
+ (error "No such executable `%s'" emacs))
(mapc
(lambda (file)
(if (member file cus-test-libs-noloads)
(cus-test-get-options ""))
(message "Running %s" 'cus-test-load-libs)
- (cus-test-load-libs)
+ (cus-test-load-libs "all")
(setq cus-test-vars-not-cus-loaded
(cus-test-get-options ""))