summaryrefslogtreecommitdiff
path: root/test/Makefile.am
blob: 972821bd3e24fc09284f4661ea9a8e47bb4e848a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
lisp_files = $(wildcard *.el)
EXTRA_DIST = $(lisp_files)
lisp_LISP = $(lisp_files)
include $(top_srcdir)/common.mk

PHONY=check test all check-elget test-elget help

#: overall help on running the make targets
help:
	@echo "The main function of this Makefile is to facilitate running tests."
	@echo
	@echo "To run all of the tests, use targets \"test\", \"check\" or \"check-short\"."
	@echo "For example:"
	@echo
	@echo "    make check"
	@echo "or:"
	@echo "    make check-short"
	@echo
	@echo "The -short target uses a filter written in Ruby to remove extreanous output."
	@echo
	@echo "To run a specific test like test-srcbuf.el, change \".el\" to"
	@echo "\".run\". For example:"
	@echo
	@echo "    make test-srcbuf.run"
	@echo
	@echo "Tests can also be run via the Emacs el-get package and this loads dependent emacs "
	@echo "package, like load-relative. To do this, use targets, \"check-elget\","
	@echo "\"test-elget\", or \"check-short-elget\"."
	@echo
	@echo  "To run a specific test like test-srcbuf.el via el-get change \".el\""
	@echo "to \".elrun\" For example:"
	@echo
	@echo "    make test-srcbuf.elrun"


#: same thing as "check"
test: check

#: same thing as "check-elget"
test-elget: check-elget

test_files := $(wildcard test-*.el)

CHECK_FILES = $(notdir $(test_files:.el=.run))
EL_GET_CHECK_FILES = $(notdir $(test_files:.el=.elrun))

#: Run all tests
check: $(CHECK_FILES)

#: Run all tests via el-get
check-elget: $(EL_GET_CHECK_FILES)

#: Run all tests with minimum verbosity
check-short:
	$(MAKE) check 2>&1  | ruby ../make-check-filter.rb

#: Run all tests with minimum verbosity via el-get
check-short-elget:
	$(MAKE) check-elget 2>&1  | ruby ../make-check-filter.rb

test-%.run:
	(cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS) --batch --no-site-file --no-splash --load $(@:.run=.el))

#: Run tests using el-get to specify external Lisp dependencies
test-%.elrun:
	(cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS) --batch --no-site-file --no-splash --load ../el-get-install.el --load $(@:.elrun=.el))

install-lispLISP: $(lisp_LISP) $(ELCFILES)

# Whatever it is you want to do, it should be forwarded to the
# to top-level directories
# %:
# 	$(MAKE) -C .. $@