[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {branch-1.13.2} tests: expose weaknesses in make flags analysis
From: |
Stefano Lattarini |
Subject: |
[FYI] {branch-1.13.2} tests: expose weaknesses in make flags analysis |
Date: |
Thu, 2 May 2013 20:15:07 +0200 |
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 <address@hidden>
---
t/make-dryrun.tap | 29 ++++++++++++++++-------------
t/make-keepgoing.tap | 23 +++++++++++++----------
2 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap
index c7d8963..0dbe3bb 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: ; address@hidden %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
}
# ----------------------------------------------------------------------
diff --git a/t/make-keepgoing.tap b/t/make-keepgoing.tap
index 0e416ca..f9db028 100755
--- a/t/make-keepgoing.tap
+++ b/t/make-keepgoing.tap
@@ -18,7 +18,7 @@
. test-init.sh
-plan_ 20
+plan_ 60
mkdir kool # Also used later.
if echo nil: | $MAKE -I kool -f -; then
@@ -42,7 +42,7 @@ 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
}
# ----------------------------------------------------------------------
--
1.8.3.rc0.19.g7e6a0cc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {branch-1.13.2} tests: expose weaknesses in make flags analysis,
Stefano Lattarini <=