mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 19:25:45 +01:00
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:
commit
503b79e866
@ -67,7 +67,6 @@ export CFLAGS=' --coverage -g3 -O0 '
|
||||
make clean
|
||||
cp "$CONFIG_H" "$CONFIG_BAK"
|
||||
scripts/config.pl full
|
||||
scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE
|
||||
make -j
|
||||
|
||||
|
||||
@ -75,15 +74,19 @@ make -j
|
||||
TEST_OUTPUT=out_${PPID}
|
||||
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
|
||||
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
|
||||
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' | \
|
||||
tee compat-test-$TEST_OUTPUT
|
||||
OPENSSL_CMD="$OPENSSL_LEGACY" \
|
||||
@ -100,7 +103,15 @@ echo
|
||||
|
||||
# Step 3 - Process the coverage report
|
||||
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
|
||||
@ -220,3 +231,7 @@ make clean
|
||||
if [ -f "$CONFIG_BAK" ]; then
|
||||
mv "$CONFIG_BAK" "$CONFIG_H"
|
||||
fi
|
||||
|
||||
if [ $TOTAL_FAIL -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user