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 {
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
}
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
}