GNU bug report logs -
#76446
[Patch Debbugs] Infrastructure Improvements
Previous Next
Full log
View this message in rfc822 format
Hi,
Michael Albinus <michael.albinus <at> gmx.de> writes:
[...]
> +## SELECTOR discrimination (see ERT manual for more possibilities):
> +##
> +## SELECTOR='"regexp"': Run all tests which name match "regexp"
> +## SELECTOR='test-name': Run test with name test-name
The use of different quotes here appear somewhat misleading to me;
someone may think extra quoting is needed when using a regexp, but it
isn't, IIUC.
> +
> +### Code:
> +
> EMACS ?= emacs
> MAKEINFO ?= makeinfo
>
> -# regex of tests to run
> -TESTS=.*
> +SOURCE = $(wildcard *.el)
> +TESTSOURCE = $(wildcard test/*.el)
> +TARGET = $(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
> +TESTTARGET = $(patsubst %.el,%.elc,$(TESTSOURCE))
>
> -SOURCE=$(wildcard *.el)
> -TESTSOURCE=$(wildcard test/*.el)
> -TARGET=$(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
> -TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
> +TESTS = $(patsubst test/%.el,%,$(wildcard test/*-tests.el))
> +SELECTOR ?= (not (tag :unstable))
>
> -INFOMANUALS=debbugs.info debbugs-ug.info
> +INFOMANUALS = debbugs.info debbugs-ug.info
>
> .PHONY: all build check clean checkdoc
> .PRECIOUS: %.elc
> @@ -30,10 +63,14 @@ doc: $(INFOMANUALS)
> build: $(TARGET)
>
> checkdoc: $(SOURCE) $(TESTSOURCE)
> - @$(EMACS) -Q --batch -l resources/debbugs-checkdoc-config.el $(foreach file,$^,"--eval=(checkdoc-file \"$(file)\")")
> + @$(EMACS) -Q --batch -l resources/debbugs-checkdoc-config.el \
> + $(foreach file,$^,"--eval=(checkdoc-file \"$(file)\")")
> +
> +check: $(TESTS)
>
> -check: build $(TESTTARGET)
> - @$(EMACS) -Q --batch -L . -L ./test $(foreach file,$(TESTSOURCE), -l $(file)) --eval '(ert-run-tests-batch-and-exit "$(TESTS)")'
> +%-tests: build $(TESTTARGET)
> + @$(EMACS) -Q --batch -L . -L ./test -l $@ \
> + --eval '(ert-run-tests-batch-and-exit (quote ${SELECTOR}))'
The above LGTM; I agree being able to select a single test is useful.
--
Thanks,
Maxim
This bug report was last modified 71 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.