SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # basic-build-tests.sh |
| 4 | # |
Bence Szépkúti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame] | 5 | # Copyright The Mbed TLS Contributors |
Bence Szépkúti | c7da1fe | 2020-05-26 01:54:15 +0200 | [diff] [blame] | 6 | # SPDX-License-Identifier: Apache-2.0 |
| 7 | # |
| 8 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 9 | # not use this file except in compliance with the License. |
| 10 | # You may obtain a copy of the License at |
| 11 | # |
| 12 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | # |
| 14 | # Unless required by applicable law or agreed to in writing, software |
| 15 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 16 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | # See the License for the specific language governing permissions and |
| 18 | # limitations under the License. |
| 19 | # |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 20 | # Purpose |
| 21 | # |
| 22 | # Executes the basic test suites, captures the results, and generates a simple |
| 23 | # test report and code coverage report. |
| 24 | # |
| 25 | # The tests include: |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 26 | # * Unit tests - executed using tests/scripts/run-test-suite.pl |
Paul Bakker | 4b8bc52 | 2016-07-20 09:52:01 +0100 | [diff] [blame] | 27 | # * Self-tests - executed using the test suites above |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 28 | # * System tests - executed using tests/ssl-opt.sh |
| 29 | # * Interoperability tests - executed using tests/compat.sh |
| 30 | # |
| 31 | # The tests focus on functionality and do not consider performance. |
| 32 | # |
Bence Szépkúti | bb0cfeb | 2021-05-28 09:42:25 +0200 | [diff] [blame^] | 33 | # Note the tests self-adapt due to configurations in include/mbedtls/mbedtls_config.h |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 34 | # which can lead to some tests being skipped, and can cause the number of |
Paul Bakker | 4b8bc52 | 2016-07-20 09:52:01 +0100 | [diff] [blame] | 35 | # available tests to fluctuate. |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 36 | # |
| 37 | # This script has been written to be generic and should work on any shell. |
| 38 | # |
| 39 | # Usage: basic-build-tests.sh |
| 40 | # |
| 41 | |
| 42 | # Abort on errors (and uninitiliased variables) |
| 43 | set -eu |
| 44 | |
| 45 | if [ -d library -a -d include -a -d tests ]; then :; else |
| 46 | echo "Must be run from mbed TLS root" >&2 |
| 47 | exit 1 |
| 48 | fi |
| 49 | |
Andres AG | b2fdd04 | 2016-09-22 14:17:46 +0100 | [diff] [blame] | 50 | : ${OPENSSL:="openssl"} |
| 51 | : ${OPENSSL_LEGACY:="$OPENSSL"} |
| 52 | : ${GNUTLS_CLI:="gnutls-cli"} |
| 53 | : ${GNUTLS_SERV:="gnutls-serv"} |
| 54 | : ${GNUTLS_LEGACY_CLI:="$GNUTLS_CLI"} |
| 55 | : ${GNUTLS_LEGACY_SERV:="$GNUTLS_SERV"} |
| 56 | |
Manuel Pégourié-Gonnard | e050191 | 2020-06-08 12:59:27 +0200 | [diff] [blame] | 57 | # Used to make ssl-opt.sh deterministic. |
Manuel Pégourié-Gonnard | 5430447 | 2020-06-22 10:11:47 +0200 | [diff] [blame] | 58 | # |
| 59 | # See also RELEASE_SEED in all.sh. Debugging is easier if both values are kept |
| 60 | # in sync. If you change the value here because it breaks some tests, you'll |
| 61 | # definitely want to change it in all.sh as well. |
Manuel Pégourié-Gonnard | e050191 | 2020-06-08 12:59:27 +0200 | [diff] [blame] | 62 | : ${SEED:=1} |
| 63 | export SEED |
| 64 | |
Andres AG | b2fdd04 | 2016-09-22 14:17:46 +0100 | [diff] [blame] | 65 | # To avoid setting OpenSSL and GnuTLS for each call to compat.sh and ssl-opt.sh |
| 66 | # we just export the variables they require |
| 67 | export OPENSSL_CMD="$OPENSSL" |
| 68 | export GNUTLS_CLI="$GNUTLS_CLI" |
| 69 | export GNUTLS_SERV="$GNUTLS_SERV" |
| 70 | |
Bence Szépkúti | bb0cfeb | 2021-05-28 09:42:25 +0200 | [diff] [blame^] | 71 | CONFIG_H='include/mbedtls/mbedtls_config.h' |
Janos Follath | 7ccac85 | 2016-06-06 13:18:39 +0100 | [diff] [blame] | 72 | CONFIG_BAK="$CONFIG_H.bak" |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 73 | |
Janos Follath | b72c678 | 2016-07-19 14:54:17 +0100 | [diff] [blame] | 74 | # Step 0 - print build environment info |
Andres AG | b2fdd04 | 2016-09-22 14:17:46 +0100 | [diff] [blame] | 75 | OPENSSL="$OPENSSL" \ |
| 76 | OPENSSL_LEGACY="$OPENSSL_LEGACY" \ |
| 77 | GNUTLS_CLI="$GNUTLS_CLI" \ |
| 78 | GNUTLS_SERV="$GNUTLS_SERV" \ |
| 79 | GNUTLS_LEGACY_CLI="$GNUTLS_LEGACY_CLI" \ |
| 80 | GNUTLS_LEGACY_SERV="$GNUTLS_LEGACY_SERV" \ |
| 81 | scripts/output_env.sh |
Janos Follath | b72c678 | 2016-07-19 14:54:17 +0100 | [diff] [blame] | 82 | echo |
| 83 | |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 84 | # Step 1 - Make and instrumented build for code coverage |
Simon Butcher | c2b0efc | 2016-03-18 18:28:43 +0000 | [diff] [blame] | 85 | export CFLAGS=' --coverage -g3 -O0 ' |
Philippe Antoine | 702c659 | 2019-07-09 17:44:53 +0200 | [diff] [blame] | 86 | export LDFLAGS=' --coverage' |
SimonB | 098a3b5 | 2016-04-16 21:56:59 +0100 | [diff] [blame] | 87 | make clean |
Janos Follath | 7ccac85 | 2016-06-06 13:18:39 +0100 | [diff] [blame] | 88 | cp "$CONFIG_H" "$CONFIG_BAK" |
Gilles Peskine | 5d46f6a | 2019-07-27 23:52:53 +0200 | [diff] [blame] | 89 | scripts/config.py full |
Simon Butcher | cbb9075 | 2016-05-19 22:15:34 +0100 | [diff] [blame] | 90 | make -j |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 91 | |
| 92 | |
| 93 | # Step 2 - Execute the tests |
| 94 | TEST_OUTPUT=out_${PPID} |
| 95 | cd tests |
Gilles Peskine | 3c8ccc0 | 2019-05-20 11:39:18 +0200 | [diff] [blame] | 96 | if [ ! -f "seedfile" ]; then |
Gilles Peskine | bfcb6e1 | 2020-04-09 18:33:34 +0200 | [diff] [blame] | 97 | dd if=/dev/urandom of="seedfile" bs=64 count=1 |
Gilles Peskine | 3c8ccc0 | 2019-05-20 11:39:18 +0200 | [diff] [blame] | 98 | fi |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 99 | echo |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 100 | |
Gilles Peskine | ca51b47 | 2020-04-09 18:29:42 +0200 | [diff] [blame] | 101 | # Step 2a - Unit Tests (keep going even if some tests fail) |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 102 | echo '################ Unit tests ################' |
Jaeden Amero | 60ca6e5 | 2018-12-07 13:06:24 +0000 | [diff] [blame] | 103 | perl scripts/run-test-suites.pl -v 2 |tee unit-test-$TEST_OUTPUT |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 104 | echo '^^^^^^^^^^^^^^^^ Unit tests ^^^^^^^^^^^^^^^^' |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 105 | echo |
| 106 | |
Gilles Peskine | ca51b47 | 2020-04-09 18:29:42 +0200 | [diff] [blame] | 107 | # Step 2b - System Tests (keep going even if some tests fail) |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 108 | echo |
| 109 | echo '################ ssl-opt.sh ################' |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 110 | sh ssl-opt.sh |tee sys-test-$TEST_OUTPUT |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 111 | echo '^^^^^^^^^^^^^^^^ ssl-opt.sh ^^^^^^^^^^^^^^^^' |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 112 | echo |
| 113 | |
Gilles Peskine | ca51b47 | 2020-04-09 18:29:42 +0200 | [diff] [blame] | 114 | # Step 2c - Compatibility tests (keep going even if some tests fail) |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 115 | echo '################ compat.sh ################' |
| 116 | { |
| 117 | echo '#### compat.sh: Default versions' |
TRodziewicz | 0f82ec6 | 2021-05-12 17:49:18 +0200 | [diff] [blame] | 118 | sh compat.sh -m 'tls1_2 dtls1_2' |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 119 | echo |
| 120 | |
TRodziewicz | 10e8cf5 | 2021-05-31 17:58:57 +0200 | [diff] [blame] | 121 | echo '#### compat.sh: legacy (null, DES)' |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 122 | OPENSSL_CMD="$OPENSSL_LEGACY" \ |
| 123 | GNUTLS_CLI="$GNUTLS_LEGACY_CLI" GNUTLS_SERV="$GNUTLS_LEGACY_SERV" \ |
TRodziewicz | 10e8cf5 | 2021-05-31 17:58:57 +0200 | [diff] [blame] | 124 | sh compat.sh -e '^$' -f 'NULL\|DES' |
Gilles Peskine | 40be51f | 2020-04-09 18:50:08 +0200 | [diff] [blame] | 125 | echo |
| 126 | |
| 127 | echo '#### compat.sh: next (ARIA, ChaCha)' |
| 128 | OPENSSL_CMD="$OPENSSL_NEXT" sh compat.sh -e '^$' -f 'ARIA\|CHACHA' |
| 129 | echo |
| 130 | } | tee compat-test-$TEST_OUTPUT |
| 131 | echo '^^^^^^^^^^^^^^^^ compat.sh ^^^^^^^^^^^^^^^^' |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 132 | echo |
| 133 | |
| 134 | # Step 3 - Process the coverage report |
| 135 | cd .. |
Gilles Peskine | 5757d54 | 2020-04-09 18:32:48 +0200 | [diff] [blame] | 136 | { |
| 137 | make lcov |
| 138 | echo SUCCESS |
| 139 | } | tee tests/cov-$TEST_OUTPUT |
| 140 | |
| 141 | if [ "$(tail -n1 tests/cov-$TEST_OUTPUT)" != "SUCCESS" ]; then |
| 142 | echo >&2 "Fatal: 'make lcov' failed" |
| 143 | exit 2 |
| 144 | fi |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 145 | |
| 146 | |
| 147 | # Step 4 - Summarise the test report |
| 148 | echo |
| 149 | echo "=========================================================================" |
| 150 | echo "Test Report Summary" |
| 151 | echo |
| 152 | |
| 153 | cd tests |
| 154 | |
Paul Bakker | 4b8bc52 | 2016-07-20 09:52:01 +0100 | [diff] [blame] | 155 | # Step 4a - Unit tests |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 156 | echo "Unit tests - tests/scripts/run-test-suites.pl" |
| 157 | |
| 158 | PASSED_TESTS=$(tail -n6 unit-test-$TEST_OUTPUT|sed -n -e 's/test cases passed :[\t]*\([0-9]*\)/\1/p'| tr -d ' ') |
| 159 | SKIPPED_TESTS=$(tail -n6 unit-test-$TEST_OUTPUT|sed -n -e 's/skipped :[ \t]*\([0-9]*\)/\1/p'| tr -d ' ') |
| 160 | TOTAL_SUITES=$(tail -n6 unit-test-$TEST_OUTPUT|sed -n -e 's/.* (\([0-9]*\) .*, [0-9]* tests run)/\1/p'| tr -d ' ') |
| 161 | FAILED_TESTS=$(tail -n6 unit-test-$TEST_OUTPUT|sed -n -e 's/failed :[\t]*\([0-9]*\)/\1/p' |tr -d ' ') |
| 162 | |
| 163 | echo "No test suites : $TOTAL_SUITES" |
| 164 | echo "Passed : $PASSED_TESTS" |
| 165 | echo "Failed : $FAILED_TESTS" |
| 166 | echo "Skipped : $SKIPPED_TESTS" |
| 167 | echo "Total exec'd tests : $(($PASSED_TESTS + $FAILED_TESTS))" |
| 168 | echo "Total avail tests : $(($PASSED_TESTS + $FAILED_TESTS + $SKIPPED_TESTS))" |
| 169 | echo |
| 170 | |
Paul Bakker | 4b8bc52 | 2016-07-20 09:52:01 +0100 | [diff] [blame] | 171 | TOTAL_PASS=$PASSED_TESTS |
| 172 | TOTAL_FAIL=$FAILED_TESTS |
| 173 | TOTAL_SKIP=$SKIPPED_TESTS |
| 174 | TOTAL_AVAIL=$(($PASSED_TESTS + $FAILED_TESTS + $SKIPPED_TESTS)) |
| 175 | TOTAL_EXED=$(($PASSED_TESTS + $FAILED_TESTS)) |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 176 | |
Paul Bakker | 4b8bc52 | 2016-07-20 09:52:01 +0100 | [diff] [blame] | 177 | # Step 4b - TLS Options tests |
Simon Butcher | ab0c51d | 2016-03-13 01:23:34 +0000 | [diff] [blame] | 178 | echo "TLS Options tests - tests/ssl-opt.sh" |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 179 | |
| 180 | PASSED_TESTS=$(tail -n5 sys-test-$TEST_OUTPUT|sed -n -e 's/.* (\([0-9]*\) \/ [0-9]* tests ([0-9]* skipped))$/\1/p') |
| 181 | SKIPPED_TESTS=$(tail -n5 sys-test-$TEST_OUTPUT|sed -n -e 's/.* ([0-9]* \/ [0-9]* tests (\([0-9]*\) skipped))$/\1/p') |
| 182 | TOTAL_TESTS=$(tail -n5 sys-test-$TEST_OUTPUT|sed -n -e 's/.* ([0-9]* \/ \([0-9]*\) tests ([0-9]* skipped))$/\1/p') |
| 183 | FAILED_TESTS=$(($TOTAL_TESTS - $PASSED_TESTS)) |
| 184 | |
| 185 | echo "Passed : $PASSED_TESTS" |
| 186 | echo "Failed : $FAILED_TESTS" |
| 187 | echo "Skipped : $SKIPPED_TESTS" |
| 188 | echo "Total exec'd tests : $TOTAL_TESTS" |
| 189 | echo "Total avail tests : $(($TOTAL_TESTS + $SKIPPED_TESTS))" |
| 190 | echo |
| 191 | |
| 192 | TOTAL_PASS=$(($TOTAL_PASS+$PASSED_TESTS)) |
| 193 | TOTAL_FAIL=$(($TOTAL_FAIL+$FAILED_TESTS)) |
| 194 | TOTAL_SKIP=$(($TOTAL_SKIP+$SKIPPED_TESTS)) |
| 195 | TOTAL_AVAIL=$(($TOTAL_AVAIL + $TOTAL_TESTS + $SKIPPED_TESTS)) |
| 196 | TOTAL_EXED=$(($TOTAL_EXED + $TOTAL_TESTS)) |
| 197 | |
| 198 | |
Paul Bakker | 4b8bc52 | 2016-07-20 09:52:01 +0100 | [diff] [blame] | 199 | # Step 4c - System Compatibility tests |
Simon Butcher | ab0c51d | 2016-03-13 01:23:34 +0000 | [diff] [blame] | 200 | echo "System/Compatibility tests - tests/compat.sh" |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 201 | |
Andres AG | b2fdd04 | 2016-09-22 14:17:46 +0100 | [diff] [blame] | 202 | PASSED_TESTS=$(cat compat-test-$TEST_OUTPUT | sed -n -e 's/.* (\([0-9]*\) \/ [0-9]* tests ([0-9]* skipped))$/\1/p' | awk 'BEGIN{ s = 0 } { s += $1 } END{ print s }') |
| 203 | SKIPPED_TESTS=$(cat compat-test-$TEST_OUTPUT | sed -n -e 's/.* ([0-9]* \/ [0-9]* tests (\([0-9]*\) skipped))$/\1/p' | awk 'BEGIN{ s = 0 } { s += $1 } END{ print s }') |
| 204 | EXED_TESTS=$(cat compat-test-$TEST_OUTPUT | sed -n -e 's/.* ([0-9]* \/ \([0-9]*\) tests ([0-9]* skipped))$/\1/p' | awk 'BEGIN{ s = 0 } { s += $1 } END{ print s }') |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 205 | FAILED_TESTS=$(($EXED_TESTS - $PASSED_TESTS)) |
| 206 | |
| 207 | echo "Passed : $PASSED_TESTS" |
| 208 | echo "Failed : $FAILED_TESTS" |
| 209 | echo "Skipped : $SKIPPED_TESTS" |
| 210 | echo "Total exec'd tests : $EXED_TESTS" |
| 211 | echo "Total avail tests : $(($EXED_TESTS + $SKIPPED_TESTS))" |
| 212 | echo |
| 213 | |
| 214 | TOTAL_PASS=$(($TOTAL_PASS+$PASSED_TESTS)) |
| 215 | TOTAL_FAIL=$(($TOTAL_FAIL+$FAILED_TESTS)) |
| 216 | TOTAL_SKIP=$(($TOTAL_SKIP+$SKIPPED_TESTS)) |
| 217 | TOTAL_AVAIL=$(($TOTAL_AVAIL + $EXED_TESTS + $SKIPPED_TESTS)) |
| 218 | TOTAL_EXED=$(($TOTAL_EXED + $EXED_TESTS)) |
| 219 | |
| 220 | |
Paul Bakker | 4b8bc52 | 2016-07-20 09:52:01 +0100 | [diff] [blame] | 221 | # Step 4d - Grand totals |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 222 | echo "-------------------------------------------------------------------------" |
| 223 | echo "Total tests" |
| 224 | |
| 225 | echo "Total Passed : $TOTAL_PASS" |
| 226 | echo "Total Failed : $TOTAL_FAIL" |
| 227 | echo "Total Skipped : $TOTAL_SKIP" |
| 228 | echo "Total exec'd tests : $TOTAL_EXED" |
| 229 | echo "Total avail tests : $TOTAL_AVAIL" |
| 230 | echo |
| 231 | |
| 232 | |
Paul Bakker | 4b8bc52 | 2016-07-20 09:52:01 +0100 | [diff] [blame] | 233 | # Step 4e - Coverage |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 234 | echo "Coverage" |
| 235 | |
Dan Handley | a8b26c2 | 2020-05-28 16:20:31 +0100 | [diff] [blame] | 236 | LINES_TESTED=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ lines......: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* lines)/\1/p') |
| 237 | LINES_TOTAL=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ lines......: [0-9]*.[0-9]% ([0-9]* of \([0-9]*\) lines)/\1/p') |
| 238 | FUNCS_TESTED=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ functions..: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* functions)$/\1/p') |
| 239 | FUNCS_TOTAL=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ functions..: [0-9]*.[0-9]% ([0-9]* of \([0-9]*\) functions)$/\1/p') |
| 240 | BRANCHES_TESTED=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ branches...: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* branches)$/\1/p') |
| 241 | BRANCHES_TOTAL=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ branches...: [0-9]*.[0-9]% ([0-9]* of \([0-9]*\) branches)$/\1/p') |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 242 | |
| 243 | LINES_PERCENT=$((1000*$LINES_TESTED/$LINES_TOTAL)) |
| 244 | LINES_PERCENT="$(($LINES_PERCENT/10)).$(($LINES_PERCENT-($LINES_PERCENT/10)*10))" |
| 245 | |
| 246 | FUNCS_PERCENT=$((1000*$FUNCS_TESTED/$FUNCS_TOTAL)) |
| 247 | FUNCS_PERCENT="$(($FUNCS_PERCENT/10)).$(($FUNCS_PERCENT-($FUNCS_PERCENT/10)*10))" |
| 248 | |
Dan Handley | a8b26c2 | 2020-05-28 16:20:31 +0100 | [diff] [blame] | 249 | BRANCHES_PERCENT=$((1000*$BRANCHES_TESTED/$BRANCHES_TOTAL)) |
| 250 | BRANCHES_PERCENT="$(($BRANCHES_PERCENT/10)).$(($BRANCHES_PERCENT-($BRANCHES_PERCENT/10)*10))" |
| 251 | |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 252 | echo "Lines Tested : $LINES_TESTED of $LINES_TOTAL $LINES_PERCENT%" |
| 253 | echo "Functions Tested : $FUNCS_TESTED of $FUNCS_TOTAL $FUNCS_PERCENT%" |
Dan Handley | a8b26c2 | 2020-05-28 16:20:31 +0100 | [diff] [blame] | 254 | echo "Branches Tested : $BRANCHES_TESTED of $BRANCHES_TOTAL $BRANCHES_PERCENT%" |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 255 | echo |
| 256 | |
SimonB | 21ab9d7 | 2016-03-12 20:37:32 +0000 | [diff] [blame] | 257 | rm unit-test-$TEST_OUTPUT |
| 258 | rm sys-test-$TEST_OUTPUT |
| 259 | rm compat-test-$TEST_OUTPUT |
| 260 | rm cov-$TEST_OUTPUT |
| 261 | |
| 262 | cd .. |
Janos Follath | 7ccac85 | 2016-06-06 13:18:39 +0100 | [diff] [blame] | 263 | |
| 264 | make clean |
| 265 | |
| 266 | if [ -f "$CONFIG_BAK" ]; then |
| 267 | mv "$CONFIG_BAK" "$CONFIG_H" |
| 268 | fi |
Gilles Peskine | 6d6ee98 | 2020-04-09 18:28:14 +0200 | [diff] [blame] | 269 | |
| 270 | if [ $TOTAL_FAIL -ne 0 ]; then |
| 271 | exit 1 |
| 272 | fi |