]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not stop on the first error to be compatible with "make -k check".
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 2 May 2010 18:09:21 +0000 (12:09 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 2 May 2010 18:09:21 +0000 (12:09 -0600)
If we stop on the first error, it becomes very difficult to test your
changes with "make check" when somebody else broke some other code.

test-suite/testheaders.sh

index 457496a12eb6366d573d3abcddcbd6d564d8f16b..7927fe0d386d3fba109a819d2d4bba6982f56a8b 100755 (executable)
@@ -16,6 +16,8 @@ else
        dir="${2}"
 fi
 
+exitCode=0
+
 for f in `cd ${dir} && ls -1 *.h 2>/dev/null`; do
        echo -n "Testing ${dir}/${f} ..."
        hdr=`echo "${f}" | sed s/.h//`
@@ -32,11 +34,14 @@ for f in `cd ${dir} && ls -1 *.h 2>/dev/null`; do
        fi
        if [ ! -f testHeaderDeps_${hdr}.o ]; then
                rm testHeaders
-               exit 1
-       fi
+               exitCode=1
+       else
        echo "OK."
        # unit-tests require an app to run.
        # our most-recent object suits this purpose.
        # let's link or some tests will fail
        ${cc} ./testHeaderDeps_${hdr}.o -o ./testHeaders
+       fi
 done
+
+exit $exitCode