Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 3 | # all.sh |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 4 | # |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 5 | # This file is part of mbed TLS (https://tls.mbed.org) |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 6 | # |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 7 | # Copyright (c) 2014-2016, ARM Limited, All Rights Reserved |
| 8 | # |
| 9 | # Purpose |
| 10 | # |
| 11 | # To run all tests possible or available on the platform. |
| 12 | # |
| 13 | # Warning: the test is destructive. It includes various build modes and |
| 14 | # configurations, and can and will arbitrarily change the current CMake |
| 15 | # configuration. After this script has been run, the CMake cache will be lost |
| 16 | # and CMake will no longer be initialised. |
| 17 | # |
| 18 | # The script assumes the presence of gcc and clang (recent enough for using |
| 19 | # ASan with gcc and MemSan with clang, or valgrind) are available, as well as |
| 20 | # cmake and a "good" find. |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 21 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 22 | # Abort on errors (and uninitialised variables) |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 23 | set -eu |
| 24 | |
| 25 | if [ -d library -a -d include -a -d tests ]; then :; else |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 26 | err_msg "Must be run from mbed TLS root" |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 27 | exit 1 |
| 28 | fi |
| 29 | |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 30 | CONFIG_H='include/polarssl/config.h' |
| 31 | CONFIG_BAK="$CONFIG_H.bak" |
| 32 | |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 33 | MEMORY=0 |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 34 | FORCE=0 |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 35 | KEEP_GOING=0 |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 36 | RELEASE=0 |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 37 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 38 | # Default commands, can be overriden by the environment |
| 39 | : ${OPENSSL:="openssl"} |
| 40 | : ${OPENSSL_LEGACY:="$OPENSSL"} |
| 41 | : ${GNUTLS_CLI:="gnutls-cli"} |
| 42 | : ${GNUTLS_SERV:="gnutls-serv"} |
| 43 | : ${GNUTLS_LEGACY_CLI:="$GNUTLS_CLI"} |
| 44 | : ${GNUTLS_LEGACY_SERV:="$GNUTLS_SERV"} |
| 45 | : ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build} |
| 46 | |
| 47 | usage() |
| 48 | { |
Gilles Peskine | 4d4872a | 2017-12-10 23:43:39 +0100 | [diff] [blame] | 49 | cat <<EOF |
| 50 | Usage: $0 [OPTION]... |
| 51 | -h|--help Print this help. |
| 52 | |
| 53 | General options: |
| 54 | -f|--force Force the tests to overwrite any modified files. |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 55 | -k|--keep-going Run all tests and report errors at the end. |
Gilles Peskine | 4d4872a | 2017-12-10 23:43:39 +0100 | [diff] [blame] | 56 | -m|--memory Additional optional memory tests. |
| 57 | --out-of-source-dir=<path> Directory used for CMake out-of-source build tests. |
| 58 | -r|--release-test Run this script in release mode. This fixes the seed value to 1. |
| 59 | -s|--seed Integer seed value to use for this test run. |
| 60 | |
| 61 | Tool path options: |
| 62 | --gnutls-cli=<GnuTLS_cli_path> GnuTLS client executable to use for most tests. |
| 63 | --gnutls-serv=<GnuTLS_serv_path> GnuTLS server executable to use for most tests. |
| 64 | --gnutls-legacy-cli=<GnuTLS_cli_path> GnuTLS client executable to use for legacy tests. |
| 65 | --gnutls-legacy-serv=<GnuTLS_serv_path> GnuTLS server executable to use for legacy tests. |
| 66 | --openssl=<OpenSSL_path> OpenSSL executable to use for most tests. |
| 67 | --openssl-legacy=<OpenSSL_path> OpenSSL executable to use for legacy tests e.g. SSLv3. |
| 68 | EOF |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 69 | } |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 70 | |
| 71 | # remove built files as well as the cmake cache/config |
| 72 | cleanup() |
| 73 | { |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 74 | command make clean |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 75 | |
Manuel Pégourié-Gonnard | 76c99a0 | 2014-12-11 10:33:43 +0100 | [diff] [blame] | 76 | find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} \+ |
Manuel Pégourié-Gonnard | 897a595 | 2014-03-25 13:23:04 +0100 | [diff] [blame] | 77 | rm -f include/Makefile include/polarssl/Makefile programs/*/Makefile |
Paul Bakker | fe0984d | 2014-06-13 00:13:45 +0200 | [diff] [blame] | 78 | git update-index --no-skip-worktree Makefile library/Makefile programs/Makefile tests/Makefile |
| 79 | git checkout -- Makefile library/Makefile programs/Makefile tests/Makefile |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 80 | |
| 81 | if [ -f "$CONFIG_BAK" ]; then |
| 82 | mv "$CONFIG_BAK" "$CONFIG_H" |
| 83 | fi |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 84 | } |
| 85 | |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 86 | # Executed on exit. May be redefined depending on command line options. |
| 87 | final_report () { |
| 88 | : |
| 89 | } |
| 90 | |
| 91 | fatal_signal () { |
| 92 | cleanup |
| 93 | final_report $1 |
| 94 | trap - $1 |
| 95 | kill -$1 $$ |
| 96 | } |
| 97 | |
| 98 | trap 'fatal_signal HUP' HUP |
| 99 | trap 'fatal_signal INT' INT |
| 100 | trap 'fatal_signal TERM' TERM |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 101 | |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 102 | msg() |
| 103 | { |
| 104 | echo "" |
| 105 | echo "******************************************************************" |
Manuel Pégourié-Gonnard | 9bda9b3 | 2014-11-20 13:10:22 +0100 | [diff] [blame] | 106 | echo "* $1 " |
Manuel Pégourié-Gonnard | 392d3dd | 2015-01-26 14:03:56 +0000 | [diff] [blame] | 107 | printf "* "; date |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 108 | echo "******************************************************************" |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 109 | current_section=$1 |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 110 | } |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 111 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 112 | err_msg() |
| 113 | { |
| 114 | echo "$1" >&2 |
| 115 | } |
| 116 | |
| 117 | check_tools() |
| 118 | { |
| 119 | for TOOL in "$@"; do |
| 120 | if ! `hash "$TOOL" >/dev/null 2>&1`; then |
| 121 | err_msg "$TOOL not found!" |
| 122 | exit 1 |
| 123 | fi |
| 124 | done |
| 125 | } |
| 126 | |
| 127 | while [ $# -gt 0 ]; do |
| 128 | case "$1" in |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 129 | --force|-f) |
| 130 | FORCE=1 |
| 131 | ;; |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 132 | --gnutls-cli) |
| 133 | shift |
| 134 | GNUTLS_CLI="$1" |
| 135 | ;; |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 136 | --gnutls-legacy-cli) |
| 137 | shift |
| 138 | GNUTLS_LEGACY_CLI="$1" |
| 139 | ;; |
| 140 | --gnutls-legacy-serv) |
| 141 | shift |
| 142 | GNUTLS_LEGACY_SERV="$1" |
| 143 | ;; |
Gilles Peskine | 4d4872a | 2017-12-10 23:43:39 +0100 | [diff] [blame] | 144 | --gnutls-serv) |
| 145 | shift |
| 146 | GNUTLS_SERV="$1" |
| 147 | ;; |
| 148 | --help|-h) |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 149 | usage |
Gilles Peskine | 4d4872a | 2017-12-10 23:43:39 +0100 | [diff] [blame] | 150 | exit |
| 151 | ;; |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 152 | --keep-going|-k) |
| 153 | KEEP_GOING=1 |
| 154 | ;; |
Gilles Peskine | 4d4872a | 2017-12-10 23:43:39 +0100 | [diff] [blame] | 155 | --memory|-m) |
| 156 | MEMORY=1 |
| 157 | ;; |
| 158 | --openssl) |
| 159 | shift |
| 160 | OPENSSL="$1" |
| 161 | ;; |
| 162 | --openssl-legacy) |
| 163 | shift |
| 164 | OPENSSL_LEGACY="$1" |
| 165 | ;; |
| 166 | --out-of-source-dir) |
| 167 | shift |
| 168 | OUT_OF_SOURCE_DIR="$1" |
| 169 | ;; |
| 170 | --release-test|-r) |
| 171 | RELEASE=1 |
| 172 | ;; |
| 173 | --seed|-s) |
| 174 | shift |
| 175 | SEED="$1" |
| 176 | ;; |
| 177 | *) |
| 178 | echo >&2 "Unknown option: $1" |
| 179 | echo >&2 "Run $0 --help for usage." |
| 180 | exit 120 |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 181 | ;; |
| 182 | esac |
| 183 | shift |
| 184 | done |
| 185 | |
| 186 | if [ $FORCE -eq 1 ]; then |
| 187 | git checkout-index -f -q $CONFIG_H |
| 188 | cleanup |
| 189 | else |
| 190 | |
| 191 | if [ -d "$OUT_OF_SOURCE_DIR" ]; then |
| 192 | echo "Warning - there is an existing directory at '$OUT_OF_SOURCE_DIR'" >&2 |
| 193 | echo "You can either delete this directory manually, or force the test by rerunning" |
| 194 | echo "the script as: $0 --force --out-of-source-dir $OUT_OF_SOURCE_DIR" |
| 195 | exit 1 |
| 196 | fi |
| 197 | |
| 198 | if ! git diff-files --quiet include/polarssl/config.h; then |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 199 | err_msg "Warning - the configuration file 'include/polarssl/config.h' has been edited. " |
| 200 | echo "You can either delete or preserve your work, or force the test by rerunning the" |
| 201 | echo "script as: $0 --force" |
| 202 | exit 1 |
| 203 | fi |
| 204 | fi |
| 205 | |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 206 | build_status=0 |
| 207 | if [ $KEEP_GOING -eq 1 ]; then |
| 208 | failure_summary= |
| 209 | failure_count=0 |
| 210 | start_red= |
| 211 | end_color= |
| 212 | if [ -t 1 ]; then |
| 213 | case "$TERM" in |
| 214 | *color*|cygwin|linux|rxvt*|screen|[Eex]term*) |
| 215 | start_red=$(printf '\033[31m') |
| 216 | end_color=$(printf '\033[0m') |
| 217 | ;; |
| 218 | esac |
| 219 | fi |
| 220 | record_status () { |
| 221 | if "$@"; then |
| 222 | last_status=0 |
| 223 | else |
| 224 | last_status=$? |
| 225 | text="$current_section: $* -> $last_status" |
| 226 | failure_summary="$failure_summary |
| 227 | $text" |
| 228 | failure_count=$((failure_count + 1)) |
| 229 | echo "${start_red}^^^^$text^^^^${end_color}" |
| 230 | fi |
| 231 | } |
| 232 | make () { |
| 233 | case "$*" in |
| 234 | *test|*check) |
| 235 | if [ $build_status -eq 0 ]; then |
| 236 | record_status command make "$@" |
| 237 | else |
| 238 | echo "(skipped because the build failed)" |
| 239 | fi |
| 240 | ;; |
| 241 | *) |
| 242 | record_status command make "$@" |
| 243 | build_status=$last_status |
| 244 | ;; |
| 245 | esac |
| 246 | } |
| 247 | final_report () { |
| 248 | if [ $failure_count -gt 0 ]; then |
| 249 | echo |
| 250 | echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
| 251 | echo "${start_red}FAILED: $failure_count${end_color}$failure_summary" |
| 252 | echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
| 253 | elif [ -z "${1-}" ]; then |
| 254 | echo "SUCCESS :)" |
| 255 | fi |
| 256 | if [ -n "${1-}" ]; then |
| 257 | echo "Killed by SIG$1." |
| 258 | fi |
| 259 | } |
| 260 | else |
| 261 | record_status () { |
| 262 | "$@" |
| 263 | } |
| 264 | fi |
| 265 | if_build_succeeded () { |
| 266 | if [ $build_status -eq 0 ]; then |
| 267 | record_status "$@" |
| 268 | fi |
| 269 | } |
| 270 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 271 | if [ $RELEASE -eq 1 ]; then |
| 272 | # Fix the seed value to 1 to ensure that the tests are deterministic. |
| 273 | SEED=1 |
| 274 | fi |
| 275 | |
| 276 | msg "info: $0 configuration" |
| 277 | echo "MEMORY: $MEMORY" |
| 278 | echo "FORCE: $FORCE" |
| 279 | echo "SEED: ${SEED-"UNSET"}" |
| 280 | echo "OPENSSL: $OPENSSL" |
| 281 | echo "OPENSSL_LEGACY: $OPENSSL_LEGACY" |
| 282 | echo "GNUTLS_CLI: $GNUTLS_CLI" |
| 283 | echo "GNUTLS_SERV: $GNUTLS_SERV" |
| 284 | echo "GNUTLS_LEGACY_CLI: $GNUTLS_LEGACY_CLI" |
| 285 | echo "GNUTLS_LEGACY_SERV: $GNUTLS_LEGACY_SERV" |
| 286 | |
| 287 | # To avoid setting OpenSSL and GnuTLS for each call to compat.sh and ssl-opt.sh |
| 288 | # we just export the variables they require |
| 289 | export OPENSSL_CMD="$OPENSSL" |
| 290 | export GNUTLS_CLI="$GNUTLS_CLI" |
| 291 | export GNUTLS_SERV="$GNUTLS_SERV" |
| 292 | |
| 293 | # Avoid passing --seed flag in every call to ssl-opt.sh |
| 294 | [ ! -z ${SEED+set} ] && export SEED |
| 295 | |
| 296 | # Make sure the tools we need are available. |
| 297 | check_tools "$OPENSSL" "$OPENSSL_LEGACY" "$GNUTLS_CLI" "$GNUTLS_SERV" \ |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 298 | "$GNUTLS_LEGACY_CLI" "$GNUTLS_LEGACY_SERV" "doxygen" "dot" \ |
| 299 | "arm-none-eabi-gcc" "armcc" |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 300 | |
| 301 | # |
| 302 | # Test Suites to be executed |
| 303 | # |
Manuel Pégourié-Gonnard | 57255b1 | 2014-06-09 11:21:49 +0200 | [diff] [blame] | 304 | # The test ordering tries to optimize for the following criteria: |
Manuel Pégourié-Gonnard | 89d69b3 | 2014-11-20 13:48:53 +0100 | [diff] [blame] | 305 | # 1. Catch possible problems early, by running first tests that run quickly |
Manuel Pégourié-Gonnard | 61bc57a | 2014-08-14 11:29:06 +0200 | [diff] [blame] | 306 | # and/or are more likely to fail than others (eg I use Clang most of the |
| 307 | # time, so start with a GCC build). |
Manuel Pégourié-Gonnard | 57255b1 | 2014-06-09 11:21:49 +0200 | [diff] [blame] | 308 | # 2. Minimize total running time, by avoiding useless rebuilds |
| 309 | # |
| 310 | # Indicative running times are given for reference. |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 311 | |
Manuel Pégourié-Gonnard | ea29d15 | 2014-11-20 17:32:33 +0100 | [diff] [blame] | 312 | msg "test: recursion.pl" # < 1s |
| 313 | scripts/recursion.pl library/*.c |
| 314 | |
Manuel Pégourié-Gonnard | b3b8e43 | 2015-02-13 14:52:19 +0000 | [diff] [blame] | 315 | msg "test: freshness of generated source files" # < 1s |
| 316 | tests/scripts/check-generated-files.sh |
| 317 | |
Manuel Pégourié-Gonnard | 89d69b3 | 2014-11-20 13:48:53 +0100 | [diff] [blame] | 318 | msg "build: cmake, gcc, ASan" # ~ 1 min 50s |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 319 | cleanup |
Manuel Pégourié-Gonnard | 9bda9b3 | 2014-11-20 13:10:22 +0100 | [diff] [blame] | 320 | CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 321 | make |
| 322 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 323 | msg "test: main suites (inc. selftests) (ASan build)" # ~ 50s |
Manuel Pégourié-Gonnard | 9bda9b3 | 2014-11-20 13:10:22 +0100 | [diff] [blame] | 324 | make test |
| 325 | programs/test/selftest |
Manuel Pégourié-Gonnard | 57255b1 | 2014-06-09 11:21:49 +0200 | [diff] [blame] | 326 | |
Manuel Pégourié-Gonnard | 89d69b3 | 2014-11-20 13:48:53 +0100 | [diff] [blame] | 327 | msg "test: ssl-opt.sh (ASan build)" # ~ 1 min |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 328 | if_build_succeeded tests/ssl-opt.sh |
Manuel Pégourié-Gonnard | 57255b1 | 2014-06-09 11:21:49 +0200 | [diff] [blame] | 329 | |
Manuel Pégourié-Gonnard | 89d69b3 | 2014-11-20 13:48:53 +0100 | [diff] [blame] | 330 | msg "test/build: ref-configs (ASan build)" # ~ 6 min 20s |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 331 | if_build_succeeded tests/scripts/test-ref-configs.pl |
Manuel Pégourié-Gonnard | 57255b1 | 2014-06-09 11:21:49 +0200 | [diff] [blame] | 332 | |
Manuel Pégourié-Gonnard | 57255b1 | 2014-06-09 11:21:49 +0200 | [diff] [blame] | 333 | msg "build: with ASan (rebuild after ref-configs)" # ~ 1 min |
| 334 | make |
| 335 | |
Manuel Pégourié-Gonnard | 89d69b3 | 2014-11-20 13:48:53 +0100 | [diff] [blame] | 336 | msg "test: compat.sh (ASan build)" # ~ 6 min |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 337 | if_build_succeeded tests/compat.sh |
Manuel Pégourié-Gonnard | 57255b1 | 2014-06-09 11:21:49 +0200 | [diff] [blame] | 338 | |
Janos Follath | 4dfecab | 2016-03-14 13:40:43 +0000 | [diff] [blame] | 339 | msg "build: Default + SSLv3 (ASan build)" # ~ 6 min |
| 340 | cleanup |
| 341 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 342 | scripts/config.pl set POLARSSL_SSL_PROTO_SSL3 |
| 343 | CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 344 | make |
| 345 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 346 | msg "test: SSLv3 - main suites (inc. selftests) (ASan build)" # ~ 50s |
Janos Follath | 4dfecab | 2016-03-14 13:40:43 +0000 | [diff] [blame] | 347 | make test |
| 348 | programs/test/selftest |
| 349 | |
| 350 | msg "build: SSLv3 - compat.sh (ASan build)" # ~ 6 min |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 351 | if_build_succeeded tests/compat.sh -m 'tls1 tls1_1 tls1_2' |
| 352 | if_build_succeeded env OPENSSL_CMD="$OPENSSL_LEGACY" tests/compat.sh -m 'ssl3' |
Janos Follath | 4dfecab | 2016-03-14 13:40:43 +0000 | [diff] [blame] | 353 | |
| 354 | msg "build: SSLv3 - ssl-opt.sh (ASan build)" # ~ 6 min |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 355 | if_build_succeeded tests/ssl-opt.sh |
Janos Follath | 4dfecab | 2016-03-14 13:40:43 +0000 | [diff] [blame] | 356 | |
Hanno Becker | be812f6 | 2017-10-25 09:49:13 +0100 | [diff] [blame] | 357 | msg "build: Default + POLARSSL_SSL_DISABLE_RENEGOTIATION (ASan build)" # ~ 6 min |
| 358 | cleanup |
| 359 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 360 | scripts/config.pl set POLARSSL_SSL_DISABLE_RENEGOTIATION |
| 361 | CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 362 | make |
| 363 | |
| 364 | msg "test: POLARSSL_SSL_DISABLE_RENEGOTIATION - main suites (inc. selftests) (ASan build)" # ~ 50s |
| 365 | make test |
| 366 | |
| 367 | msg "test: POLARSSL_SSL_DISABLE_RENEGOTIATION - ssl-opt.sh (ASan build)" # ~ 6 min |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 368 | if_build_succeeded tests/ssl-opt.sh |
Hanno Becker | be812f6 | 2017-10-25 09:49:13 +0100 | [diff] [blame] | 369 | |
Manuel Pégourié-Gonnard | 89d69b3 | 2014-11-20 13:48:53 +0100 | [diff] [blame] | 370 | msg "build: cmake, full config, clang" # ~ 50s |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 371 | cleanup |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 372 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 373 | scripts/config.pl full |
| 374 | scripts/config.pl unset POLARSSL_MEMORY_BACKTRACE # too slow for tests |
Manuel Pégourié-Gonnard | 4d9e36a | 2015-09-02 10:10:32 +0200 | [diff] [blame] | 375 | scripts/config.pl unset POLARSSL_ERROR_STRERROR_BC # deprecated |
| 376 | scripts/config.pl unset POLARSSL_PBKDF2_C # deprecated |
Manuel Pégourié-Gonnard | 9bda9b3 | 2014-11-20 13:10:22 +0100 | [diff] [blame] | 377 | CC=clang cmake -D CMAKE_BUILD_TYPE:String=Check . |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 378 | make |
| 379 | |
Manuel Pégourié-Gonnard | 89d69b3 | 2014-11-20 13:48:53 +0100 | [diff] [blame] | 380 | msg "test: main suites (full config)" # ~ 5s |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 381 | make test |
| 382 | |
Manuel Pégourié-Gonnard | 89d69b3 | 2014-11-20 13:48:53 +0100 | [diff] [blame] | 383 | msg "test: ssl-opt.sh default (full config)" # ~ 1s |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 384 | if_build_succeeded tests/ssl-opt.sh -f Default |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 385 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 386 | msg "test: compat.sh RC4, DES & NULL (full config)" # ~ 2 min |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 387 | if_build_succeeded env OPENSSL_CMD="$OPENSSL_LEGACY" GNUTLS_CLI="$GNUTLS_LEGACY_CLI" GNUTLS_SERV="$GNUTLS_LEGACY_SERV" tests/compat.sh -e '^$' -f 'NULL\|3DES-EDE-CBC\|DES-CBC3' |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 388 | |
| 389 | msg "test/build: curves.pl (gcc)" # ~ 4 min |
Manuel Pégourié-Gonnard | 246978d | 2014-11-20 13:29:53 +0100 | [diff] [blame] | 390 | cleanup |
| 391 | cmake -D CMAKE_BUILD_TYPE:String=Debug . |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 392 | if_build_succeeded tests/scripts/curves.pl |
Manuel Pégourié-Gonnard | 246978d | 2014-11-20 13:29:53 +0100 | [diff] [blame] | 393 | |
Manuel Pégourié-Gonnard | 61fe8b0 | 2015-03-13 14:33:16 +0000 | [diff] [blame] | 394 | msg "build: Unix make, -Os (gcc)" # ~ 30s |
Manuel Pégourié-Gonnard | 3895f5a | 2014-03-27 14:44:04 +0100 | [diff] [blame] | 395 | cleanup |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 396 | make CC=gcc CFLAGS='-Werror -Os' |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 397 | |
Manuel Pégourié-Gonnard | a71780e | 2015-02-13 13:56:55 +0000 | [diff] [blame] | 398 | # this is meant to cath missing #define polarssl_printf etc |
Manuel Pégourié-Gonnard | 981732b | 2015-02-17 15:46:45 +0000 | [diff] [blame] | 399 | # disable fsio to catch some more missing #include <stdio.h> |
Manuel Pégourié-Gonnard | 757ca00 | 2015-03-23 15:24:07 +0100 | [diff] [blame] | 400 | msg "build: full config except platform/fsio, make, gcc" # ~ 30s |
Manuel Pégourié-Gonnard | a71780e | 2015-02-13 13:56:55 +0000 | [diff] [blame] | 401 | cleanup |
| 402 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 403 | scripts/config.pl full |
| 404 | scripts/config.pl unset POLARSSL_PLATFORM_C |
Manuel Pégourié-Gonnard | 6ca4076 | 2015-02-13 15:57:35 +0000 | [diff] [blame] | 405 | scripts/config.pl unset POLARSSL_PLATFORM_MEMORY |
Manuel Pégourié-Gonnard | 721e6bb | 2015-06-03 13:38:20 +0100 | [diff] [blame] | 406 | scripts/config.pl unset POLARSSL_PLATFORM_PRINTF_ALT |
| 407 | scripts/config.pl unset POLARSSL_PLATFORM_FPRINTF_ALT |
| 408 | scripts/config.pl unset POLARSSL_PLATFORM_SNPRINTF_ALT |
| 409 | scripts/config.pl unset POLARSSL_PLATFORM_EXIT_ALT |
Manuel Pégourié-Gonnard | a71780e | 2015-02-13 13:56:55 +0000 | [diff] [blame] | 410 | scripts/config.pl unset POLARSSL_MEMORY_C |
| 411 | scripts/config.pl unset POLARSSL_MEMORY_BUFFER_ALLOC_C |
Manuel Pégourié-Gonnard | 981732b | 2015-02-17 15:46:45 +0000 | [diff] [blame] | 412 | scripts/config.pl unset POLARSSL_FS_IO |
Manuel Pégourié-Gonnard | b0282ea | 2015-09-02 12:12:44 +0200 | [diff] [blame] | 413 | scripts/config.pl unset POLARSSL_ERROR_STRERROR_BC # deprecated |
| 414 | scripts/config.pl unset POLARSSL_PBKDF2_C # deprecated |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 415 | make CC=gcc CFLAGS='-Werror -O0' |
Manuel Pégourié-Gonnard | a71780e | 2015-02-13 13:56:55 +0000 | [diff] [blame] | 416 | |
Manuel Pégourié-Gonnard | dccb80b | 2015-06-03 10:20:33 +0100 | [diff] [blame] | 417 | # catch compile bugs in _uninit functions |
| 418 | msg "build: full config with NO_STD_FUNCTION, make, gcc" # ~ 30s |
| 419 | cleanup |
| 420 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 421 | scripts/config.pl full |
| 422 | scripts/config.pl set POLARSSL_PLATFORM_NO_STD_FUNCTIONS |
Manuel Pégourié-Gonnard | b0282ea | 2015-09-02 12:12:44 +0200 | [diff] [blame] | 423 | scripts/config.pl unset POLARSSL_ERROR_STRERROR_BC # deprecated |
| 424 | scripts/config.pl unset POLARSSL_PBKDF2_C # deprecated |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 425 | make CC=gcc CFLAGS='-Werror -O0' |
Manuel Pégourié-Gonnard | dccb80b | 2015-06-03 10:20:33 +0100 | [diff] [blame] | 426 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 427 | msg "build: full config except ssl_srv.c, make, gcc" # ~ 30s |
| 428 | cleanup |
| 429 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 430 | scripts/config.pl full |
| 431 | scripts/config.pl unset POLARSSL_ERROR_STRERROR_BC # deprecated |
| 432 | scripts/config.pl unset POLARSSL_PBKDF2_C # deprecated |
| 433 | scripts/config.pl unset POLARSSL_SSL_SRV_C |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 434 | make CC=gcc CFLAGS='-Werror -O0' |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 435 | |
| 436 | msg "build: full config except ssl_cli.c, make, gcc" # ~ 30s |
| 437 | cleanup |
| 438 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 439 | scripts/config.pl full |
| 440 | scripts/config.pl unset POLARSSL_SSL_CLI_C |
| 441 | scripts/config.pl unset POLARSSL_ERROR_STRERROR_BC # deprecated |
| 442 | scripts/config.pl unset POLARSSL_PBKDF2_C # deprecated |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 443 | make CC=gcc CFLAGS='-Werror -O0' |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 444 | |
Manuel Pégourié-Gonnard | 1b1254f | 2015-08-10 11:56:06 +0200 | [diff] [blame] | 445 | if uname -a | grep -F Linux >/dev/null; then |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 446 | msg "build/test: make shared" # ~ 40s |
| 447 | cleanup |
| 448 | make SHARED=1 all check |
Manuel Pégourié-Gonnard | 1b1254f | 2015-08-10 11:56:06 +0200 | [diff] [blame] | 449 | fi |
| 450 | |
Manuel Pégourié-Gonnard | edb2dc9 | 2015-02-10 14:36:31 +0000 | [diff] [blame] | 451 | if uname -a | grep -F x86_64 >/dev/null; then |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 452 | msg "build: i386, make, gcc" # ~ 30s |
| 453 | cleanup |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 454 | make CC=gcc CFLAGS='-Werror -m32' |
Manuel Pégourié-Gonnard | edb2dc9 | 2015-02-10 14:36:31 +0000 | [diff] [blame] | 455 | fi # x86_64 |
| 456 | |
Manuel Pégourié-Gonnard | edb2dc9 | 2015-02-10 14:36:31 +0000 | [diff] [blame] | 457 | msg "build: arm-none-eabi-gcc, make" # ~ 10s |
| 458 | cleanup |
| 459 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 460 | scripts/config.pl full |
| 461 | scripts/config.pl unset POLARSSL_NET_C |
| 462 | scripts/config.pl unset POLARSSL_TIMING_C |
| 463 | scripts/config.pl unset POLARSSL_FS_IO |
Manuel Pégourié-Gonnard | b0282ea | 2015-09-02 12:12:44 +0200 | [diff] [blame] | 464 | scripts/config.pl unset POLARSSL_ERROR_STRERROR_BC # deprecated |
| 465 | scripts/config.pl unset POLARSSL_PBKDF2_C # deprecated |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 466 | scripts/config.pl set POLARSSL_NO_PLATFORM_ENTROPY |
Manuel Pégourié-Gonnard | edb2dc9 | 2015-02-10 14:36:31 +0000 | [diff] [blame] | 467 | # following things are not in the default config |
| 468 | scripts/config.pl unset POLARSSL_HAVEGE_C # depends on timing.c |
| 469 | scripts/config.pl unset POLARSSL_THREADING_PTHREAD |
| 470 | scripts/config.pl unset POLARSSL_THREADING_C |
| 471 | scripts/config.pl unset POLARSSL_MEMORY_BACKTRACE # execinfo.h |
| 472 | scripts/config.pl unset POLARSSL_MEMORY_BUFFER_ALLOC_C # calls exit |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 473 | make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS=-Werror lib |
Manuel Pégourié-Gonnard | edb2dc9 | 2015-02-10 14:36:31 +0000 | [diff] [blame] | 474 | |
Manuel Pégourié-Gonnard | c5c5939 | 2015-02-10 17:38:54 +0100 | [diff] [blame] | 475 | msg "build: armcc, make" |
| 476 | cleanup |
| 477 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 478 | scripts/config.pl full |
| 479 | scripts/config.pl unset POLARSSL_NET_C |
| 480 | scripts/config.pl unset POLARSSL_TIMING_C |
| 481 | scripts/config.pl unset POLARSSL_FS_IO |
| 482 | scripts/config.pl unset POLARSSL_HAVE_TIME |
Manuel Pégourié-Gonnard | b0282ea | 2015-09-02 12:12:44 +0200 | [diff] [blame] | 483 | scripts/config.pl unset POLARSSL_ERROR_STRERROR_BC # deprecated |
| 484 | scripts/config.pl unset POLARSSL_PBKDF2_C # deprecated |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 485 | scripts/config.pl set POLARSSL_NO_PLATFORM_ENTROPY |
Manuel Pégourié-Gonnard | c5c5939 | 2015-02-10 17:38:54 +0100 | [diff] [blame] | 486 | # following things are not in the default config |
Manuel Pégourié-Gonnard | f1002f8 | 2015-03-25 16:44:26 +0100 | [diff] [blame] | 487 | scripts/config.pl unset POLARSSL_DEPRECATED_WARNING |
Manuel Pégourié-Gonnard | c5c5939 | 2015-02-10 17:38:54 +0100 | [diff] [blame] | 488 | scripts/config.pl unset POLARSSL_HAVEGE_C # depends on timing.c |
| 489 | scripts/config.pl unset POLARSSL_THREADING_PTHREAD |
| 490 | scripts/config.pl unset POLARSSL_THREADING_C |
| 491 | scripts/config.pl unset POLARSSL_MEMORY_BACKTRACE # execinfo.h |
| 492 | scripts/config.pl unset POLARSSL_MEMORY_BUFFER_ALLOC_C # calls exit |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 493 | make CC=armcc AR=armar WARNING_CFLAGS= lib |
Manuel Pégourié-Gonnard | c5c5939 | 2015-02-10 17:38:54 +0100 | [diff] [blame] | 494 | |
Manuel Pégourié-Gonnard | 6448bce | 2015-02-16 17:18:36 +0100 | [diff] [blame] | 495 | if which i686-w64-mingw32-gcc >/dev/null; then |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 496 | msg "build: cross-mingw64, make" # ~ 30s |
| 497 | cleanup |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 498 | make CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS=-Werror WINDOWS_BUILD=1 |
| 499 | make WINDOWS_BUILD=1 clean |
| 500 | make CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS=-Werror WINDOWS_BUILD=1 SHARED=1 |
| 501 | make WINDOWS_BUILD=1 clean |
Manuel Pégourié-Gonnard | 6448bce | 2015-02-16 17:18:36 +0100 | [diff] [blame] | 502 | fi |
| 503 | |
Manuel Pégourié-Gonnard | edb2dc9 | 2015-02-10 14:36:31 +0000 | [diff] [blame] | 504 | # MemSan currently only available on Linux 64 bits |
| 505 | if uname -a | grep 'Linux.*x86_64' >/dev/null; then |
Manuel Pégourié-Gonnard | 392d3dd | 2015-01-26 14:03:56 +0000 | [diff] [blame] | 506 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 507 | msg "build: MSan (clang)" # ~ 1 min 20s |
| 508 | cleanup |
| 509 | cp "$CONFIG_H" "$CONFIG_BAK" |
| 510 | scripts/config.pl unset POLARSSL_AESNI_C # memsan doesn't grok asm |
| 511 | scripts/config.pl set POLARSSL_NO_PLATFORM_ENTROPY # memsan vs getrandom() |
| 512 | CC=clang cmake -D CMAKE_BUILD_TYPE:String=MemSan . |
| 513 | make |
Manuel Pégourié-Gonnard | 4a9dc2a | 2014-05-09 13:46:59 +0200 | [diff] [blame] | 514 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 515 | msg "test: main suites (MSan)" # ~ 10s |
| 516 | make test |
Manuel Pégourié-Gonnard | 9bda9b3 | 2014-11-20 13:10:22 +0100 | [diff] [blame] | 517 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 518 | msg "test: ssl-opt.sh (MSan)" # ~ 1 min |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 519 | if_build_succeeded tests/ssl-opt.sh |
Manuel Pégourié-Gonnard | 9bda9b3 | 2014-11-20 13:10:22 +0100 | [diff] [blame] | 520 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 521 | # Optional part(s) |
Manuel Pégourié-Gonnard | 9bda9b3 | 2014-11-20 13:10:22 +0100 | [diff] [blame] | 522 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 523 | if [ "$MEMORY" -gt 0 ]; then |
| 524 | msg "test: compat.sh (MSan)" # ~ 6 min 20s |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 525 | if_build_succeeded tests/compat.sh |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 526 | fi |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 527 | |
Manuel Pégourié-Gonnard | 392d3dd | 2015-01-26 14:03:56 +0000 | [diff] [blame] | 528 | else # no MemSan |
| 529 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 530 | msg "build: Release (clang)" |
| 531 | cleanup |
| 532 | CC=clang cmake -D CMAKE_BUILD_TYPE:String=Release . |
| 533 | make |
Manuel Pégourié-Gonnard | 392d3dd | 2015-01-26 14:03:56 +0000 | [diff] [blame] | 534 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 535 | msg "test: main suites valgrind (Release)" |
| 536 | make test |
Manuel Pégourié-Gonnard | 392d3dd | 2015-01-26 14:03:56 +0000 | [diff] [blame] | 537 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 538 | # Optional part(s) |
| 539 | # Currently broken, programs don't seem to receive signals |
| 540 | # under valgrind on OS X |
Manuel Pégourié-Gonnard | 392d3dd | 2015-01-26 14:03:56 +0000 | [diff] [blame] | 541 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 542 | if [ "$MEMORY" -gt 0 ]; then |
| 543 | msg "test: ssl-opt.sh --memcheck (Release)" |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 544 | if_build_succeeded tests/ssl-opt.sh --memcheck |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 545 | fi |
Manuel Pégourié-Gonnard | 392d3dd | 2015-01-26 14:03:56 +0000 | [diff] [blame] | 546 | |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 547 | if [ "$MEMORY" -gt 1 ]; then |
| 548 | msg "test: compat.sh --memcheck (Release)" |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 549 | if_build_succeeded tests/compat.sh --memcheck |
Gilles Peskine | fb18b6c | 2017-12-20 14:00:06 +0100 | [diff] [blame] | 550 | fi |
Manuel Pégourié-Gonnard | 392d3dd | 2015-01-26 14:03:56 +0000 | [diff] [blame] | 551 | |
| 552 | fi # MemSan |
| 553 | |
Simon Butcher | 123fb02 | 2016-10-15 22:18:05 +0100 | [diff] [blame] | 554 | msg "build: cmake 'out-of-source' build" |
| 555 | cleanup |
| 556 | MBEDTLS_ROOT_DIR="$PWD" |
| 557 | mkdir "$OUT_OF_SOURCE_DIR" |
| 558 | cd "$OUT_OF_SOURCE_DIR" |
| 559 | cmake "$MBEDTLS_ROOT_DIR" |
| 560 | make |
| 561 | |
| 562 | msg "test: cmake 'out-of-source' build" |
| 563 | make test |
| 564 | cd "$MBEDTLS_ROOT_DIR" |
| 565 | rm -rf "$OUT_OF_SOURCE_DIR" |
| 566 | |
Manuel Pégourié-Gonnard | 9bda9b3 | 2014-11-20 13:10:22 +0100 | [diff] [blame] | 567 | msg "Done, cleaning up" |
Manuel Pégourié-Gonnard | 80955ee | 2014-03-19 18:29:01 +0100 | [diff] [blame] | 568 | cleanup |
| 569 | |
Gilles Peskine | ded50da | 2017-12-11 00:01:40 +0100 | [diff] [blame^] | 570 | final_report |