]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* Makefile.am (check-regression): Use PERLFLAGS when running Perl
authorPaul Smith <psmith@gnu.org>
Sat, 5 Oct 2019 19:14:32 +0000 (15:14 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 5 Oct 2019 21:48:19 +0000 (17:48 -0400)
* maintMakefile: Set PERLFLAGS to enable warnings.
* tests/run_make_tests.pl: Clean up issues pointed out by perl -w.

Makefile.am
maintMakefile
tests/run_make_tests.pl

index 30b6ee2727f9f213233f58da78dc55dad4937b27..c51f9e23cc977754a137dc012d08228e3690e757 100644 (file)
@@ -161,8 +161,8 @@ check-regression: tests/config-flags.pm
                     rm -f tests/$$f; ln -s ../srctests/$$f tests; \
                   done; fi ;; \
            esac; \
-           echo "cd tests && $(PERL) ./run_make_tests.pl -srcdir $(abs_top_srcdir) -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
-           cd tests && $(PERL) ./run_make_tests.pl -srcdir '$(abs_top_srcdir)' -make '../make$(EXEEXT)' $(MAKETESTFLAGS); \
+           echo "cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir $(abs_top_srcdir) -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
+           cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir '$(abs_top_srcdir)' -make '../make$(EXEEXT)' $(MAKETESTFLAGS); \
          else \
            echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
          fi; \
index 0a44a623c445b490cc7799b4838896a29ae11545..a467ac086ba7469bb86af8e47fb858a14ef22424 100644 (file)
@@ -26,6 +26,9 @@ GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
 # Where to put the CVS checkout of the GNU make web repository
 MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
 
+# Enable Perl warnings for the test suite
+PERLFLAGS := -w
+
 # We like mondo-warnings!
 # Also force comments to be preserved.  This helps when using ccache, in
 # combination with GCC 7's implicit-fallthrough warning.
index 16a0e3ff5eabeff6f7d85aa7b45f322419966813..b36de6915fadf3ad18a9c43fb865ac94cca04cd8 100644 (file)
@@ -98,7 +98,7 @@ if ($^O eq 'VMS')
 $ERR_no_such_file = undef;
 $ERR_read_only_file = undef;
 $ERR_unreadable_file = undef;
-$ERR_noexe_file = undef;
+$ERR_nonexe_file = undef;
 $ERR_exe_dir = undef;
 
 {
@@ -387,7 +387,7 @@ sub run_make_with_options {
       # If we have a purify log, save it
       $tn = $pure_testname . ($num_of_logfiles ? ".$num_of_logfiles" : "");
       print("Renaming purify log file to $tn\n") if $debug;
-      rename($pure_log, "$tn") or die "Can't rename $log to $tn: $!\n";
+      rename($pure_log, "$tn") or die "Can't rename $pure_log to $tn: $!\n";
       ++$purify_errors;
     } else {
       unlink($pure_log);
@@ -397,7 +397,6 @@ sub run_make_with_options {
   if ($code != $expected_code) {
     print "Error running @make_command (expected $expected_code; got $code): $cmdstr\n";
     $test_passed = 0;
-    $runf = &get_runfile;
     &create_file (&get_runfile, $command_string);
     # If it's a SIGINT, stop here
     if ($code & 127) {
@@ -542,11 +541,6 @@ sub set_more_defaults
     }
   }
 
-  # On DOS/Windows system the filesystem apparently can't track
-  # timestamps with second granularity (!!).  Change the sleep time
-  # needed to force a file to be considered "old".
-  $wtime = $port_type eq 'UNIX' ? 1 : $port_type eq 'OS/2' ? 2 : 4;
-
   # Find the full pathname of Make.  For DOS systems this is more
   # complicated, so we ask make itself.
   if ($osname eq 'VMS') {