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