From: Alex Rousskov Date: Wed, 7 Jul 2010 00:22:37 +0000 (-0600) Subject: Do not stop testheaders.sh on the first error, to be compatible with X-Git-Tag: SQUID_3_2_0_1~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d18e40dbae53ffcc614d537342c84793a022f993;p=thirdparty%2Fsquid.git Do not stop testheaders.sh on the first error, to be compatible with "make -k check". If testheaders.sh stops on the first error, it becomes very difficult to test your changes with "make check" when somebody else broke some other code or when the checks reach src/cf_parser.h and fail. TODO: stop on the first error unless running under "make -k check". --- diff --git a/test-suite/testheaders.sh b/test-suite/testheaders.sh index 457496a12e..48f358fd02 100755 --- a/test-suite/testheaders.sh +++ b/test-suite/testheaders.sh @@ -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 + 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 - 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 done + +exit $exitCode