summaryrefslogtreecommitdiff
path: root/t/make-dryrun.tap
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-02 00:43:33 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-02 00:44:23 +0200
commit7aa99186d1c5fb31d3fd39beb129fc4cb44f2c7c (patch)
tree7ab19f3c11a6c84f6101f17e37fbbf6f44ade5af /t/make-dryrun.tap
parentd017b54baba7d6eadab6394da6ee62f0a83b1238 (diff)
downloadautomake-7aa99186d1c5fb31d3fd39beb129fc4cb44f2c7c.tar.gz
tests: expose weaknesses in make flags analysis
This introduces some failures in the testsuite, that will be fixed soon enough by follow-up patches. * t/make-dryrun.tap: Enhance and extend. * t/make-keepgoing.tap: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/make-dryrun.tap')
-rwxr-xr-xt/make-dryrun.tap29
1 files changed, 16 insertions, 13 deletions
diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap
index c7d8963da..0dbe3bb89 100755
--- a/t/make-dryrun.tap
+++ b/t/make-dryrun.tap
@@ -18,7 +18,7 @@
. test-init.sh
-plan_ 20
+plan_ 60
if echo "all: ; +@printf %sbb%s aa cc" | $MAKE -n -f - | grep aabbcc; then
make_plus_silence () { return 0; }
@@ -48,7 +48,7 @@ END
check_make ()
{
- r=ok msg= mode= condition=: directive= reason= skip_reason=
+ msg= mode= condition=: directive= reason= skip_reason=
case $1 in
--dry) mode=dry;;
--run) mode=run;;
@@ -64,17 +64,20 @@ check_make ()
esac
shift
done
- msg=${mode}${msg:+" [$msg]"}
- if $condition; then
- $MAKE "$mode" ${1+"$@"} || r='not ok'
- test -f from-$mode || r='not ok'
- test ! -e bad || r='not ok'
- rm -f bad from-* || fatal_ "cleaning up"
- 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'
+ test -f from-$mode || r='not ok'
+ test ! -e bad || r='not ok'
+ rm -f bad from-* || fatal_ "cleaning up"
+ 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
}
# ----------------------------------------------------------------------