[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117426: Add short test aliases that always re-run t
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r117426: Add short test aliases that always re-run the tests |
Date: |
Sat, 28 Jun 2014 01:11:08 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117426
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2014-06-27 21:11:04 -0400
message:
Add short test aliases that always re-run the tests
* test/automated/Makefile.in (TESTS): New list of short PHONY aliases.
(test_template): New definition. Apply to TESTS.
modified:
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
test/automated/Makefile.in makefile.in-20110112160650-056hnl9qhpjvjicy-6
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2014-06-27 16:27:08 +0000
+++ b/test/ChangeLog 2014-06-28 01:11:04 +0000
@@ -1,3 +1,8 @@
+2014-06-28 Glenn Morris <address@hidden>
+
+ * automated/Makefile.in (TESTS): New list of short PHONY aliases.
+ (test_template): New definition. Apply to TESTS.
+
2014-06-27 Glenn Morris <address@hidden>
* automated/Makefile.in (check-maybe): Rename from check.
=== modified file 'test/automated/Makefile.in'
--- a/test/automated/Makefile.in 2014-06-27 16:27:08 +0000
+++ b/test/automated/Makefile.in 2014-06-28 01:11:04 +0000
@@ -17,6 +17,16 @@
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+### Commentary:
+
+## Some targets:
+## check: re-run all tests
+## check-maybe: run all tests whose .log file needs updating
+## filename.log: run tests from filename.el(c) if .log file needs updating
+## filename: re-run tests from filename.el(c)
+
+### Code:
+
SHELL = @SHELL@
srcdir = @srcdir@
@@ -84,11 +94,24 @@
ELFILES = $(wildcard ${srcdir}/*.el)
LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
+TESTS = ${LOGFILES:.log=}
## If we have to interrupt a hanging test, preserve the log so we can
## see what the problem was.
.PRECIOUS: %.log
+.PHONY: ${TESTS}
+
+## The short aliases that always re-run the tests.
+define test_template
+$(1):
+ @test ! -f $(1).log || mv $(1).log $(1).log~
+ @${MAKE} $(1).log
+endef
+
+$(foreach test,${TESTS},$(eval $(call test_template,${test})))
+
+
## Re-run all the tests every time.
check:
address@hidden f in *.log; do test ! -f $$f || mv $$f $$f~; done
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117426: Add short test aliases that always re-run the tests,
Glenn Morris <=