X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Ftest_all.sh;fp=tools%2Ftest_all.sh;h=3c65c21ca67fa7f3f10a9fc6b104b38aadb98613;hb=650c775ff00cccd03fc84e7789a03c51d9839004;hp=0000000000000000000000000000000000000000;hpb=c8acddea39d222312102952e91c32cfe4dd2cea0;p=ccan-lca-2011.git diff --git a/tools/test_all.sh b/tools/test_all.sh new file mode 100755 index 0000000..3c65c21 --- /dev/null +++ b/tools/test_all.sh @@ -0,0 +1,22 @@ +#! /bin/sh + +# First, test normal config. +if ! make -s; then + echo Normal config failed. + exit 1 +fi + +# Now, remove one HAVE_ at a time. +cp config.h original-config.h +trap "mv original-config.h config.h && rm -f .newconfig" EXIT + +while grep -q '1$' config.h; do + tr '\012' @ < config.h | sed 's/1@/0@/' | tr @ '\012' > .newconfig + diff -u config.h .newconfig + mv .newconfig config.h + if ! make -s; then + echo Failed config: + cat config.h + exit 1 + fi +done