Add WANT_BENCHMARKS to speedup testing

pull/200/head
Jeffrey Walton 2016-06-18 16:50:00 -04:00
parent c8586d65fe
commit 35ec61b59c
1 changed files with 76 additions and 61 deletions

View File

@ -19,6 +19,9 @@
# CXXFLAGS=-Wall ./cryptest.sh # CXXFLAGS=-Wall ./cryptest.sh
# CXXFLAGS="-Wall -Wextra" ./cryptest.sh # CXXFLAGS="-Wall -Wextra" ./cryptest.sh
# The fastest results (in running time) will most likely use:
# HAVE_VALGRIND=0 WANT_BENCHMARKS=0 ./cryptest.sh
############################################ ############################################
# Set to suite your taste # Set to suite your taste
@ -346,6 +349,11 @@ if [[ (-z "$HAVE_DISASS") ]]; then
fi fi
fi fi
# Benchmarks take a long time...
if [[ (-z "$WANT_BENCHMARKS") ]]; then
WANT_BENCHMARKS=1
fi
############################################ ############################################
# System information # System information
@ -3006,8 +3014,12 @@ if [[ "$HAVE_ARM_CRYPTO" -ne "0" ]]; then
fi fi
############################################ ############################################
# Benchmarks, c++03 # Benchmarks
if [[ "$HAVE_CXX03" -ne "0" ]]; then if [[ "$WANT_BENCHMARKS" -ne "0" ]]; then
############################################
# Benchmarks, c++03
if [[ "$HAVE_CXX03" -ne "0" ]]; then
echo echo
echo "************************************" | tee -a "$TEST_RESULTS" echo "************************************" | tee -a "$TEST_RESULTS"
echo "Testing: Benchmarks, c++03" | tee -a "$TEST_RESULTS" echo "Testing: Benchmarks, c++03" | tee -a "$TEST_RESULTS"
@ -3028,11 +3040,11 @@ if [[ "$HAVE_CXX03" -ne "0" ]]; then
echo "ERROR: failed to execute benchmarks" | tee -a "$BENCHMARK_RESULTS" echo "ERROR: failed to execute benchmarks" | tee -a "$BENCHMARK_RESULTS"
fi fi
fi fi
fi fi
############################################ ############################################
# Benchmarks, c++11 # Benchmarks, c++11
if [[ "$HAVE_CXX11" -ne "0" ]]; then if [[ "$HAVE_CXX11" -ne "0" ]]; then
echo echo
echo "************************************" | tee -a "$TEST_RESULTS" echo "************************************" | tee -a "$TEST_RESULTS"
echo "Testing: Benchmarks, c++11" | tee -a "$TEST_RESULTS" echo "Testing: Benchmarks, c++11" | tee -a "$TEST_RESULTS"
@ -3054,11 +3066,11 @@ if [[ "$HAVE_CXX11" -ne "0" ]]; then
echo "ERROR: failed to execute benchmarks" | tee -a "$BENCHMARK_RESULTS" echo "ERROR: failed to execute benchmarks" | tee -a "$BENCHMARK_RESULTS"
fi fi
fi fi
fi fi
############################################ ############################################
# Benchmarks, c++14 # Benchmarks, c++14
if [[ "$HAVE_CXX14" -ne "0" ]]; then if [[ "$HAVE_CXX14" -ne "0" ]]; then
echo echo
echo "************************************" | tee -a "$TEST_RESULTS" echo "************************************" | tee -a "$TEST_RESULTS"
echo "Testing: Benchmarks, c++14" | tee -a "$TEST_RESULTS" echo "Testing: Benchmarks, c++14" | tee -a "$TEST_RESULTS"
@ -3080,6 +3092,7 @@ if [[ "$HAVE_CXX14" -ne "0" ]]; then
echo "ERROR: failed to execute benchmarks" | tee -a "$BENCHMARK_RESULTS" echo "ERROR: failed to execute benchmarks" | tee -a "$BENCHMARK_RESULTS"
fi fi
fi fi
fi
fi fi
# For Cygwin, we need to test both PREFER_BERKELEY_STYLE_SOCKETS # For Cygwin, we need to test both PREFER_BERKELEY_STYLE_SOCKETS
@ -3477,6 +3490,7 @@ if [[ ("$IS_CYGWIN" -eq "0") && ("$IS_MINGW" -eq "0") ]]; then
echo "ERROR: failed to execute test vectors" | tee -a "$INSTALL_RESULTS" echo "ERROR: failed to execute test vectors" | tee -a "$INSTALL_RESULTS"
fi fi
if [[ "$WANT_BENCHMARKS" -ne "0" ]]; then
echo echo
echo "************************************" | tee -a "$INSTALL_RESULTS" echo "************************************" | tee -a "$INSTALL_RESULTS"
echo "Testing: Install (benchmarks)" | tee -a "$INSTALL_RESULTS" echo "Testing: Install (benchmarks)" | tee -a "$INSTALL_RESULTS"
@ -3485,6 +3499,7 @@ if [[ ("$IS_CYGWIN" -eq "0") && ("$IS_MINGW" -eq "0") ]]; then
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
echo "ERROR: failed to execute benchmarks" | tee -a "$INSTALL_RESULTS" echo "ERROR: failed to execute benchmarks" | tee -a "$INSTALL_RESULTS"
fi fi
fi
echo echo
echo "************************************" | tee -a "$INSTALL_RESULTS" echo "************************************" | tee -a "$INSTALL_RESULTS"