emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-25 f5c762c: Additional changes for "make check-e


From: Phillip Lord
Subject: Re: [Emacs-diffs] emacs-25 f5c762c: Additional changes for "make check-expensive"
Date: Thu, 14 Jan 2016 23:04:39 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Michael Albinus <address@hidden> writes:

> address@hidden (Phillip Lord) writes:
>
>> Michael
>
> Hi Philip,
>
>> I think that there is a problem with this commit, in that the default
>> selector is only used for "make check". By default "make check-maybe"
>> runs all tests (including the expensive ones). So, you have to do
>>
>> make check-maybe SELECTOR="(quote (not (tag :expensive-test)))"
>>
>> I think it makes more sense for check-maybe to skip expensive tests,
>> unless told otherwise, as "make check-maybe" is a good candidate for use
>> pre-commit.
>
> I see. Before touching the Makefile, we shall agree how all the targets
> shall behave. I would say, that "check" and "check-maybe" shall skip the
> expensive tests. "check-expensive", "<foo>", and "<foo>.log" shall run
> all tests.

Sorry for slow reply!

I would say that, yes, both check and check-maybe should skip expensive
tests by default. I think this actually contradicts the GNU coding
standards, but possibly it's these that need updating for very slow
tests.

I'd also agree about <foo>, <foo>.log (on master <foo>.log is
lisp/<foo.log>, and lisp/<foo> also exists).


However, I also think that these should also respond to setting
SELECTOR on the command line.

The problem with this patch:


+SELECTOR_DEFAULT = (quote (not (tag :expensive-test)))
+SELECTOR_EXPENSIVE = nil
+SELECTOR =

+check-maybe:
+       @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}"
+


is that "make check-maybe SELECTOR=nil" doesn't actually run the
expensive tests as it should. That was the reason for my original,
rather more complicated, suggestion.

I've attached a complete patch below (actually tested this time!), which
I think works. Would this make sense to you?

Phil





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]