* Makefile (check): New rule
authorkaoru <kaoru>
Tue, 28 Aug 2001 15:12:54 +0000 (15:12 +0000)
committerkaoru <kaoru>
Tue, 28 Aug 2001 15:12:54 +0000 (15:12 +0000)
* WL-MK (check-wl): New function.

ChangeLog
Makefile
WL-MK

index a519dc4..1aca672 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-08-29  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * Makefile (check): New rule
+       * WL-MK (check-wl): New function.
+       * tests/ChangeLog: New file.
+
+       * utils/ChangeLog: New file.
+
 2001-08-28  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * WL-ELS (ELMO-MODULES): Added `acap' and `slp'.
index 298b853..e503716 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,9 @@ FLAGS   = -batch -q -no-site-file
 elc:
        $(EMACS) $(FLAGS) -l WL-MK -f compile-wl-package $(LISPDIR) $(PIXMAPDIR)
 
+check:
+       $(EMACS) $(FLAGS) -l WL-MK -f check-wl $(LISPDIR) $(PIXMAPDIR)
+
 install-elc:
        $(EMACS) $(FLAGS) -l WL-MK -f install-wl-package $(LISPDIR) $(PIXMAPDIR)
 
diff --git a/WL-MK b/WL-MK
index e0d05d5..86117f2 100644 (file)
--- a/WL-MK
+++ b/WL-MK
   (config-wl-pixmap-dir)
   (princ "\n"))
 
+(defun check-wl ()
+  (config-wl-package)
+  (require 'lunit)
+  (let ((files (directory-files "tests" t "^test-.*\\.el$"))
+       (suite (lunit-make-test-suite)))
+    (while files
+      (if (file-regular-p (car files))
+         (progn
+           (load-file (car files))
+           (lunit-test-suite-add-test
+            suite (lunit-make-test-suite-from-class
+                   (intern (file-name-sans-extension
+                            (file-name-nondirectory (car files))))))))
+      (setq files (cdr files)))
+    (lunit suite)))
 
 (defun wl-scan-source (path)
   (let (ret)