]> code.delx.au - gnu-emacs-elpa/blob - packages/loc-changes/test/Makefile.am
Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode
[gnu-emacs-elpa] / packages / loc-changes / test / Makefile.am
1 include $(top_srcdir)/common.mk
2
3 PHONY=check test all check-elget test-elget help
4
5 all: check
6
7 #: same thing as "check"
8 test: check
9
10 #: overall help on running the make targets
11 help:
12 @echo "The main function of this Makefile is to facilitate running tests."
13 @echo
14 @echo "To run all of the tests, use targets \"test\", \"check\" or \"check-short\"."
15 @echo "For example:"
16 @echo
17 @echo " make check"
18 @echo "or:"
19 @echo " make check-short"
20 @echo
21 @echo "The -short target uses a filter written in Ruby to remove extreanous output."
22 @echo
23 @echo "To run a specific test like test-srcbuf.el, change \".el\" to"
24 @echo "\".run\". For example:"
25 @echo
26 @echo " make test-srcbuf.run"
27 @echo
28 @echo "Tests can also be run via the Emacs el-get package and this loads dependent emacs "
29 @echo "package, like load-relative. To do this, use targets, \"check-elget\","
30 @echo "\"test-elget\", or \"check-short-elget\"."
31 @echo
32 @echo "To run a specific test like test-srcbuf.el via el-get change \".el\""
33 @echo "to \".elrun\" For example:"
34 @echo
35 @echo " make test-srcbuf.elrun"
36
37 EXTRA_DIST=sample.txt
38
39 #: same thing as "check-elget"
40 test-elget: check-elget
41
42 test_files := $(wildcard test-*.el)
43
44 CHECK_FILES = $(notdir $(test_files:.el=.run))
45 EL_GET_CHECK_FILES = $(notdir $(test_files:.el=.elrun))
46
47 #: Run all tests
48 check: $(CHECK_FILES)
49
50 #: Run all tests via el-get
51 check-elget:
52 (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash --load ./install-pkgs.el --load test-basic.el)
53
54 #: Run all tests with minimum verbosity
55 check-short:
56 $(MAKE) check 2>&1 | ruby ../make-check-filter.rb
57
58 #: Run all tests with minimum verbosity via el-get
59 check-short-elget:
60 $(MAKE) check-elget 2>&1 | ruby ./make-check-filter.rb
61
62 test-%.run:
63 (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash --load $(@:.run=.el))
64
65 #: Run tests using el-get to specify external Lisp dependencies
66 test-%.elrun:
67 (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash --load ../el-get-install.el --load $(@:.elrun=.el))
68
69 # Whatever it is you want to do, it should be forwarded to the
70 # to top-level directories
71 # %:
72 # $(MAKE) -C .. $@