This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=d098a26cea2064db0769898b3583a4bfb8c40488

commit d098a26cea2064db0769898b3583a4bfb8c40488
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Sep 10 18:45:01 2022 +0200

    build: Simplify author testing
    
    Add an authorcheck make target. Switch all usages and documentation to
    use the new target. Remove DPKG_DEVEL_MODE environment variable support,
    and replace with AUTHOR_TESTING where appropriate. Update the usage
    documentation.
---
 .gitlab-ci.yml       | 5 ++---
 Makefile.am          | 3 +++
 README               | 8 +++-----
 doc/coding-style.txt | 2 +-
 m4/dpkg-build.m4     | 3 +--
 scripts/Test/Dpkg.pm | 4 ++--
 6 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b4479c693..de4a63a5e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,8 +26,7 @@ unit-tests:
   script:
     - eatmydata apt -P pkg.dpkg.author-testing build-dep -qq -y .
     - ./configure
-    - make check TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc)
-                 AUTHOR_TESTING=1
+    - make authorcheck TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc)
 
 # Test whether the unit tests pass on a VPATH build.
 vpath-tests:
@@ -42,7 +41,7 @@ vpath-tests:
 shared-tests:
   stage: test
   script:
-    - DPKG_DEVEL_MODE=1 ./configure --enable-shared
+    - AUTHOR_TESTING=1 ./configure --enable-shared
     - make check TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc)
 
 # Test whether the functional tests pass.
diff --git a/Makefile.am b/Makefile.am
index 38ed168e0..16c8634e4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -212,6 +212,9 @@ include $(top_srcdir)/build-aux/tap.am
 
 check-local: tap-check
 
+authorcheck:
+       AUTHOR_TESTING=1 $(MAKE) check
+
 .PHONY: update-po
 
 update-po:
diff --git a/README b/README
index 43ef063a6..8c03418bb 100644
--- a/README
+++ b/README
@@ -88,7 +88,9 @@ To enable optional functionality or programs, this software 
might be needed:
   libselinux
   curses compatible library (needed on --enable-dselect)
 
-To run the test suite («make check»):
+To run the test suite («make check» or «make authorcheck» for author tests,
+those that might not be pertinent during release builds) the following
+software might be needed:
 
   Test::MinimumVersion perl module (optional, author)
   Test::Pod perl module (optional)
@@ -106,10 +108,6 @@ To run the test suite («make check»):
   i18nspector (optional, author)
   shellcheck (optional, author)
 
-  Define the environment variable DPKG_DEVEL_MODE or AUTHOR_TESTING to run
-  the test suite in development mode, to include tests that might not be
-  pertinent during normal release builds.
-
 To enable additional developer's documentation («make doc») this software
 will be needed:
 
diff --git a/doc/coding-style.txt b/doc/coding-style.txt
index dd0a41ccd..237ea5f7b 100644
--- a/doc/coding-style.txt
+++ b/doc/coding-style.txt
@@ -295,7 +295,7 @@ General
 
 In general you should follow the conventions listed in perlstyle(1).
 All the code should run with the “use strict” and “use warnings” pragmas,
-and pass «DPKG_DEVEL_MODE=1 make check».
+and pass «make authorcheck».
 
 Code documentation
 ~~~~~~~~~~~~~~~~~~
diff --git a/m4/dpkg-build.m4 b/m4/dpkg-build.m4
index 89ff8aa67..cf4cf3a25 100644
--- a/m4/dpkg-build.m4
+++ b/m4/dpkg-build.m4
@@ -4,8 +4,7 @@
 # DPKG_BUILD_SHARED_LIBS()
 # ----------------------
 AC_DEFUN([DPKG_BUILD_SHARED_LIBS], [
-  m4_pattern_allow([DPKG_DEVEL_MODE])
-  AS_IF([test "$enable_shared" = "yes" && test -z "$DPKG_DEVEL_MODE"], [
+  AS_IF([test "$enable_shared" = "yes" && test -z "$AUTHOR_TESTING"], [
     AC_MSG_ERROR([building libdpkg as a shared library is not supported])
   ])
   AM_CONDITIONAL([BUILD_SHARED], [test "$enable_shared" = "yes"])
diff --git a/scripts/Test/Dpkg.pm b/scripts/Test/Dpkg.pm
index 39e04acae..a756c79c6 100644
--- a/scripts/Test/Dpkg.pm
+++ b/scripts/Test/Dpkg.pm
@@ -149,8 +149,8 @@ sub all_perl_modules
 
 sub test_needs_author
 {
-    if (not $ENV{DPKG_DEVEL_MODE} and not $ENV{AUTHOR_TESTING}) {
-        plan skip_all => 'developer test';
+    if (not $ENV{AUTHOR_TESTING}) {
+        plan skip_all => 'author test';
     }
 }
 

-- 
Dpkg.Org's dpkg

Reply via email to