GNU bug report logs - #76446
[Patch Debbugs] Infrastructure Improvements

Previous Next

Package: emacs;

Reported by: Morgan Smith <Morgan.J.Smith <at> outlook.com>

Date: Thu, 20 Feb 2025 19:07:02 UTC

Severity: wishlist

Tags: patch

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 76446 <at> debbugs.gnu.org, Morgan Smith <morgan.j.smith <at> outlook.com>
Subject: bug#76446: [Patch Debbugs] Infrastructure Improvements
Date: Sun, 02 Mar 2025 00:44:41 +0900
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.