Permalink
Browse files

Convert some test-unit to test-simple. Makefile.am, make-check-filter…

….rb: add check-short target
  • Loading branch information...
1 parent 191b8ae commit f1e6d0ade9bf5d51c72e39eed6b6938ca36fd884 @rocky committed Jun 17, 2012
Showing with 72 additions and 47 deletions.
  1. +5 −23 Makefile.am
  2. +5 −0 common.mk
  3. +1 −1 configure.ac
  4. +2 −3 install-from-git.sh
  5. +22 −0 make-check-filter.rb
  6. +1 −0 test/.gitignore
  7. +0 −7 test/Makefile
  8. +29 −0 test/Makefile.am
  9. +7 −13 test/test-require-list.el
View
@@ -1,34 +1,19 @@
lisp_files := $(wildcard *.el)
-test_files := $(wildcard test/test-*.el)
+lisp_LISP = $(lisp_files)
EXTRA_DIST = $(lisp_files) $(test_files) README.textile COPYING
-CHECK_FILES = $(notdir $(test_files:.el=.run))
-
-lisp_LISP = $(lisp_files)
+check: $(test-files)
+ $(MAKE) -C test check
-check: $(CHECK_FILES) test-require-list-from-subdir.run
+check-short:
+ $(MAKE) -C test check 2>&1 | ruby make-check-filter.rb
#: Read this first.
README: README.textile
cp README.textile README
-# FIGURE out how to DRY the run rules.
-#: Run test-load test
-test-load.run:
- (cd $(srcdir)/test && $(EMACS) -batch -Q -l $(@:.run=.el) )
-
-#: Run test-require-list test
-test-require-list.run:
- (cd $(srcdir)/test && $(EMACS) -batch -Q -l $(@:.run=.el) )
-
-#: Run test-require-list-from-subdur test
-test-require-list-from-subdir.run:
- (cd $(srcdir)/test/subdir && $(EMACS) -batch -Q -l $(@:.run=.el) )
-
-.PHONY: $(CHECK_FILES)
-
if MAINTAINER_MODE
CL = ChangeLog
@@ -39,6 +24,3 @@ ChangeLog:
ACLOCAL_AMFLAGS=-I .
endif
-
-#: same thing as "check"
-test: check
View
@@ -0,0 +1,5 @@
+short:
+ $(MAKE) 2>&1 >/dev/null | ruby $(top_srcdir)/make-check-filter.rb
+
+%.short:
+ $(MAKE) $(@:.short=) 2>&1 >/dev/null
View
@@ -24,5 +24,5 @@ fi
AM_PATH_LISPDIR
AM_CONDITIONAL(INSTALL_EMACS_LISP, test "x$lispdir" != "x")
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT
View
@@ -1,5 +1,5 @@
#!/bin/bash
-# Install emacs-dbgr from git
+# Install emacs-load-relative from git
run_cmd() {
echo "--- Running command: $@"
$@
@@ -20,8 +20,7 @@ for program in git make $need_sudo ; do
fi
done
-packages=emacs-load-relative
-for pkg in $packages ; do
+for pkg in emacs-{test-unit,test-simple,load-relative} ; do
echo '******************************************'
echo Trying to install ${pkg}...
echo '******************************************'
View
@@ -0,0 +1,22 @@
+#!/usr/bin/env ruby
+# Use this to cut out the crud from make check.
+# Use like this:
+# make check 2>&1 | ruby ../make-check-filter.rb
+# See Makefile.am
+pats = ["^(?:Loading",
+ '(re)?make\[',
+ "Making check in",
+ '\(cd \.\.',
+ "make -C",
+ "Test-Unit",
+ "Fontifying",
+ '\s*$',
+ '##[<>]+$'
+ ].join('|') + ')'
+# puts pats
+skip_re = /#{pats}/
+
+while gets()
+ next if $_ =~ skip_re
+ puts $_
+end
View
@@ -1,2 +1,3 @@
/*~
/Makefile
+/Makefile.in
View
@@ -1,7 +0,0 @@
-# Whatever it is you want to do, it should be forwarded to the
-# to top-level irectories
-PHONY=check all
-all: check
-
-%:
- $(MAKE) -C .. $@
View
@@ -0,0 +1,29 @@
+include $(top_srcdir)/common.mk
+
+PHONY=check test all
+EXTRA_DIST=gcd.py gcd.rb
+
+all:
+
+#: same thing as "check"
+test: check
+
+test_files := $(wildcard test-*.el)
+
+CHECK_FILES = $(notdir $(test_files:.el=.run))
+
+#: Run all tests
+check: $(CHECK_FILES)
+
+#: Run all tests with minimum verbosity
+check-short:
+ $(MAKE) check 2>&1 | ruby ../make-check-filter.rb
+
+test-%.run:
+ (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash --load $(@:.run=.el))
+
+# Whatever it is you want to do, it should be forwarded to the
+# to top-level directories
+%:
+ $(MAKE) -C .. $@
+
View
@@ -1,18 +1,12 @@
(require 'cl)
-(require 'test-unit)
+(require 'test-simple)
(load-file "../load-relative.el")
-(test-unit-clear-contexts)
+(test-simple-start)
-(context "load-relative-list"
- (tag load-relative-list)
- (if (featurep 'require-file1)
- (unload-feature 'require-file1))
- (specify "relative-relative-list"
- (require-relative-list '("./require-file1"))
- (assert-t (featurep 'require-file1))
- )
+(if (featurep 'require-file1)
+ (unload-feature 'require-file1))
+(require-relative-list '("./require-file1"))
+(assert-t (featurep 'require-file1) "relative-relative-list")
-)
-
-(test-unit "load-relative-list")
+(end-tests)

0 comments on commit f1e6d0a

Please sign in to comment.