emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 549a765 1/2: Enable test selector from command li


From: Phillip Lord
Subject: [Emacs-diffs] emacs-25 549a765 1/2: Enable test selector from command line
Date: Fri, 15 Jan 2016 22:22:34 +0000

branch: emacs-25
commit 549a765efeca2748e68a5c6ce6c9238784e82535
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>

    Enable test selector from command line
    
    * test/automated/Makefile.in: Change variable manipulation to avoid
      over-writing selector.
---
 CONTRIBUTE                 |    4 +++-
 test/automated/Makefile.in |   14 ++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/CONTRIBUTE b/CONTRIBUTE
index 9c53fe2..3ccaff3 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -263,7 +263,9 @@ top-level directory.  Most tests are in the directory
 Tests which are tagged ":expensive-test" are enabled additionally, if
 you run "make check-expensive" from the top-level directory.  "make
 <filename>" as mentioned above incorporates expensive tests for
-<filename>.el(c).
+<filename>.el(c). You can also define any ert selector on the command
+line. So "make check SELECTOR=nil" is equivalent to "make
+check-expensive".
 
 ** Understanding Emacs Internals.
 
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index 152e601..2534a65 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -89,7 +89,13 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo 
$$stat: $@
 ## Beware: it approximates 'no-byte-compile', so watch out for false-positives!
 SELECTOR_DEFAULT = (quote (not (tag :expensive-test)))
 SELECTOR_EXPENSIVE = nil
-SELECTOR =
+ifndef SELECTOR
+SELECTOR_ACTUAL=$(SELECTOR_DEFAULT)
+else
+SELECTOR_ACTUAL=$(SELECTOR)
+endif
+
+
 %.log: ${srcdir}/%.el
        @if grep '^;.*no-byte-compile: t' $< > /dev/null; then \
          loadfile=$<; \
@@ -100,7 +106,7 @@ SELECTOR =
        echo Testing $$loadfile; \
        stat=OK ; \
        $(emacs) -l ert -l $$loadfile \
-         --eval "(ert-run-tests-batch-and-exit ${SELECTOR})" ${WRITE_LOG}
+         --eval "(ert-run-tests-batch-and-exit ${SELECTOR_ACTUAL})" 
${WRITE_LOG}
 
 ELFILES = $(sort $(wildcard ${srcdir}/*.el))
 LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
@@ -123,7 +129,7 @@ $(foreach test,${TESTS},$(eval $(call 
test_template,${test})))
 
 ## Rerun all default tests.
 check: mostlyclean
-       @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}"
+       @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}"
 
 ## Rerun all default and expensive tests.
 .PHONY: check-expensive
@@ -133,7 +139,7 @@ check-expensive: mostlyclean
 ## Only re-run default tests whose .log is older than the test.
 .PHONY: check-maybe
 check-maybe:
-       @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}"
+       @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}"
 
 ## Run the tests.
 .PHONY: check-doit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]