Merge pull request #3375 from gilles-peskine-arm/basic-build-test-status-2.16

Backport 2.16: Fix failure detection in basic-build-test.sh
This commit is contained in:
Manuel Pégourié-Gonnard 2020-06-03 09:41:29 +02:00 committed by GitHub
commit 503b79e866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,6 @@ export CFLAGS=' --coverage -g3 -O0 '
make clean make clean
cp "$CONFIG_H" "$CONFIG_BAK" cp "$CONFIG_H" "$CONFIG_BAK"
scripts/config.pl full scripts/config.pl full
scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE
make -j make -j
@ -75,15 +74,19 @@ make -j
TEST_OUTPUT=out_${PPID} TEST_OUTPUT=out_${PPID}
cd tests cd tests
# Step 2a - Unit Tests if [ ! -f "seedfile" ]; then
dd if=/dev/urandom of="seedfile" bs=64 count=1
fi
# Step 2a - Unit Tests (keep going even if some tests fail)
perl scripts/run-test-suites.pl -v 2 |tee unit-test-$TEST_OUTPUT perl scripts/run-test-suites.pl -v 2 |tee unit-test-$TEST_OUTPUT
echo echo
# Step 2b - System Tests # Step 2b - System Tests (keep going even if some tests fail)
sh ssl-opt.sh |tee sys-test-$TEST_OUTPUT sh ssl-opt.sh |tee sys-test-$TEST_OUTPUT
echo echo
# Step 2c - Compatibility tests # Step 2c - Compatibility tests (keep going even if some tests fail)
sh compat.sh -m 'tls1 tls1_1 tls1_2 dtls1 dtls1_2' | \ sh compat.sh -m 'tls1 tls1_1 tls1_2 dtls1 dtls1_2' | \
tee compat-test-$TEST_OUTPUT tee compat-test-$TEST_OUTPUT
OPENSSL_CMD="$OPENSSL_LEGACY" \ OPENSSL_CMD="$OPENSSL_LEGACY" \
@ -100,7 +103,15 @@ echo
# Step 3 - Process the coverage report # Step 3 - Process the coverage report
cd .. cd ..
make lcov |tee tests/cov-$TEST_OUTPUT {
make lcov
echo SUCCESS
} | tee tests/cov-$TEST_OUTPUT
if [ "$(tail -n1 tests/cov-$TEST_OUTPUT)" != "SUCCESS" ]; then
echo >&2 "Fatal: 'make lcov' failed"
exit 2
fi
# Step 4 - Summarise the test report # Step 4 - Summarise the test report
@ -220,3 +231,7 @@ make clean
if [ -f "$CONFIG_BAK" ]; then if [ -f "$CONFIG_BAK" ]; then
mv "$CONFIG_BAK" "$CONFIG_H" mv "$CONFIG_BAK" "$CONFIG_H"
fi fi
if [ $TOTAL_FAIL -ne 0 ]; then
exit 1
fi