diff options
author | Glenn Morris <rgm@gnu.org> | 2013-05-13 22:12:19 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-05-13 22:12:19 -0400 |
commit | 29efd4698b7393c3df7c7419b3c250f29ef7497c (patch) | |
tree | 7d9b3790211b6ba41f4159ee93684303c1b648ef /admin/cus-test.el | |
parent | bf8154b1afb7b2c8a71d793410efb047648289ff (diff) | |
download | emacs-29efd4698b7393c3df7c7419b3c250f29ef7497c.tar.gz |
More cus-test.el tweaks
* admin/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.
Diffstat (limited to 'admin/cus-test.el')
-rw-r--r-- | admin/cus-test.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/admin/cus-test.el b/admin/cus-test.el index 3553f62bb0e..e68ee7744e7 100644 --- a/admin/cus-test.el +++ b/admin/cus-test.el @@ -30,11 +30,11 @@ ;; ;; 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 ;; @@ -314,7 +314,7 @@ If it is \"all\", load all Lisp files." (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) @@ -322,8 +322,10 @@ Optional argument ALL non-nil means list all Lisp files." ;; 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)))) @@ -448,11 +450,11 @@ If it is \"all\", load all Lisp files." 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) @@ -498,7 +500,7 @@ in the Emacs source directory." (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 "")) |