packaging: Bump to 1.14.1
[platform/upstream/automake.git] / t / make-keepgoing.tap
old mode 100755 (executable)
new mode 100644 (file)
index a71d2d0..a595eeb
@@ -18,7 +18,7 @@
 
 . test-init.sh
 
-plan_ 20
+plan_ 60
 
 mkdir kool # Also used later.
 if echo nil: | $MAKE -I kool -f -; then
@@ -33,16 +33,16 @@ cat > Makefile.am <<'END'
 all:
        @echo 'Default target $@ should not be called'>&2; exit 1;
 k-y:
-       @echo ":: $$MAKEFLAGS ::" ;: For debugging.
+       @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
        $(am__make_keepgoing)
 k-n:
-       @echo ":: $$MAKEFLAGS ::" ;: For debugging.
+       @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
        $(am__make_keepgoing) && exit 1; exit 0
 END
 
 check_make ()
 {
-  r=ok msg= mode= condition=: directive= reason= skip_reason=
+  msg= mode= condition=: directive= reason= skip_reason=
   case $1 in
     k-[yn]) mode=$1;;
     *) fatal_ "check_run: invalid usage";;
@@ -58,14 +58,17 @@ check_make ()
     esac
     shift
   done
-  msg=${mode}${msg:+" [$msg]"}
-  if $condition; then
-    $MAKE "$mode" ${1+"$@"} || r='not ok'
-  else
-    directive=SKIP reason=$skip_reason
-  fi
-  result_ "$r" -D "$directive" -r "$reason" "$msg"
-  unset r msg mode condition directive reason skip_reason
+  for opts in '' '-s'  '-s -r'; do
+    r=ok
+    pmsg=${mode}${msg:+" [$msg]"}${opts:+" ($opts)"}
+    if $condition; then
+      $MAKE $opts "$mode" ${1+"$@"} || r='not ok'
+    else
+      directive=SKIP reason=$skip_reason
+    fi
+    result_ "$r" -D "$directive" -r "$reason" "$pmsg"
+  done
+  unset r msg pmsg opts mode condition directive reason skip_reason
 }
 
 # ----------------------------------------------------------------------
@@ -82,7 +85,7 @@ check_make k-n
 # Test against a possible regressions similar to those that affected
 # detection of dry mode ("make -n").
 check_make k-n TESTS="k.test k2.test"
-check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS="TESTS='k1 k2'"
+check_make k-n TESTS="k1 k2" AM_MAKEFLAGS="TESTS='k1 k2'"
 check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS='TESTS="k1 k k2"'
 check_make k-n FOOFLAGS="-k -k -nkf2 k -ks --keep -k"
 check_make k-n MYFLAGS="-k --keepgoing -k --keep-run -k"