]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
make flags analysis: expose bug in dry-run recognition
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 23 Dec 2014 00:29:23 +0000 (01:29 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 23 Dec 2014 01:19:13 +0000 (02:19 +0100)
* t/make-dryrun.tap: Here.  If, e.g., the '--no-print-directory' option is
given, the $(am.make.dry-run) variable will erroneously set to 'true',
even when make is *not* running in dry mode :-(

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/make-dryrun.tap

index ff9d5eba697fbd12037f535a3988cc6017156910..dee8fc6d4ac9cc2b4390e6322736ea3883ee9f97 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012-2013 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 . test-init.sh
 
-plan_ 132
+plan_ $((27 * 6))
 
 echo AC_OUTPUT >> configure.ac
 
@@ -42,6 +42,7 @@ dry-recursive:
        $(MAKE) dry-plain
 END
 
+# Each invocation of this will run 6 tests.
 check_make ()
 {
   msg= mode=
@@ -86,15 +87,22 @@ $AUTOMAKE   || fatal_ "automake failed"
 check_make --run
 check_make --run -k
 
-# Test against a known regression.  This was especially heinous, since
+# Test against known regressions.  These were especially heinous, since
 # make running in normal mode was sometimes mistaken for make running
 # in dry mode.
+
 check_make --run TESTS="n1.test n2.test"
 check_make --run TESTS="n1 n2" MAKEFLAGS="TESTS='n1 n2'"
 check_make --run TESTS="n1 n2" MAKEFLAGS='TESTS="n1 n2"'
 check_make --run FOOFLAGS="-n -n -knf2 n --none -n"
 check_make --run MYFLAGS="-n --dryrun -n --dry-run -n"
 
+check_make --run -- --print-directory -k
+check_make --run -- --debug=an
+check_make --run -- --print-directory --no-builtin-rules
+check_make --run -- --no-print-directory
+check_make --run -- --no-print-directory --no-builtin-rules
+
 # ----------------------------------------------------------------------
 
 check_make --dry -- -n