diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 1e7107456..c2d663523 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -91,10 +91,7 @@ set -eu pre_check_environment () { - if [ "$( uname )" != "Linux" ]; then - echo "This script only works in Linux" >&2 - exit 1 - elif [ -d library -a -d include -a -d tests ]; then :; else + if [ -d library -a -d include -a -d tests ]; then :; else echo "Must be run from mbed TLS root" >&2 exit 1 fi @@ -1190,14 +1187,14 @@ run_all_components () { run_component component_test_aes_fewer_tables run_component component_test_aes_rom_tables run_component component_test_aes_fewer_tables_and_rom_tables - if uname -a | grep -F Linux >/dev/null; then - run_component component_test_make_shared - fi - if uname -a | grep -F x86_64 >/dev/null; then - run_component component_test_m32_o0 - run_component component_test_m32_o1 - run_component component_test_mx32 - fi + run_component component_test_make_shared + case $(uname -m) in + amd64|x86_64) + run_component component_test_m32_o0 + run_component component_test_m32_o1 + run_component component_test_mx32 + ;; + esac run_component component_test_have_int32 run_component component_test_have_int64 run_component component_test_no_udbl_division @@ -1208,12 +1205,8 @@ run_all_components () { run_component component_build_armcc run_component component_test_allow_sha1 run_component component_build_mingw - # MemSan currently only available on Linux 64 bits - if uname -a | grep 'Linux.*x86_64' >/dev/null; then - run_component component_test_memsan - else # no MemSan - run_component component_test_memcheck - fi + run_component component_test_memsan + run_component component_test_memcheck run_component component_test_cmake_out_of_source # More small things diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 2ccecc4b1..26830fe63 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -167,7 +167,7 @@ requires_config_disabled() { get_config_value_or_default() { NAME="$1" DEF_VAL=$( grep ".*#define.*${NAME}" ../include/mbedtls/config.h | - sed 's/^.*\s\([0-9]*\)$/\1/' ) + sed 's/^.* \([0-9]*\)$/\1/' ) ../scripts/config.pl get $NAME || echo "$DEF_VAL" }