X-Git-Url: https://git.ozlabs.org/?p=ponghero.git;a=blobdiff_plain;f=ccan%2Fccan_tools%2Ftest_all.sh;fp=ccan%2Fccan_tools%2Ftest_all.sh;h=3c65c21ca67fa7f3f10a9fc6b104b38aadb98613;hp=0000000000000000000000000000000000000000;hb=3b07a088e47dffe99415cb01f42ea89c9185bdc5;hpb=4b884e9e3bff9f777f705d364627ce49ff4cedd6 diff --git a/ccan/ccan_tools/test_all.sh b/ccan/ccan_tools/test_all.sh new file mode 100755 index 0000000..3c65c21 --- /dev/null +++ b/ccan/ccan_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