aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorGlenn Morris2013-05-13 22:12:19 -0400
committerGlenn Morris2013-05-13 22:12:19 -0400
commit29efd4698b7393c3df7c7419b3c250f29ef7497c (patch)
tree7d9b3790211b6ba41f4159ee93684303c1b648ef /admin
parentbf8154b1afb7b2c8a71d793410efb047648289ff (diff)
downloademacs-29efd4698b7393c3df7c7419b3c250f29ef7497c.tar.gz
emacs-29efd4698b7393c3df7c7419b3c250f29ef7497c.zip
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')
-rw-r--r--admin/ChangeLog6
-rw-r--r--admin/cus-test.el20
2 files changed, 17 insertions, 9 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog
index b83b0811e54..5ae948ad192 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,9 @@
12013-05-14 Glenn Morris <rgm@gnu.org>
2
3 * cus-test.el (cus-test-get-lisp-files): Ignore obsolete/.
4 (cus-test-libs): Fix let-binding of default-directory.
5 (cus-test-noloads): Load all libs for the comparison.
6
12013-05-11 Glenn Morris <rgm@gnu.org> 72013-05-11 Glenn Morris <rgm@gnu.org>
2 8
3 * cus-test.el (cus-test-libs-noloads): Add a few more files. 9 * cus-test.el (cus-test-libs-noloads): Add a few more files.
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 @@
30;; 30;;
31;; The basic tests can be run in batch mode. Invoke them with 31;; The basic tests can be run in batch mode. Invoke them with
32;; 32;;
33;; src/emacs -batch -l admin/cus-test.el -f cus-test-opts 33;; src/emacs -batch -l admin/cus-test.el -f cus-test-opts [all]
34;; 34;;
35;; src/emacs -batch -l admin/cus-test.el -f cus-test-deps 35;; src/emacs -batch -l admin/cus-test.el -f cus-test-deps
36;; 36;;
37;; src/emacs -batch -l admin/cus-test.el -f cus-test-libs 37;; src/emacs -batch -l admin/cus-test.el -f cus-test-libs [all]
38;; 38;;
39;; src/emacs -batch -l admin/cus-test.el -f cus-test-noloads 39;; src/emacs -batch -l admin/cus-test.el -f cus-test-noloads
40;; 40;;
@@ -314,7 +314,7 @@ If it is \"all\", load all Lisp files."
314 314
315(defun cus-test-get-lisp-files (&optional all) 315(defun cus-test-get-lisp-files (&optional all)
316 "Return list of all Lisp files with defcustoms. 316 "Return list of all Lisp files with defcustoms.
317Optional argument ALL non-nil means list all Lisp files." 317Optional argument ALL non-nil means list all (non-obsolete) Lisp files."
318 (let ((default-directory (expand-file-name "lisp/" source-directory)) 318 (let ((default-directory (expand-file-name "lisp/" source-directory))
319 (msg "Finding files...")) 319 (msg "Finding files..."))
320 (message "%s" msg) 320 (message "%s" msg)
@@ -322,8 +322,10 @@ Optional argument ALL non-nil means list all Lisp files."
322 ;; Hack to remove leading "./". 322 ;; Hack to remove leading "./".
323 (mapcar (lambda (e) (substring e 2)) 323 (mapcar (lambda (e) (substring e 2))
324 (apply 'process-lines find-program 324 (apply 'process-lines find-program
325 "-name" "obsolete" "-prune" "-o"
325 "-name" "[^.]*.el" ; ignore .dir-locals.el 326 "-name" "[^.]*.el" ; ignore .dir-locals.el
326 (unless all 327 (if all
328 '("-print")
327 (list "-exec" grep-program 329 (list "-exec" grep-program
328 "-l" "^[ \t]*(defcustom" "{}" "+")))) 330 "-l" "^[ \t]*(defcustom" "{}" "+"))))
329 (message "%sdone" msg)))) 331 (message "%sdone" msg))))
@@ -448,11 +450,11 @@ If it is \"all\", load all Lisp files."
448 command-line-args-left 450 command-line-args-left
449 (setq more (pop command-line-args-left))) 451 (setq more (pop command-line-args-left)))
450 (cus-test-load-1 452 (cus-test-load-1
451 (let ((default-directory source-directory) 453 (let* ((default-directory source-directory)
452 (emacs (expand-file-name "src/emacs")) 454 (emacs (expand-file-name "src/emacs"))
453 skipped) 455 skipped)
454 (or (file-executable-p emacs) 456 (or (file-executable-p emacs)
455 (error "No Emacs executable in %ssrc" default-directory)) 457 (error "No such executable `%s'" emacs))
456 (mapc 458 (mapc
457 (lambda (file) 459 (lambda (file)
458 (if (member file cus-test-libs-noloads) 460 (if (member file cus-test-libs-noloads)
@@ -498,7 +500,7 @@ in the Emacs source directory."
498 (cus-test-get-options "")) 500 (cus-test-get-options ""))
499 501
500 (message "Running %s" 'cus-test-load-libs) 502 (message "Running %s" 'cus-test-load-libs)
501 (cus-test-load-libs) 503 (cus-test-load-libs "all")
502 (setq cus-test-vars-not-cus-loaded 504 (setq cus-test-vars-not-cus-loaded
503 (cus-test-get-options "")) 505 (cus-test-get-options ""))
504 506