]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Correct test-builds to allow individual tests run by name
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 29 Oct 2008 13:07:19 +0000 (02:07 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 29 Oct 2008 13:07:19 +0000 (02:07 +1300)
test-builds.sh

index 69e9692ba4ef6b91f67260b29b30659ab3a41cbb..3ec2c8f86a390e8dda9e169eafe43842b159ea03 100755 (executable)
@@ -9,12 +9,15 @@ if test "${1}" = "--cleanup" ; then
        shift
 fi
 
+# Run a single test build by name
 tmp="${1}"
-if test -e ./test-suite/buildtests/os-${tmp}.opts ; then
+if test -e ./test-suite/buildtests/${tmp}.opts ; then
        echo "TESTING: ${tmp}"
-       rm -f -r btos${tmp} && mkdir btos${tmp} && cd btos${tmp}
-       ../test-suite/buildtest.sh ../test-suite/buildtests/os-${tmp}
+       rm -f -r bt${tmp} && mkdir bt${tmp} && cd bt${tmp}
+       ../test-suite/buildtest.sh ../test-suite/buildtests/${tmp}
+       ( grep -E "^ERROR|\ error:\ |No\ such" buildtest_*.log && exit 1 )
        cd ..
+       exit 0
 fi
 
 #
@@ -24,17 +27,16 @@ fi
 #  These layers are constructed from detailed knowledge of
 #  component dependencies.
 #
-
 for f in `ls -1 ./test-suite/buildtests/layer*.opts` ; do
        layer=`echo "${f}" | grep -o -E "layer-[0-9]*-[^\.]*"`
-       rm -f -r btl${layer} && mkdir btl${layer} && cd btl${layer}
+       rm -f -r bt${layer} && mkdir bt${layer} && cd bt${layer}
        arg=`echo "${f}" | sed s/\\.opts//`
        echo "TESTING: ${arg}"
        ../test-suite/buildtest.sh ".${arg}" ||
        ( grep -E "^ERROR|\ error:\ |No\ such" buildtest_*.log && exit 1 )
        cd ..
        if test "${cleanup}" = "yes" ; then
-               echo "REMOVE: btl${layer}"
-               rm -f -r btl${layer}
+               echo "REMOVE: bt${layer}"
+               rm -f -r bt${layer}
        fi
 done