- Reuse $(@cmd) instead of accumulating $(foo@cmd). Reduces memory and may help
[mgear/mgear.git] / testsuite
index a0dc8aa..8cb46a0 100755 (executable)
--- a/testsuite
+++ b/testsuite
@@ -32,7 +32,8 @@ function start_section {
 
 function do_mgear {
        echo "Running: make $*"
-       make "$@" 2>&1 | tee mgear.log
+       make --warn-undefined-variables "$@" 2>&1 | tee mgear.log
+       assert_not_saw 'warning: undefined variable'
 }
 
 function assert_contents {
@@ -49,8 +50,7 @@ function assert_saw {
        if grep -q "$@" mgear.log; then
                echo "Good, saw '${@:$#}' in build log."
        else
-               echo "Expected '${@:$#}' in build log but didn't see it!  Log:"
-               cat mgear.log
+               echo "Expected '${@:$#}' in build log but didn't see it!"
                fail
        fi
 }
@@ -58,8 +58,7 @@ function assert_not_saw {
        if ! grep -q "$@" mgear.log; then
                echo "Good, saw '${@:$#}' in build log."
        else
-               echo "Did not expect '${@:$#}' in build log but saw it!  Log:"
-               cat mgear.log
+               echo "Did not expect '${@:$#}' in build log but saw it!"
                fail
        fi
 }