Merge branch 'speedup_tests'

Pull Request #533 - Use MAKEFLAGS to pass args to make in all.sh

Modify the script at tests/scripts/all.sh to export the variable
MAKEFLAGS with -j if it was not set before. This should decrease the
total runtime of tests/scripts/all.sh by letting make run multiple jobs
in parallel. Also, add a check at the top of the script to cause a
failure if the environment is not Linux.w
This commit is contained in:
Simon Butcher 2016-12-30 19:09:40 +00:00
commit 710dd4fdd6

View file

@ -22,8 +22,11 @@
# Abort on errors (and uninitialised variables) # Abort on errors (and uninitialised variables)
set -eu set -eu
if [ -d library -a -d include -a -d tests ]; then :; else if [ "$( uname )" != "Linux" ]; then
err_msg "Must be run from mbed TLS root" echo "This script only works in Linux" >&2
exit 1
elif [ -d library -a -d include -a -d tests ]; then :; else
echo "Must be run from mbed TLS root" >&2
exit 1 exit 1
fi fi
@ -43,6 +46,11 @@ RELEASE=0
: ${GNUTLS_LEGACY_SERV:="$GNUTLS_SERV"} : ${GNUTLS_LEGACY_SERV:="$GNUTLS_SERV"}
: ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build} : ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build}
# if MAKEFLAGS is not set add the -j option to speed up invocations of make
if [ -n "${MAKEFLAGS+set}" ]; then
export MAKEFLAGS="-j"
fi
usage() usage()
{ {
printf "Usage: $0\n" printf "Usage: $0\n"