]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
test: allow running with fatal warnings given in PERL5OPT.
authorKarl Berry <karl@freefriends.org>
Tue, 4 Feb 2025 16:22:26 +0000 (08:22 -0800)
committerKarl Berry <karl@freefriends.org>
Tue, 4 Feb 2025 16:22:26 +0000 (08:22 -0800)
* HACKING: mention running the test suite with
PERL5OPT=-Mwarnings=FATAL,all  in the environment at new Perl (and
Automake releases), to try to keep up with new Perl warnings.
Suggestion from Jacob Bachmeyer,
https://lists.gnu.org/archive/html/automake/2025-02/msg00001.html
* t/parallel-tests-log-compiler-example.sh: explicitly use warnings
so that this PERL5OPT setting won't be a fatal error.
* NEWS: formatting.

HACKING
NEWS
t/parallel-tests-log-compiler-example.sh

diff --git a/HACKING b/HACKING
index 81f7bffce928a08804cbadc6c1f98ce1da9a473a..ea06d1d8565d648e3f388c0d5ef6f0d75cb09121 100644 (file)
--- a/HACKING
+++ b/HACKING
   The use of & prevents prototypes from being checked; it's also
   uncommon in modern Perl code.
   (Perl prototypes are unlike function prototypes in other
-   languages, so understand what they do.)
+   languages, so understand what they do. They are not required.)
 
 * For automake.texi:
   - After and during editing, run make info for error checking, and make pdf
 * Use Perl coverage information to ensure your new code is thoroughly
   tested by your new tests.
 
+* When there is a new Perl release, and at Automake releases, run the
+  tests with PERL5OPT=-Mwarnings=FATAL,all in the environment.  This
+  makes Perl warnings into fatal errors, which will (presumably) cause
+  tests to fail when Perl gives a new warning for something in our code.
+
 * To run the tests, you should install expect, shar, language compilers,
   gettext macros.  Anything you don't install won't be tested.  The test
   suite will report on tests skipped due to software not available.
+  Look at the list and install anything feasible.
 
 * Run the test suite in parallel (e.g., "make -j12 check"), both so it
   doesn't take forever and because that is what most users will do.  You
   pushing a commit, since that exercises yet more of the code.
 
 * To unsilence Automake's "pretty" output for debugging, see the
-  "Unsilencing Automake" node in the manual. In short: run make --debug=p.
+  "Unsilencing Automake" node in the manual; in short, run make --debug=p.
   For the Automake test suite in particular, add VERBOSE=1.
 
 * To set up a new test, first write the test file in t/good-name.sh.
diff --git a/NEWS b/NEWS
index 058b73f04f91c827a1bf14c03181fd59922dba5e..f667c8727e15f149dbf7fef543fd3cda83709479 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,9 +15,11 @@ New in 1.x:
 
 * Bugs fixed
 
-  - do not make Perl warnings fatal, per Perl's recommendation.
+  - Do not make Perl warnings fatal, per Perl's recommendation.
 
-  - avoid Perl 5.41.8+ precedence warning for use of !!.
+  - Avoid Perl 5.41.8+ precedence warning for use of !!.
+
+  - The compile script is more robust to various Windows configurations.
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
index 97d3657710a808bc9867062856fedf717d10d905..fa8f97fcbe948b892bc7e4cc3096f08de0c8a341 100644 (file)
@@ -37,7 +37,10 @@ LOG_COMPILER = ./wrapper-script
 AM_LOG_FLAGS = -d
 END
 
-echo 'my $a =+ 2; exit (0);' > foo.pl
+# intentionally reversed += operator to provoke warning; thus,
+# explicitly use warnings so that PERL5OPT=-Mwarnings=FATAL,all
+# in the environment won't be a fatal error.  See ../HACKING.
+echo 'use warnings; my $a =+ 2; exit (0);' > foo.pl
 echo 'import sys; sys.exit(0);' > bar.py
 : > baz