branch: externals/debbugs
commit 4fde9fbcbd872b8c30f2e95c8c6513ae7578bdea
Author: Michael Albinus <michael.albi...@gmx.de>
Commit: Michael Albinus <michael.albi...@gmx.de>

    Release debbugs 0.44
    
    * Makefile (TESTS): List of *-tests.el files.
    (SELECTOR): New variable.
    (check): Depend on $(TESTS).
    (%-tests): New target, running a test per file.  Use $(SELECTOR).
    
    * debbugs.el: Bump version to 0.44.
---
 Makefile   | 57 +++++++++++++++++++++++++++++++++++++++++++++++----------
 debbugs.el |  2 +-
 2 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index da0764ea36..258d553ae1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,48 @@
+# Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+# Author: Morgan Smith <morgan.j.sm...@outlook.com>
+# Package: debbugs
+# Keywords: comm, hypermedia, maint
+
+# This file is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# 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  test targets:
+##
+## check: re-run all tests.
+## filename-tests: re-run tests from test/filename-tests.el(c).
+
+## 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
+
+### 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}))'
 
 clean:
        -rm -f $(TARGET) $(TESTTARGET) $(INFOMANUALS)
diff --git a/debbugs.el b/debbugs.el
index 510465a467..eaffe6d715 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -5,7 +5,7 @@
 ;; Author: Michael Albinus <michael.albi...@gmx.de>
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
-;; Version: 0.43
+;; Version: 0.44
 ;; Package-Requires: ((emacs "26.1") (soap-client "3.1.5"))
 
 ;; This file is not part of GNU Emacs.

Reply via email to