aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhillip Lord2015-11-23 22:08:52 +0000
committerPhillip Lord2015-11-24 17:10:12 +0000
commit94bb3d7a808b8ed29336250bf5ffaf636280ee1e (patch)
treebc1e629e3f7c381ecc424d2aeb846be8d18c6a73
parent22bbf7ca22f11cc33d887d0162cf2ec6661c3a3e (diff)
downloademacs-94bb3d7a808b8ed29336250bf5ffaf636280ee1e.tar.gz
emacs-94bb3d7a808b8ed29336250bf5ffaf636280ee1e.zip
Test infrastructure: updates after directory move
* (test/Makefile.in): Support directories several levels deep. * (test/data/flymake): Rename to test/lisp/progmodes/flymake-resources. * (test/lisp/progmodes/flymake-tests.el): Support renamed resource directory.
-rw-r--r--test/Makefile.in19
-rw-r--r--test/lisp/progmodes/flymake-resources/test.c (renamed from test/data/flymake/test.c)0
-rw-r--r--test/lisp/progmodes/flymake-resources/test.pl (renamed from test/data/flymake/test.pl)0
-rw-r--r--test/lisp/progmodes/flymake-tests.el2
4 files changed, 12 insertions, 9 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index 41f54f8aa69..3343f729bf6 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -37,7 +37,7 @@ SEPCHAR = @SEPCHAR@
37# We never change directory before running Emacs, so a relative file 37# We never change directory before running Emacs, so a relative file
38# name is fine, and makes life easier. If we need to change 38# name is fine, and makes life easier. If we need to change
39# directory, we can use emacs --chdir. 39# directory, we can use emacs --chdir.
40EMACS = ../../src/emacs 40EMACS = ../src/emacs
41 41
42EMACS_EXTRAOPT= 42EMACS_EXTRAOPT=
43 43
@@ -99,9 +99,10 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@
99 $(emacs) -l ert -l $$loadfile \ 99 $(emacs) -l ert -l $$loadfile \
100 -f ert-run-tests-batch-and-exit ${WRITE_LOG} 100 -f ert-run-tests-batch-and-exit ${WRITE_LOG}
101 101
102ELFILES = $(sort $(wildcard ${srcdir}/*.el)) 102ELFILES = $(sort $(wildcard ${srcdir}/*.el) $(wildcard ${srcdir}/*/*.el) \
103LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES})) 103 $(wildcard ${srcdir}/*/*/*.el) $(wildcard ${srcdir}/*/*/*/*.el))
104TESTS = ${LOGFILES:.log=} 104LOGFILES = $(patsubst %.el,%.log,${ELFILES})
105TESTS = $(subst ${srcdir}/,,$(LOGFILES:.log=))
105 106
106## If we have to interrupt a hanging test, preserve the log so we can 107## If we have to interrupt a hanging test, preserve the log so we can
107## see what the problem was. 108## see what the problem was.
@@ -112,8 +113,8 @@ TESTS = ${LOGFILES:.log=}
112## The short aliases that always re-run the tests, with no logging. 113## The short aliases that always re-run the tests, with no logging.
113define test_template 114define test_template
114$(1): 115$(1):
115 @test ! -f $(1).log || mv $(1).log $(1).log~ 116 @test ! -f ${srcdir}/$(1).log || mv ${srcdir}/$(1).log ${srcdir}/$(1).log~
116 @${MAKE} $(1).log WRITE_LOG= 117 @${MAKE} ${srcdir}/$(1).log WRITE_LOG=
117endef 118endef
118 119
119$(foreach test,${TESTS},$(eval $(call test_template,${test}))) 120$(foreach test,${TESTS},$(eval $(call test_template,${test})))
@@ -132,10 +133,12 @@ check-maybe: ${LOGFILES}
132.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean 133.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
133 134
134clean mostlyclean: 135clean mostlyclean:
135 -rm -f *.log *.log~ 136 -rm -f ${srcdir}/*.log ${srcdir}/*.log~ ${srcdir}/*/*.log \
137 ${srcdir}/*/*.log~ ${srcdir}/*/*/*.log \
138 ${srcdir}/*/*/*.log~
136 139
137bootstrap-clean: clean 140bootstrap-clean: clean
138 -rm -f ${srcdir}/*.elc 141 -rm -f ${srcdir}/*.elc ${srcdir}/*/*.elc ${srcdir}/*/*/*.elc
139 142
140distclean: clean 143distclean: clean
141 rm -f Makefile 144 rm -f Makefile
diff --git a/test/data/flymake/test.c b/test/lisp/progmodes/flymake-resources/test.c
index 3a3926131f5..3a3926131f5 100644
--- a/test/data/flymake/test.c
+++ b/test/lisp/progmodes/flymake-resources/test.c
diff --git a/test/data/flymake/test.pl b/test/lisp/progmodes/flymake-resources/test.pl
index d5abcb47e7f..d5abcb47e7f 100644
--- a/test/data/flymake/test.pl
+++ b/test/lisp/progmodes/flymake-resources/test.pl
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el
index 11231bc3f7a..1d8c12c0655 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -26,7 +26,7 @@
26(require 'flymake) 26(require 'flymake)
27 27
28(defvar flymake-tests-data-directory 28(defvar flymake-tests-data-directory
29 (expand-file-name "data/flymake" (getenv "EMACS_TEST_DIRECTORY")) 29 (expand-file-name "lisp/progmodes/flymake-resources" (getenv "EMACS_TEST_DIRECTORY"))
30 "Directory containing flymake test data.") 30 "Directory containing flymake test data.")
31 31
32 32