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