From c3f9ac62f1e3b9aca3d30f20626d9f6f43130e63 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Tue, 23 Dec 2014 01:29:23 +0100 Subject: [PATCH] make flags analysis: expose bug in dry-run recognition * 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 --- t/make-dryrun.tap | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap index ff9d5eba6..dee8fc6d4 100755 --- a/t/make-dryrun.tap +++ b/t/make-dryrun.tap @@ -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 -- 2.47.2