Added 0 to capture make return code

pull/98/head
Jeffrey Walton 2015-12-31 11:29:38 -05:00
parent fe09adf736
commit 5a60f4c35d
1 changed files with 230 additions and 222 deletions

View File

@ -204,12 +204,12 @@ unset CXXFLAGS
export CXXFLAGS="-DDEBUG -g2 -O2" export CXXFLAGS="-DDEBUG -g2 -O2"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Basic release build # Basic release build
@ -223,12 +223,12 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -O2" export CXXFLAGS="-DNDEBUG -g2 -O2"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Basic debug build, DISABLE_ASM # Basic debug build, DISABLE_ASM
@ -242,12 +242,12 @@ unset CXXFLAGS
export CXXFLAGS="-DDEBUG -g2 -O2 -DCRYPTOPP_DISABLE_ASM" export CXXFLAGS="-DDEBUG -g2 -O2 -DCRYPTOPP_DISABLE_ASM"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Basic release build, DISABLE_ASM # Basic release build, DISABLE_ASM
@ -261,12 +261,12 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_DISABLE_ASM" export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_DISABLE_ASM"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# c++03 debug build # c++03 debug build
@ -281,13 +281,13 @@ if [ "$HAVE_CXX03" -ne "0" ]; then
export CXXFLAGS="-DDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# c++03 release build # c++03 release build
@ -302,13 +302,13 @@ if [ "$HAVE_CXX03" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# c++11 debug build # c++11 debug build
@ -323,13 +323,13 @@ if [ "$HAVE_CXX11" -ne "0" ]; then
export CXXFLAGS="-DDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# c++11 release build # c++11 release build
@ -344,13 +344,13 @@ if [ "$HAVE_CXX11" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Debug build, all backwards compatibility. # Debug build, all backwards compatibility.
@ -364,12 +364,12 @@ unset CXXFLAGS
export CXXFLAGS="-DDEBUG -g2 -O2 -DCRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -O2 -DCRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Release build, all backwards compatibility. # Release build, all backwards compatibility.
@ -383,7 +383,7 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi fi
@ -402,12 +402,12 @@ unset CXXFLAGS
export CXXFLAGS="-DDEBUG -g2 -O1 -DCRYPTOPP_INIT_PRIORITY=250 $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -O1 -DCRYPTOPP_INIT_PRIORITY=250 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Release build, init_priority # Release build, init_priority
@ -421,12 +421,12 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_INIT_PRIORITY=250 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_INIT_PRIORITY=250 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Release build, no unaligned data access # Release build, no unaligned data access
@ -441,12 +441,12 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Release build, no backwards compatibility with Crypto++ 5.6.2. # Release build, no backwards compatibility with Crypto++ 5.6.2.
@ -461,12 +461,12 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Debug build, OS Independence # Debug build, OS Independence
@ -480,12 +480,12 @@ unset CXXFLAGS
export CXXFLAGS="-DDEBUG -g2 -O1 -DNO_OS_DEPENDENCE $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -O1 -DNO_OS_DEPENDENCE $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Release build, OS Independence # Release build, OS Independence
@ -499,12 +499,12 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -O2 -DNO_OS_DEPENDENCE $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -DNO_OS_DEPENDENCE $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Debug build at -O3 # Debug build at -O3
@ -518,12 +518,12 @@ unset CXXFLAGS
export CXXFLAGS="-DDEBUG -g2 -O3 $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -O3 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Release build at -O3 # Release build at -O3
@ -537,12 +537,12 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -O3 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O3 $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Debug build at -Os # Debug build at -Os
@ -556,12 +556,12 @@ unset CXXFLAGS
export CXXFLAGS="-DDEBUG -g2 -Os $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -Os $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Release build at -Os # Release build at -Os
@ -575,12 +575,12 @@ unset CXXFLAGS
export CXXFLAGS="-DNDEBUG -g2 -Os $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -Os $ADD_CXXFLAGS"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi
############################################ ############################################
# Debug build, UBSan, c++03 # Debug build, UBSan, c++03
@ -595,13 +595,13 @@ if [ "$HAVE_CXX03" -ne "0" ] && [ "$HAVE_UBSAN" -ne "0" ]; then
export CXXFLAGS="-DDEBUG -g2 -O1 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -O1 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" ubsan | tee -a "$TEST_RESULTS" "$MAKE" ubsan | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Release build, UBSan, c++03 # Release build, UBSan, c++03
@ -616,13 +616,13 @@ if [ "$HAVE_CXX03" -ne "0" ] && [ "$HAVE_UBSAN" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" ubsan | tee -a "$TEST_RESULTS" "$MAKE" ubsan | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Debug build, Asan, c++03 # Debug build, Asan, c++03
@ -637,13 +637,13 @@ if [ "$HAVE_CXX03" -ne "0" ] && [ "$HAVE_ASAN" -ne "0" ]; then
export CXXFLAGS="-DDEBUG -g2 -O1 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DDEBUG -g2 -O1 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" asan | tee -a "$TEST_RESULTS" "$MAKE" asan | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Release build, Asan, c++03 # Release build, Asan, c++03
@ -658,13 +658,13 @@ if [ "$HAVE_CXX03" -ne "0" ] && [ "$HAVE_ASAN" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" asan | tee -a "$TEST_RESULTS" "$MAKE" asan | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Release build, UBSan, c++11 # Release build, UBSan, c++11
@ -678,13 +678,13 @@ if [ "$HAVE_CXX11" -ne "0" ] && [ "$HAVE_UBSAN" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS"
"$MAKE" ubsan | tee -a "$TEST_RESULTS" "$MAKE" ubsan | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Release build, Asan, c++11 # Release build, Asan, c++11
@ -699,13 +699,13 @@ if [ "$HAVE_CXX11" -ne "0" ] && [ "$HAVE_ASAN" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS"
"$MAKE" asan | tee -a "$TEST_RESULTS" "$MAKE" asan | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
# For Darwin, we need to test both -stdlib=libstdc++ (GNU) and # For Darwin, we need to test both -stdlib=libstdc++ (GNU) and
# -stdlib=libc++ (LLVM) crossed with -std=c++03 and -std=c++11. # -stdlib=libc++ (LLVM) crossed with -std=c++03 and -std=c++11.
@ -723,13 +723,13 @@ if [ "$HAVE_CXX03" -ne "0" ] && [ "$IS_DARWIN" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 -stdlib=libc++ $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 -stdlib=libc++ $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Darwin, c++03, libstdc++ # Darwin, c++03, libstdc++
@ -742,10 +742,15 @@ if [ "$HAVE_CXX03" -ne "0" ] && [ "$IS_DARWIN" -ne "0" ]; then
unset CXXFLAGS unset CXXFLAGS
"$MAKE" clean > /dev/null 2>&1 "$MAKE" clean > /dev/null 2>&1
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 -stdlib=libstdc++ $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 -stdlib=libstdc++ $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Darwin, c++11, libc++ # Darwin, c++11, libc++
@ -760,13 +765,13 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_CXX11" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 -stdlib=libc++ $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 -stdlib=libc++ $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Darwin, c++11, libstdc++ # Darwin, c++11, libstdc++
@ -781,13 +786,13 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_CXX11" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 -stdlib=libstdc++ $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 -stdlib=libstdc++ $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Darwin, Intel multiarch, c++03 # Darwin, Intel multiarch, c++03
@ -802,17 +807,18 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_INTEL_MULTIARCH" -ne "0" ] && [ "$HAVE_C
export CXXFLAGS="-DNDEBUG -g2 -O2 -arch i386 -arch x86_64 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -arch i386 -arch x86_64 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
echo "Running i386 version..." echo "Running i386 version..."
arch -i386 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" arch -i386 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
arch -i386 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" arch -i386 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
echo "Running x86_64 version..." echo "Running x86_64 version..."
arch -x86_64 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" arch -x86_64 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
arch -x86_64 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" arch -x86_64 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Darwin, Intel multiarch, c++11 # Darwin, Intel multiarch, c++11
@ -827,17 +833,18 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_INTEL_MULTIARCH" -ne "0" ] && [ "$HAVE_C
export CXXFLAGS="-DNDEBUG -g2 -O2 -arch i386 -arch x86_64 -std=c++11 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -arch i386 -arch x86_64 -std=c++11 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
echo "Running i386 version..." echo "Running i386 version..."
arch -i386 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" arch -i386 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
arch -i386 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" arch -i386 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
echo "Running x86_64 version..." echo "Running x86_64 version..."
arch -x86_64 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" arch -x86_64 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
arch -x86_64 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" arch -x86_64 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Darwin, PowerPC multiarch # Darwin, PowerPC multiarch
@ -852,17 +859,18 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_PPC_MULTIARCH" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -arch ppc -arch ppc64 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -arch ppc -arch ppc64 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
echo "Running PPC version..." echo "Running PPC version..."
arch -ppc ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" arch -ppc ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
arch -ppc ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" arch -ppc ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
echo "Running PPC64 version..." echo "Running PPC64 version..."
arch -ppc64 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" arch -ppc64 ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
arch -ppc64 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" arch -ppc64 ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Darwin, c++03, Malloc Guards # Darwin, c++03, Malloc Guards
@ -877,10 +885,9 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_CXX03" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
export MallocScribble=1 export MallocScribble=1
export MallocPreScribble=1 export MallocPreScribble=1
export MallocGuardEdges=1 export MallocGuardEdges=1
@ -888,6 +895,7 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_CXX03" -ne "0" ]; then
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
unset MallocScribble MallocPreScribble MallocGuardEdges unset MallocScribble MallocPreScribble MallocGuardEdges
fi fi
fi
############################################ ############################################
# Darwin, c++11, Malloc Guards # Darwin, c++11, Malloc Guards
@ -902,10 +910,9 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_CXX11" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
export MallocScribble=1 export MallocScribble=1
export MallocPreScribble=1 export MallocPreScribble=1
export MallocGuardEdges=1 export MallocGuardEdges=1
@ -913,6 +920,7 @@ if [ "$IS_DARWIN" -ne "0" ] && [ "$HAVE_CXX11" -ne "0" ]; then
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
unset MallocScribble MallocPreScribble MallocGuardEdges unset MallocScribble MallocPreScribble MallocGuardEdges
fi fi
fi
############################################ ############################################
# Xcode compiler # Xcode compiler
@ -934,14 +942,14 @@ if [ "$IS_DARWIN" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi fi
fi
############################################ ############################################
# Benchmarks, c++03 # Benchmarks, c++03
@ -956,12 +964,12 @@ if [ "$HAVE_CXX03" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -O3 -std=c++03 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -O3 -std=c++03 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe b 1 2.4+1e9 2>&1 | tee -a "$BENCHMARK_RESULTS" ./cryptest.exe b 1 2.4+1e9 2>&1 | tee -a "$BENCHMARK_RESULTS"
fi fi
fi
############################################ ############################################
# Benchmarks, c++11 # Benchmarks, c++11
@ -976,12 +984,12 @@ if [ "$HAVE_CXX11" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -O3 -std=c++11 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -O3 -std=c++11 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe b 1 2.4+1e9 2>&1 | tee -a "$BENCHMARK_RESULTS" ./cryptest.exe b 1 2.4+1e9 2>&1 | tee -a "$BENCHMARK_RESULTS"
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
# and PREFER_WINDOWS_STYLE_SOCKETS # and PREFER_WINDOWS_STYLE_SOCKETS
@ -999,13 +1007,13 @@ if [ "$IS_MINGW" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -DPREFER_BERKELEY_STYLE_SOCKETS -DNO_WINDOWS_STYLE_SOCKETS $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -DPREFER_BERKELEY_STYLE_SOCKETS -DNO_WINDOWS_STYLE_SOCKETS $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# MinGW and PREFER_WINDOWS_STYLE_SOCKETS # MinGW and PREFER_WINDOWS_STYLE_SOCKETS
@ -1020,13 +1028,13 @@ if [ "$IS_MINGW" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -g2 -O2 -DPREFER_WINDOWS_STYLE_SOCKETS -DNO_BERKELEY_STYLE_SOCKETS $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -g2 -O2 -DPREFER_WINDOWS_STYLE_SOCKETS -DNO_BERKELEY_STYLE_SOCKETS $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Valgrind, c++03. Requires -O1 for accurate results # Valgrind, c++03. Requires -O1 for accurate results
@ -1041,13 +1049,13 @@ if [ "$HAVE_CXX03" -ne "0" ] && [ "$HAVE_VALGRIND" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -std=c++03 -g3 -O1 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -std=c++03 -g3 -O1 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
valgrind --track-origins=yes ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" valgrind --track-origins=yes ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
valgrind --track-origins=yes ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" valgrind --track-origins=yes ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
# Valgrind, c++11. Requires -O1 for accurate results # Valgrind, c++11. Requires -O1 for accurate results
@ -1062,13 +1070,13 @@ if [ "$HAVE_VALGRIND" -ne "0" ] && [ "$HAVE_CXX11" -ne "0" ]; then
export CXXFLAGS="-DNDEBUG -std=c++11 -g3 -O1 $ADD_CXXFLAGS" export CXXFLAGS="-DNDEBUG -std=c++11 -g3 -O1 $ADD_CXXFLAGS"
"$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
valgrind --track-origins=yes ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" valgrind --track-origins=yes ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
valgrind --track-origins=yes ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" valgrind --track-origins=yes ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi
############################################ ############################################
@ -1086,7 +1094,7 @@ if [ "$CXX" == "g++" ] && [ "$HAVE_CXX11" -ne "0" ]; then
export CXXFLAGS="-DDEBUG -g2 -O2 -std=c++11 -DCRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562 -Wall -Wextra -Wno-unknown-pragmas -Wstrict-aliasing=3 -Wstrict-overflow -Waggressive-loop-optimizations" export CXXFLAGS="-DDEBUG -g2 -O2 -std=c++11 -DCRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562 -Wall -Wextra -Wno-unknown-pragmas -Wstrict-aliasing=3 -Wstrict-overflow -Waggressive-loop-optimizations"
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$WARN_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$WARN_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi fi
@ -1128,14 +1136,14 @@ if [ "$CXX" == "g++" ]; then
"$MAKE" clean > /dev/null 2>&1 "$MAKE" clean > /dev/null 2>&1
"$MAKE" CXX="$CLANG_COMPILER" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" CXX="$CLANG_COMPILER" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
fi fi
fi fi
fi
############################################ ############################################
@ -1152,10 +1160,9 @@ rm -rf /tmp/cryptopp_test/ > /dev/null 2>&1
export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_DATA_DIR='\"/tmp/cryptopp_test/share/\"' " export CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_DATA_DIR='\"/tmp/cryptopp_test/share/\"' "
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" "$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [ "$?" -ne "0" ]; then if [ "${PIPESTATUS[0]}" -ne "0" ]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
fi else
# Still need to manulally place TestData and TestVectors # Still need to manulally place TestData and TestVectors
mkdir -p /tmp/cryptopp_test/share/TestData /tmp/cryptopp_test/share/TestVectors mkdir -p /tmp/cryptopp_test/share/TestData /tmp/cryptopp_test/share/TestVectors
cp -r TestData /tmp/cryptopp_test/share/ cp -r TestData /tmp/cryptopp_test/share/
@ -1190,6 +1197,7 @@ echo
./cryptest.exe h 2>&1 | tee -a "$BENCHMARK_RESULTS" ./cryptest.exe h 2>&1 | tee -a "$BENCHMARK_RESULTS"
cd "$OLD_DIR" cd "$OLD_DIR"
fi
############################################ ############################################
############################################ ############################################