blob: b84d5289b3594095c69c7e0cc7affdf0794ab064 [file] [log] [blame]
Andres AG31f9b5b2016-10-04 17:14:38 +01001#! /usr/bin/env sh
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +01002
Simon Butcher3ea7f522016-03-07 23:22:10 +00003# all.sh
4#
SimonB2e23c822016-04-16 21:54:39 +01005# This file is part of mbed TLS (https://tls.mbed.org)
6#
Simon Butcher3ea7f522016-03-07 23:22:10 +00007# Copyright (c) 2014-2016, ARM Limited, All Rights Reserved
8#
9# Purpose
10#
SimonB2e23c822016-04-16 21:54:39 +010011# To run all tests possible or available on the platform.
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +010012#
SimonB2e23c822016-04-16 21:54:39 +010013# 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.
Manuel Pégourié-Gonnard3895f5a2014-03-27 14:44:04 +010017#
SimonB2e23c822016-04-16 21:54:39 +010018# 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é-Gonnard80955ee2014-03-19 18:29:01 +010021
SimonB2e23c822016-04-16 21:54:39 +010022# Abort on errors (and uninitialised variables)
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +010023set -eu
24
Andres AG38495a32016-07-12 16:54:33 +010025if [ "$( uname )" != "Linux" ]; then
26 echo "This script only works in Linux" >&2
27 exit 1
28elif [ -d library -a -d include -a -d tests ]; then :; else
29 echo "Must be run from mbed TLS root" >&2
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +010030 exit 1
31fi
32
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000033CONFIG_H='include/mbedtls/config.h'
Manuel Pégourié-Gonnarde73b2632014-07-12 04:00:00 +020034CONFIG_BAK="$CONFIG_H.bak"
35
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +010036MEMORY=0
SimonB2e23c822016-04-16 21:54:39 +010037FORCE=0
Andres AG7770ea82016-10-10 15:46:20 +010038RELEASE=0
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +010039
Andres AGd9eba4b2016-08-26 14:42:14 +010040# Default commands, can be overriden by the environment
41: ${OPENSSL:="openssl"}
42: ${OPENSSL_LEGACY:="$OPENSSL"}
43: ${GNUTLS_CLI:="gnutls-cli"}
44: ${GNUTLS_SERV:="gnutls-serv"}
45: ${GNUTLS_LEGACY_CLI:="$GNUTLS_CLI"}
46: ${GNUTLS_LEGACY_SERV:="$GNUTLS_SERV"}
Andres AGdc192212016-08-31 17:33:13 +010047: ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build}
Andres AG87bb5772016-09-27 15:05:15 +010048: ${ARMC5_BIN_DIR:=/usr/bin}
49: ${ARMC6_BIN_DIR:=/usr/bin}
Andres AGdc192212016-08-31 17:33:13 +010050
Andres AG38495a32016-07-12 16:54:33 +010051# if MAKEFLAGS is not set add the -j option to speed up invocations of make
52if [ -n "${MAKEFLAGS+set}" ]; then
53 export MAKEFLAGS="-j"
54fi
55
Simon Butcher41eeccf2016-09-07 00:07:09 +010056usage()
SimonB2e23c822016-04-16 21:54:39 +010057{
Andres AGd9eba4b2016-08-26 14:42:14 +010058 printf "Usage: $0\n"
59 printf " -h|--help\t\tPrint this help.\n"
60 printf " -m|--memory\t\tAdditional optional memory tests.\n"
61 printf " -f|--force\t\tForce the tests to overwrite any modified files.\n"
Andres AG7770ea82016-10-10 15:46:20 +010062 printf " -s|--seed\t\tInteger seed value to use for this test run.\n"
63 printf " -r|--release-test\t\tRun this script in release mode. This fixes the seed value to 1.\n"
Simon Butcher41eeccf2016-09-07 00:07:09 +010064 printf " --out-of-source-dir=<path>\t\tDirectory used for CMake out-of-source build tests."
Andres AGd9eba4b2016-08-26 14:42:14 +010065 printf " --openssl=<OpenSSL_path>\t\tPath to OpenSSL executable to use for most tests.\n"
66 printf " --openssl-legacy=<OpenSSL_path>\t\tPath to OpenSSL executable to use for legacy tests e.g. SSLv3.\n"
67 printf " --gnutls-cli=<GnuTLS_cli_path>\t\tPath to GnuTLS client executable to use for most tests.\n"
68 printf " --gnutls-serv=<GnuTLS_serv_path>\t\tPath to GnuTLS server executable to use for most tests.\n"
69 printf " --gnutls-legacy-cli=<GnuTLS_cli_path>\t\tPath to GnuTLS client executable to use for legacy tests.\n"
70 printf " --gnutls-legacy-serv=<GnuTLS_serv_path>\t\tPath to GnuTLS server executable to use for legacy tests.\n"
Andres AG87bb5772016-09-27 15:05:15 +010071 printf " --armc5-bin-dir=<ARMC5_bin_dir_path>\t\tPath to the ARM Compiler 5 bin directory.\n"
72 printf " --armc6-bin-dir=<ARMC6_bin_dir_path>\t\tPath to the ARM Compiler 6 bin directory.\n"
SimonB2e23c822016-04-16 21:54:39 +010073}
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +010074
75# remove built files as well as the cmake cache/config
76cleanup()
77{
78 make clean
Manuel Pégourié-Gonnarde73b2632014-07-12 04:00:00 +020079
Manuel Pégourié-Gonnard77d56bb2015-07-28 15:00:37 +020080 find . -name yotta -prune -o -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} \+
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000081 rm -f include/Makefile include/mbedtls/Makefile programs/*/Makefile
Paul Bakkerfe0984d2014-06-13 00:13:45 +020082 git update-index --no-skip-worktree Makefile library/Makefile programs/Makefile tests/Makefile
83 git checkout -- Makefile library/Makefile programs/Makefile tests/Makefile
Manuel Pégourié-Gonnarde73b2632014-07-12 04:00:00 +020084
85 if [ -f "$CONFIG_BAK" ]; then
86 mv "$CONFIG_BAK" "$CONFIG_H"
87 fi
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +010088}
89
Manuel Pégourié-Gonnarde73b2632014-07-12 04:00:00 +020090trap cleanup INT TERM HUP
91
Manuel Pégourié-Gonnard3895f5a2014-03-27 14:44:04 +010092msg()
93{
94 echo ""
95 echo "******************************************************************"
Manuel Pégourié-Gonnard9bda9b32014-11-20 13:10:22 +010096 echo "* $1 "
Manuel Pégourié-Gonnard392d3dd2015-01-26 14:03:56 +000097 printf "* "; date
Manuel Pégourié-Gonnard3895f5a2014-03-27 14:44:04 +010098 echo "******************************************************************"
99}
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +0100100
Andres AGa5cd9732016-10-17 15:23:10 +0100101armc6_build_test()
102{
103 FLAGS="$1"
104
105 msg "build: ARM Compiler 6 ($FLAGS), make"
106 ARM_TOOL_VARIANT="ult" CC="$ARMC6_CC" AR="$ARMC6_AR" CFLAGS="$FLAGS" \
Simon Butchercb587002017-01-06 16:14:44 +0000107 WARNING_CFLAGS='-xc -std=c99' make lib
Andres AGa5cd9732016-10-17 15:23:10 +0100108 make clean
109}
110
Andres AGd9eba4b2016-08-26 14:42:14 +0100111err_msg()
112{
113 echo "$1" >&2
114}
115
116check_tools()
117{
118 for TOOL in "$@"; do
119 if ! `hash "$TOOL" >/dev/null 2>&1`; then
120 err_msg "$TOOL not found!"
121 exit 1
122 fi
123 done
124}
125
SimonB2e23c822016-04-16 21:54:39 +0100126while [ $# -gt 0 ]; do
127 case "$1" in
128 --memory|-m*)
129 MEMORY=${1#-m}
130 ;;
SimonB2e23c822016-04-16 21:54:39 +0100131 --force|-f)
132 FORCE=1
133 ;;
Andres AG7770ea82016-10-10 15:46:20 +0100134 --seed|-s)
135 shift
136 SEED="$1"
137 ;;
138 --release-test|-r)
139 RELEASE=1
140 ;;
Andres AGdc192212016-08-31 17:33:13 +0100141 --out-of-source-dir)
142 shift
143 OUT_OF_SOURCE_DIR="$1"
144 ;;
Andres AGd9eba4b2016-08-26 14:42:14 +0100145 --openssl)
146 shift
147 OPENSSL="$1"
148 ;;
149 --openssl-legacy)
150 shift
151 OPENSSL_LEGACY="$1"
152 ;;
153 --gnutls-cli)
154 shift
155 GNUTLS_CLI="$1"
156 ;;
157 --gnutls-serv)
158 shift
159 GNUTLS_SERV="$1"
160 ;;
161 --gnutls-legacy-cli)
162 shift
163 GNUTLS_LEGACY_CLI="$1"
164 ;;
165 --gnutls-legacy-serv)
166 shift
167 GNUTLS_LEGACY_SERV="$1"
168 ;;
Andres AG87bb5772016-09-27 15:05:15 +0100169 --armc5-bin-dir)
170 shift
171 ARMC5_BIN_DIR="$1"
172 ;;
173 --armc6-bin-dir)
174 shift
175 ARMC6_BIN_DIR="$1"
176 ;;
SimonB2e23c822016-04-16 21:54:39 +0100177 --help|-h|*)
Andres AGd9eba4b2016-08-26 14:42:14 +0100178 usage
SimonB2e23c822016-04-16 21:54:39 +0100179 exit 1
180 ;;
181 esac
182 shift
183done
184
185if [ $FORCE -eq 1 ]; then
Andres AGdc192212016-08-31 17:33:13 +0100186 rm -rf yotta/module "$OUT_OF_SOURCE_DIR"
SimonB2e23c822016-04-16 21:54:39 +0100187 git checkout-index -f -q $CONFIG_H
188 cleanup
189else
190
191 if [ -d yotta/module ]; then
Andres AGd9eba4b2016-08-26 14:42:14 +0100192 err_msg "Warning - there is an existing yotta module in the directory 'yotta/module'"
SimonB2e23c822016-04-16 21:54:39 +0100193 echo "You can either delete your work and retry, or force the test to overwrite the"
194 echo "test by rerunning the script as: $0 --force"
195 exit 1
196 fi
197
Andres AGdc192212016-08-31 17:33:13 +0100198 if [ -d "$OUT_OF_SOURCE_DIR" ]; then
199 echo "Warning - there is an existing directory at '$OUT_OF_SOURCE_DIR'" >&2
200 echo "You can either delete this directory manually, or force the test by rerunning"
201 echo "the script as: $0 --force --out-of-source-dir $OUT_OF_SOURCE_DIR"
202 exit 1
203 fi
204
SimonB2e23c822016-04-16 21:54:39 +0100205 if ! git diff-files --quiet include/mbedtls/config.h; then
206 echo $?
Andres AGd9eba4b2016-08-26 14:42:14 +0100207 err_msg "Warning - the configuration file 'include/mbedtls/config.h' has been edited. "
SimonB2e23c822016-04-16 21:54:39 +0100208 echo "You can either delete or preserve your work, or force the test by rerunning the"
209 echo "script as: $0 --force"
210 exit 1
211 fi
212fi
213
Andres AG7770ea82016-10-10 15:46:20 +0100214if [ $RELEASE -eq 1 ]; then
215 # Fix the seed value to 1 to ensure that the tests are deterministic.
216 SEED=1
217fi
218
Andres AGd9eba4b2016-08-26 14:42:14 +0100219msg "info: $0 configuration"
220echo "MEMORY: $MEMORY"
221echo "FORCE: $FORCE"
Andres AG7770ea82016-10-10 15:46:20 +0100222echo "SEED: ${SEED-"UNSET"}"
Andres AGd9eba4b2016-08-26 14:42:14 +0100223echo "OPENSSL: $OPENSSL"
224echo "OPENSSL_LEGACY: $OPENSSL_LEGACY"
225echo "GNUTLS_CLI: $GNUTLS_CLI"
226echo "GNUTLS_SERV: $GNUTLS_SERV"
227echo "GNUTLS_LEGACY_CLI: $GNUTLS_LEGACY_CLI"
228echo "GNUTLS_LEGACY_SERV: $GNUTLS_LEGACY_SERV"
Andres AG87bb5772016-09-27 15:05:15 +0100229echo "ARMC5_BIN_DIR: $ARMC5_BIN_DIR"
230echo "ARMC6_BIN_DIR: $ARMC6_BIN_DIR"
231
232ARMC5_CC="$ARMC5_BIN_DIR/armcc"
233ARMC5_AR="$ARMC5_BIN_DIR/armar"
234ARMC6_CC="$ARMC6_BIN_DIR/armclang"
235ARMC6_AR="$ARMC6_BIN_DIR/armar"
Andres AGd9eba4b2016-08-26 14:42:14 +0100236
Andres AGb2fdd042016-09-22 14:17:46 +0100237# To avoid setting OpenSSL and GnuTLS for each call to compat.sh and ssl-opt.sh
238# we just export the variables they require
239export OPENSSL_CMD="$OPENSSL"
240export GNUTLS_CLI="$GNUTLS_CLI"
241export GNUTLS_SERV="$GNUTLS_SERV"
242
Andres AG7770ea82016-10-10 15:46:20 +0100243# Avoid passing --seed flag in every call to ssl-opt.sh
244[ ! -z ${SEED+set} ] && export SEED
245
Andres AGd9eba4b2016-08-26 14:42:14 +0100246# Make sure the tools we need are available.
247check_tools "$OPENSSL" "$OPENSSL_LEGACY" "$GNUTLS_CLI" "$GNUTLS_SERV" \
248 "$GNUTLS_LEGACY_CLI" "$GNUTLS_LEGACY_SERV" "doxygen" "dot" \
Simon Butcher105e8562017-01-05 18:26:40 +0000249 "arm-none-eabi-gcc" "$ARMC5_CC" "$ARMC5_AR" "$ARMC6_CC" "$ARMC6_AR" \
250 "i686-w64-mingw32-gcc"
Andres AGd9eba4b2016-08-26 14:42:14 +0100251
SimonB2e23c822016-04-16 21:54:39 +0100252#
253# Test Suites to be executed
254#
Manuel Pégourié-Gonnard57255b12014-06-09 11:21:49 +0200255# The test ordering tries to optimize for the following criteria:
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100256# 1. Catch possible problems early, by running first tests that run quickly
Manuel Pégourié-Gonnard61bc57a2014-08-14 11:29:06 +0200257# and/or are more likely to fail than others (eg I use Clang most of the
258# time, so start with a GCC build).
Manuel Pégourié-Gonnard57255b12014-06-09 11:21:49 +0200259# 2. Minimize total running time, by avoiding useless rebuilds
260#
261# Indicative running times are given for reference.
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +0100262
Janos Follathb72c6782016-07-19 14:54:17 +0100263msg "info: output_env.sh"
Andres AGd9eba4b2016-08-26 14:42:14 +0100264OPENSSL="$OPENSSL" OPENSSL_LEGACY="$OPENSSL_LEGACY" GNUTLS_CLI="$GNUTLS_CLI" \
265 GNUTLS_SERV="$GNUTLS_SERV" GNUTLS_LEGACY_CLI="$GNUTLS_LEGACY_CLI" \
Andres AG87bb5772016-09-27 15:05:15 +0100266 GNUTLS_LEGACY_SERV="$GNUTLS_LEGACY_SERV" ARMC5_CC="$ARMC5_CC" \
267 ARMC6_CC="$ARMC6_CC" scripts/output_env.sh
Janos Follathb72c6782016-07-19 14:54:17 +0100268
Manuel Pégourié-Gonnardea29d152014-11-20 17:32:33 +0100269msg "test: recursion.pl" # < 1s
Manuel Pégourié-Gonnardd09a6b52015-04-09 17:19:23 +0200270tests/scripts/recursion.pl library/*.c
Manuel Pégourié-Gonnardea29d152014-11-20 17:32:33 +0100271
Manuel Pégourié-Gonnardb3b8e432015-02-13 14:52:19 +0000272msg "test: freshness of generated source files" # < 1s
273tests/scripts/check-generated-files.sh
274
Manuel Pégourié-Gonnardd09a6b52015-04-09 17:19:23 +0200275msg "test: doxygen markup outside doxygen blocks" # < 1s
276tests/scripts/check-doxy-blocks.pl
277
Manuel Pégourié-Gonnarda687baf2015-04-09 11:09:03 +0200278msg "test/build: declared and exported names" # < 3s
279cleanup
280tests/scripts/check-names.sh
281
Andres AGd9eba4b2016-08-26 14:42:14 +0100282msg "test: doxygen warnings" # ~ 3s
283cleanup
284tests/scripts/doxygen.sh
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +0100285
Simon Butcher49f00bd2017-01-05 16:20:56 +0000286# Note - use of yotta is deprecated, and yotta also requires armcc to be on the
287# path, and uses whatever version of armcc it finds there.
Manuel Pégourié-Gonnard77d56bb2015-07-28 15:00:37 +0200288msg "build: create and build yotta module" # ~ 30s
289cleanup
290tests/scripts/yotta-build.sh
291
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100292msg "build: cmake, gcc, ASan" # ~ 1 min 50s
Manuel Pégourié-Gonnard3895f5a2014-03-27 14:44:04 +0100293cleanup
Manuel Pégourié-Gonnard9bda9b32014-11-20 13:10:22 +0100294CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
Manuel Pégourié-Gonnard3895f5a2014-03-27 14:44:04 +0100295make
296
Simon Butcher8e3afc72016-09-15 17:13:08 +0100297msg "test: main suites (inc. selftests) (ASan build)" # ~ 50s
Manuel Pégourié-Gonnard9bda9b32014-11-20 13:10:22 +0100298make test
Manuel Pégourié-Gonnard57255b12014-06-09 11:21:49 +0200299
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100300msg "test: ssl-opt.sh (ASan build)" # ~ 1 min
Manuel Pégourié-Gonnard3d404b42015-07-08 21:59:16 +0100301tests/ssl-opt.sh
Manuel Pégourié-Gonnard57255b12014-06-09 11:21:49 +0200302
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100303msg "test/build: ref-configs (ASan build)" # ~ 6 min 20s
Manuel Pégourié-Gonnard57255b12014-06-09 11:21:49 +0200304tests/scripts/test-ref-configs.pl
305
Manuel Pégourié-Gonnard57255b12014-06-09 11:21:49 +0200306msg "build: with ASan (rebuild after ref-configs)" # ~ 1 min
307make
308
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100309msg "test: compat.sh (ASan build)" # ~ 6 min
Manuel Pégourié-Gonnard3d404b42015-07-08 21:59:16 +0100310tests/compat.sh
Manuel Pégourié-Gonnard57255b12014-06-09 11:21:49 +0200311
Simon Butcher3ea7f522016-03-07 23:22:10 +0000312msg "build: Default + SSLv3 (ASan build)" # ~ 6 min
313cleanup
Simon Butcherf413b6f2016-03-14 22:32:42 +0000314cp "$CONFIG_H" "$CONFIG_BAK"
Simon Butcher3ea7f522016-03-07 23:22:10 +0000315scripts/config.pl set MBEDTLS_SSL_PROTO_SSL3
316CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
317make
318
Simon Butcher8e3afc72016-09-15 17:13:08 +0100319msg "test: SSLv3 - main suites (inc. selftests) (ASan build)" # ~ 50s
Simon Butcher3ea7f522016-03-07 23:22:10 +0000320make test
Simon Butcher3ea7f522016-03-07 23:22:10 +0000321
322msg "build: SSLv3 - compat.sh (ASan build)" # ~ 6 min
Andres AGd9eba4b2016-08-26 14:42:14 +0100323tests/compat.sh -m 'tls1 tls1_1 tls1_2 dtls1 dtls1_2'
324OPENSSL_CMD="$OPENSSL_LEGACY" tests/compat.sh -m 'ssl3'
Simon Butcher3ea7f522016-03-07 23:22:10 +0000325
326msg "build: SSLv3 - ssl-opt.sh (ASan build)" # ~ 6 min
327tests/ssl-opt.sh
328
Simon Butcherf95c1762016-11-10 17:25:58 +0000329msg "build: cmake, full config, clang, C99" # ~ 50s
Manuel Pégourié-Gonnard3895f5a2014-03-27 14:44:04 +0100330cleanup
Janos Follath35d48cb2016-04-22 14:45:00 +0100331cp "$CONFIG_H" "$CONFIG_BAK"
Manuel Pégourié-Gonnarde73b2632014-07-12 04:00:00 +0200332scripts/config.pl full
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200333scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # too slow for tests
Simon Butcherf95c1762016-11-10 17:25:58 +0000334CC=clang cmake -D CMAKE_BUILD_TYPE:String=Check -D ENABLE_TESTING=On .
335CFLAGS='-Werror -Wall -Wextra -std=c99 -pedantic' make
Manuel Pégourié-Gonnard3895f5a2014-03-27 14:44:04 +0100336
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100337msg "test: main suites (full config)" # ~ 5s
Simon Butcherf95c1762016-11-10 17:25:58 +0000338CFLAGS='-Werror -Wall -Wextra' make test
Manuel Pégourié-Gonnarde73b2632014-07-12 04:00:00 +0200339
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100340msg "test: ssl-opt.sh default (full config)" # ~ 1s
Manuel Pégourié-Gonnard3d404b42015-07-08 21:59:16 +0100341tests/ssl-opt.sh -f Default
Manuel Pégourié-Gonnarde73b2632014-07-12 04:00:00 +0200342
Manuel Pégourié-Gonnardea0920f2015-03-24 09:50:15 +0100343msg "test: compat.sh RC4, DES & NULL (full config)" # ~ 2 min
Andres AGd9eba4b2016-08-26 14:42:14 +0100344OPENSSL_CMD="$OPENSSL_LEGACY" GNUTLS_CLI="$GNUTLS_LEGACY_CLI" GNUTLS_SERV="$GNUTLS_LEGACY_SERV" tests/compat.sh -e '3DES\|DES-CBC3' -f 'NULL\|DES\|RC4\|ARCFOUR'
Manuel Pégourié-Gonnarde73b2632014-07-12 04:00:00 +0200345
Manuel Pégourié-Gonnard503a5ef2015-10-23 09:04:45 +0200346msg "test/build: curves.pl (gcc)" # ~ 4 min
Manuel Pégourié-Gonnard246978d2014-11-20 13:29:53 +0100347cleanup
348cmake -D CMAKE_BUILD_TYPE:String=Debug .
349tests/scripts/curves.pl
350
Manuel Pégourié-Gonnard503a5ef2015-10-23 09:04:45 +0200351msg "test/build: key-exchanges (gcc)" # ~ 1 min
352cleanup
353cmake -D CMAKE_BUILD_TYPE:String=Check .
354tests/scripts/key-exchanges.pl
355
Manuel Pégourié-Gonnard61fe8b02015-03-13 14:33:16 +0000356msg "build: Unix make, -Os (gcc)" # ~ 30s
Manuel Pégourié-Gonnard3895f5a2014-03-27 14:44:04 +0100357cleanup
Simon Butcherf95c1762016-11-10 17:25:58 +0000358CC=gcc CFLAGS='-Werror -Wall -Wextra -Os' make
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +0100359
Simon Butcherf95c1762016-11-10 17:25:58 +0000360# Full configuration build, without platform support, file IO and net sockets.
361# This should catch missing mbedtls_printf definitions, and by disabling file
362# IO, it should catch missing '#include <stdio.h>'
363msg "build: full config except platform/fsio/net, make, gcc, C99" # ~ 30s
Manuel Pégourié-Gonnarda71780e2015-02-13 13:56:55 +0000364cleanup
365cp "$CONFIG_H" "$CONFIG_BAK"
366scripts/config.pl full
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200367scripts/config.pl unset MBEDTLS_PLATFORM_C
Simon Butcherf95c1762016-11-10 17:25:58 +0000368scripts/config.pl unset MBEDTLS_NET_C
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200369scripts/config.pl unset MBEDTLS_PLATFORM_MEMORY
Manuel Pégourié-Gonnard3d4755b2015-06-03 14:03:17 +0100370scripts/config.pl unset MBEDTLS_PLATFORM_PRINTF_ALT
371scripts/config.pl unset MBEDTLS_PLATFORM_FPRINTF_ALT
372scripts/config.pl unset MBEDTLS_PLATFORM_SNPRINTF_ALT
Simon Butcherb9283432016-07-13 11:02:41 +0100373scripts/config.pl unset MBEDTLS_PLATFORM_TIME_ALT
Manuel Pégourié-Gonnard3d4755b2015-06-03 14:03:17 +0100374scripts/config.pl unset MBEDTLS_PLATFORM_EXIT_ALT
Simon Butcher284b4c92016-06-26 13:10:00 +0100375scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200376scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
377scripts/config.pl unset MBEDTLS_FS_IO
Simon Butchercb587002017-01-06 16:14:44 +0000378# Note, _DEFAULT_SOURCE needs to be defined for platforms using glibc version >2.19,
379# to re-enable platform integration features otherwise disabled in C99 builds
380CC=gcc CFLAGS='-Werror -Wall -Wextra -std=c99 -pedantic -O0 -D_DEFAULT_SOURCE' make lib programs
Simon Butcherf95c1762016-11-10 17:25:58 +0000381CC=gcc CFLAGS='-Werror -Wall -Wextra -O0' make test
Manuel Pégourié-Gonnarda71780e2015-02-13 13:56:55 +0000382
Manuel Pégourié-Gonnarddccb80b2015-06-03 10:20:33 +0100383# catch compile bugs in _uninit functions
384msg "build: full config with NO_STD_FUNCTION, make, gcc" # ~ 30s
385cleanup
386cp "$CONFIG_H" "$CONFIG_BAK"
387scripts/config.pl full
Manuel Pégourié-Gonnard7ee5ddd2015-06-03 10:33:55 +0100388scripts/config.pl set MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
Simon Butchereebf1b92016-06-27 01:42:39 +0100389scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
Simon Butcherf95c1762016-11-10 17:25:58 +0000390CC=gcc CFLAGS='-Werror -Wall -Wextra -O0' make
Manuel Pégourié-Gonnarddccb80b2015-06-03 10:20:33 +0100391
Manuel Pégourié-Gonnard66b8e952015-05-20 11:13:56 +0200392msg "build: full config except ssl_srv.c, make, gcc" # ~ 30s
393cleanup
394cp "$CONFIG_H" "$CONFIG_BAK"
395scripts/config.pl full
396scripts/config.pl unset MBEDTLS_SSL_SRV_C
Simon Butcherf95c1762016-11-10 17:25:58 +0000397CC=gcc CFLAGS='-Werror -Wall -Wextra -O0' make
Manuel Pégourié-Gonnard66b8e952015-05-20 11:13:56 +0200398
399msg "build: full config except ssl_cli.c, make, gcc" # ~ 30s
400cleanup
401cp "$CONFIG_H" "$CONFIG_BAK"
402scripts/config.pl full
403scripts/config.pl unset MBEDTLS_SSL_CLI_C
Simon Butcherf95c1762016-11-10 17:25:58 +0000404CC=gcc CFLAGS='-Werror -Wall -Werror -O0' make
Manuel Pégourié-Gonnard66b8e952015-05-20 11:13:56 +0200405
Simon Butcherf95c1762016-11-10 17:25:58 +0000406# Note, C99 compliance can also be tested with the sockets support disabled,
407# as that requires a POSIX platform (which isn't the same as C99).
Andres AG788aa4a2016-09-14 14:32:09 +0100408msg "build: full config except net_sockets.c, make, gcc -std=c99 -pedantic" # ~ 30s
Manuel Pégourié-Gonnard009a2642015-05-29 10:31:13 +0200409cleanup
410cp "$CONFIG_H" "$CONFIG_BAK"
411scripts/config.pl full
Manuel Pégourié-Gonnardf78e4de2015-05-29 10:52:14 +0200412scripts/config.pl unset MBEDTLS_NET_C # getaddrinfo() undeclared, etc.
413scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY # uses syscall() on GNU/Linux
Simon Butcherf95c1762016-11-10 17:25:58 +0000414CC=gcc CFLAGS='-Werror -Wall -Wextra -O0 -std=c99 -pedantic' make lib
Manuel Pégourié-Gonnard009a2642015-05-29 10:31:13 +0200415
Simon Butcherab5df402016-06-11 02:31:21 +0100416msg "build: default config with MBEDTLS_TEST_NULL_ENTROPY (ASan build)"
Janos Follath06c54002016-06-09 13:57:40 +0100417cleanup
418cp "$CONFIG_H" "$CONFIG_BAK"
Simon Butcherab5df402016-06-11 02:31:21 +0100419scripts/config.pl set MBEDTLS_TEST_NULL_ENTROPY
Janos Follath06c54002016-06-09 13:57:40 +0100420scripts/config.pl set MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
421scripts/config.pl set MBEDTLS_ENTROPY_C
422scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
423scripts/config.pl unset MBEDTLS_ENTROPY_HARDWARE_ALT
424scripts/config.pl unset MBEDTLS_HAVEGE_C
Simon Butchereebf1b92016-06-27 01:42:39 +0100425CC=gcc cmake -D UNSAFE_BUILD=ON -D CMAKE_C_FLAGS:String="-fsanitize=address -fno-common -O3" .
Janos Follath06c54002016-06-09 13:57:40 +0100426make
427
Simon Butcher8e3afc72016-09-15 17:13:08 +0100428msg "test: MBEDTLS_TEST_NULL_ENTROPY - main suites (inc. selftests) (ASan build)"
Janos Follath06c54002016-06-09 13:57:40 +0100429make test
Janos Follath06c54002016-06-09 13:57:40 +0100430
Manuel Pégourié-Gonnard9b06abe2015-06-25 09:56:07 +0200431if uname -a | grep -F Linux >/dev/null; then
432msg "build/test: make shared" # ~ 40s
433cleanup
434make SHARED=1 all check
435fi
436
Manuel Pégourié-Gonnardedb2dc92015-02-10 14:36:31 +0000437if uname -a | grep -F x86_64 >/dev/null; then
438msg "build: i386, make, gcc" # ~ 30s
439cleanup
Simon Butcherf95c1762016-11-10 17:25:58 +0000440CC=gcc CFLAGS='-Werror -Wall -Wextra -m32' make
Andres Amaya Garciadd29c2f2017-05-04 11:35:51 +0100441
Hanno Beckerbf37b102017-08-23 10:29:42 +0100442msg "build: default config, MBEDTLS_RSA_NO_CRT, make, gcc"
443cleanup
444cp "$CONFIG_H" "$CONFIG_BAK"
445scripts/config.pl set MBEDTLS_RSA_NO_CRT
446CC=gcc CFLAGS='-Werror -Wall -Werror -O0' make
447
448msg "test: MBEDTLS_RSA_NO_CRT - main suites (inc. selftests) (ASan build)"
449make test
450
Andres Amaya Garciadd29c2f2017-05-04 11:35:51 +0100451msg "build: gcc, force 32-bit compilation"
452cleanup
453cp "$CONFIG_H" "$CONFIG_BAK"
454scripts/config.pl unset MBEDTLS_HAVE_ASM
455scripts/config.pl unset MBEDTLS_AESNI_C
456scripts/config.pl unset MBEDTLS_PADLOCK_C
457CC=gcc CFLAGS='-Werror -Wall -Wextra -DMBEDTLS_HAVE_INT32' make
458
Andres Amaya Garcia33264d72017-07-20 13:21:34 +0100459msg "build: gcc, force 64-bit compilation"
460cleanup
461cp "$CONFIG_H" "$CONFIG_BAK"
462scripts/config.pl unset MBEDTLS_HAVE_ASM
463scripts/config.pl unset MBEDTLS_AESNI_C
464scripts/config.pl unset MBEDTLS_PADLOCK_C
465CC=gcc CFLAGS='-Werror -Wall -Wextra -DMBEDTLS_HAVE_INT64' make
466
467msg "test: gcc, force 64-bit compilation"
Andres Amaya Garciadd29c2f2017-05-04 11:35:51 +0100468make test
Andres Amaya Garcia33264d72017-07-20 13:21:34 +0100469
Andres Amaya Garciac327aa12017-07-21 10:50:25 +0100470msg "build: gcc, force 64-bit compilation"
Andres Amaya Garcia33264d72017-07-20 13:21:34 +0100471cleanup
472cp "$CONFIG_H" "$CONFIG_BAK"
473scripts/config.pl unset MBEDTLS_HAVE_ASM
474scripts/config.pl unset MBEDTLS_AESNI_C
475scripts/config.pl unset MBEDTLS_PADLOCK_C
Andres Amaya Garciac327aa12017-07-21 10:50:25 +0100476CC=gcc CFLAGS='-Werror -Wall -Wextra -DMBEDTLS_HAVE_INT64' make
Manuel Pégourié-Gonnardedb2dc92015-02-10 14:36:31 +0000477fi # x86_64
478
Manuel Pégourié-Gonnardedb2dc92015-02-10 14:36:31 +0000479msg "build: arm-none-eabi-gcc, make" # ~ 10s
480cleanup
481cp "$CONFIG_H" "$CONFIG_BAK"
482scripts/config.pl full
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200483scripts/config.pl unset MBEDTLS_NET_C
484scripts/config.pl unset MBEDTLS_TIMING_C
485scripts/config.pl unset MBEDTLS_FS_IO
Simon Butchereebf1b92016-06-27 01:42:39 +0100486scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
Simon Butcherbc6a4862016-03-07 17:35:59 +0000487scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY
Manuel Pégourié-Gonnardedb2dc92015-02-10 14:36:31 +0000488# following things are not in the default config
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200489scripts/config.pl unset MBEDTLS_HAVEGE_C # depends on timing.c
490scripts/config.pl unset MBEDTLS_THREADING_PTHREAD
491scripts/config.pl unset MBEDTLS_THREADING_C
492scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # execinfo.h
493scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C # calls exit
Simon Butcherf95c1762016-11-10 17:25:58 +0000494CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' make lib
Manuel Pégourié-Gonnardedb2dc92015-02-10 14:36:31 +0000495
Gilles Peskine9a9adcd2017-06-08 15:19:20 +0200496msg "build: arm-none-eabi-gcc -DMBEDTLS_NO_UDBL_DIVISION, make" # ~ 10s
497cleanup
Simon Butcher51aaa992017-07-23 13:42:36 +0200498cp "$CONFIG_H" "$CONFIG_BAK"
Andres Amaya Garcia6fb65862017-07-20 13:27:35 +0100499scripts/config.pl full
500scripts/config.pl unset MBEDTLS_NET_C
501scripts/config.pl unset MBEDTLS_TIMING_C
502scripts/config.pl unset MBEDTLS_FS_IO
503scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
504scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY
505# following things are not in the default config
506scripts/config.pl unset MBEDTLS_HAVEGE_C # depends on timing.c
507scripts/config.pl unset MBEDTLS_THREADING_PTHREAD
508scripts/config.pl unset MBEDTLS_THREADING_C
509scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # execinfo.h
510scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C # calls exit
Gilles Peskine9a9adcd2017-06-08 15:19:20 +0200511scripts/config.pl set MBEDTLS_NO_UDBL_DIVISION
512CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' make lib
513echo "Checking that software 64-bit division is not required"
514! grep __aeabi_uldiv library/*.o
515
Andres AG87bb5772016-09-27 15:05:15 +0100516msg "build: ARM Compiler 5, make"
Manuel Pégourié-Gonnardc5c59392015-02-10 17:38:54 +0100517cleanup
518cp "$CONFIG_H" "$CONFIG_BAK"
519scripts/config.pl full
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200520scripts/config.pl unset MBEDTLS_NET_C
521scripts/config.pl unset MBEDTLS_TIMING_C
522scripts/config.pl unset MBEDTLS_FS_IO
Simon Butcher1c719652016-06-27 19:02:12 +0100523scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200524scripts/config.pl unset MBEDTLS_HAVE_TIME
Manuel Pégourié-Gonnardbbc60db2015-06-22 14:31:50 +0200525scripts/config.pl unset MBEDTLS_HAVE_TIME_DATE
Simon Butcherbc6a4862016-03-07 17:35:59 +0000526scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY
Manuel Pégourié-Gonnardc5c59392015-02-10 17:38:54 +0100527# following things are not in the default config
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200528scripts/config.pl unset MBEDTLS_DEPRECATED_WARNING
529scripts/config.pl unset MBEDTLS_HAVEGE_C # depends on timing.c
530scripts/config.pl unset MBEDTLS_THREADING_PTHREAD
531scripts/config.pl unset MBEDTLS_THREADING_C
532scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # execinfo.h
533scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C # calls exit
Simon Butcher4df5eaf2016-08-24 22:58:31 +0300534scripts/config.pl unset MBEDTLS_PLATFORM_TIME_ALT # depends on MBEDTLS_HAVE_TIME
Andres AG87bb5772016-09-27 15:05:15 +0100535
Simon Butcher105e8562017-01-05 18:26:40 +0000536CC="$ARMC5_CC" AR="$ARMC5_AR" WARNING_CFLAGS='--strict --c99' make lib
Andres AG87bb5772016-09-27 15:05:15 +0100537make clean
538
Simon Butcher51aaa992017-07-23 13:42:36 +0200539# ARM Compiler 6 - Target ARMv7-A
Andres AGa5cd9732016-10-17 15:23:10 +0100540armc6_build_test "--target=arm-arm-none-eabi -march=armv7-a"
Simon Butcher51aaa992017-07-23 13:42:36 +0200541
542# ARM Compiler 6 - Target ARMv7-M
Andres AGa5cd9732016-10-17 15:23:10 +0100543armc6_build_test "--target=arm-arm-none-eabi -march=armv7-m"
Simon Butcher51aaa992017-07-23 13:42:36 +0200544
545# ARM Compiler 6 - Target ARMv8-A - AArch32
Andres AGa5cd9732016-10-17 15:23:10 +0100546armc6_build_test "--target=arm-arm-none-eabi -march=armv8.2-a"
Simon Butcher51aaa992017-07-23 13:42:36 +0200547
548# ARM Compiler 6 - Target ARMv8-M
Andres AGa5cd9732016-10-17 15:23:10 +0100549armc6_build_test "--target=arm-arm-none-eabi -march=armv8-m.main"
Simon Butcher51aaa992017-07-23 13:42:36 +0200550
551# ARM Compiler 6 - Target ARMv8-A - AArch64
552armc6_build_test "--target=aarch64-arm-none-eabi -march=armv8.2-a"
Manuel Pégourié-Gonnardc5c59392015-02-10 17:38:54 +0100553
Gilles Peskine2a458da2017-05-12 15:26:58 +0200554msg "build: allow SHA1 in certificates by default"
555cleanup
556cp "$CONFIG_H" "$CONFIG_BAK"
557scripts/config.pl set MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
558CFLAGS='-Werror -Wall -Wextra' make
559msg "test: allow SHA1 in certificates by default"
560make test
561tests/ssl-opt.sh -f SHA-1
562
Simon Butcher002bc622016-11-17 09:27:45 +0000563msg "build: Windows cross build - mingw64, make (Link Library)" # ~ 30s
Manuel Pégourié-Gonnard6448bce2015-02-16 17:18:36 +0100564cleanup
Simon Butcher002bc622016-11-17 09:27:45 +0000565CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS='-Werror -Wall -Wextra' WINDOWS_BUILD=1 make lib programs
Simon Butcher91aef332016-11-17 09:20:50 +0000566
Simon Butcher002bc622016-11-17 09:27:45 +0000567# note Make tests only builds the tests, but doesn't run them
568CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS='-Werror' WINDOWS_BUILD=1 make tests
Manuel Pégourié-Gonnard52fa38a2015-06-23 14:29:58 +0200569WINDOWS_BUILD=1 make clean
Simon Butcherf95c1762016-11-10 17:25:58 +0000570
Simon Butcher002bc622016-11-17 09:27:45 +0000571msg "build: Windows cross build - mingw64, make (DLL)" # ~ 30s
572CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS='-Werror -Wall -Wextra' WINDOWS_BUILD=1 SHARED=1 make lib programs
573CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS='-Werror -Wall -Wextra' WINDOWS_BUILD=1 SHARED=1 make tests
Manuel Pégourié-Gonnarde33316c2015-08-07 13:17:23 +0200574WINDOWS_BUILD=1 make clean
Manuel Pégourié-Gonnard6448bce2015-02-16 17:18:36 +0100575
Manuel Pégourié-Gonnardedb2dc92015-02-10 14:36:31 +0000576# MemSan currently only available on Linux 64 bits
577if uname -a | grep 'Linux.*x86_64' >/dev/null; then
Manuel Pégourié-Gonnard392d3dd2015-01-26 14:03:56 +0000578
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100579msg "build: MSan (clang)" # ~ 1 min 20s
Manuel Pégourié-Gonnard9bda9b32014-11-20 13:10:22 +0100580cleanup
581cp "$CONFIG_H" "$CONFIG_BAK"
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200582scripts/config.pl unset MBEDTLS_AESNI_C # memsan doesn't grok asm
Manuel Pégourié-Gonnard9bda9b32014-11-20 13:10:22 +0100583CC=clang cmake -D CMAKE_BUILD_TYPE:String=MemSan .
584make
Manuel Pégourié-Gonnard4a9dc2a2014-05-09 13:46:59 +0200585
Manuel Pégourié-Gonnard89d69b32014-11-20 13:48:53 +0100586msg "test: main suites (MSan)" # ~ 10s
Manuel Pégourié-Gonnard9bda9b32014-11-20 13:10:22 +0100587make test
588
589msg "test: ssl-opt.sh (MSan)" # ~ 1 min
Manuel Pégourié-Gonnard3d404b42015-07-08 21:59:16 +0100590tests/ssl-opt.sh
Manuel Pégourié-Gonnard9bda9b32014-11-20 13:10:22 +0100591
592# Optional part(s)
593
594if [ "$MEMORY" -gt 0 ]; then
595 msg "test: compat.sh (MSan)" # ~ 6 min 20s
Manuel Pégourié-Gonnard3d404b42015-07-08 21:59:16 +0100596 tests/compat.sh
Manuel Pégourié-Gonnard57255b12014-06-09 11:21:49 +0200597fi
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +0100598
Manuel Pégourié-Gonnard392d3dd2015-01-26 14:03:56 +0000599else # no MemSan
600
601msg "build: Release (clang)"
602cleanup
603CC=clang cmake -D CMAKE_BUILD_TYPE:String=Release .
604make
605
606msg "test: main suites valgrind (Release)"
Manuel Pégourié-Gonnard9afdc832015-08-04 17:15:13 +0200607make memcheck
Manuel Pégourié-Gonnard392d3dd2015-01-26 14:03:56 +0000608
609# Optional part(s)
610# Currently broken, programs don't seem to receive signals
611# under valgrind on OS X
612
613if [ "$MEMORY" -gt 0 ]; then
614 msg "test: ssl-opt.sh --memcheck (Release)"
Manuel Pégourié-Gonnard3d404b42015-07-08 21:59:16 +0100615 tests/ssl-opt.sh --memcheck
Manuel Pégourié-Gonnard392d3dd2015-01-26 14:03:56 +0000616fi
617
618if [ "$MEMORY" -gt 1 ]; then
619 msg "test: compat.sh --memcheck (Release)"
Manuel Pégourié-Gonnard3d404b42015-07-08 21:59:16 +0100620 tests/compat.sh --memcheck
Manuel Pégourié-Gonnard392d3dd2015-01-26 14:03:56 +0000621fi
622
623fi # MemSan
624
Andres AGdc192212016-08-31 17:33:13 +0100625msg "build: cmake 'out-of-source' build"
626cleanup
627MBEDTLS_ROOT_DIR="$PWD"
628mkdir "$OUT_OF_SOURCE_DIR"
629cd "$OUT_OF_SOURCE_DIR"
630cmake "$MBEDTLS_ROOT_DIR"
631make
632
633msg "test: cmake 'out-of-source' build"
634make test
635cd "$MBEDTLS_ROOT_DIR"
636rm -rf "$OUT_OF_SOURCE_DIR"
637
Manuel Pégourié-Gonnard9bda9b32014-11-20 13:10:22 +0100638msg "Done, cleaning up"
Manuel Pégourié-Gonnard80955ee2014-03-19 18:29:01 +0100639cleanup
640