Merge branch 'master' into hmqv
commit
3310e2e0ec
71
cryptest.sh
71
cryptest.sh
|
|
@ -432,6 +432,36 @@ if [[ (-z "$HAVE_UBSAN") ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
rm -f "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||
if [[ (-z "$HAVE_OMP") ]]; then
|
||||
HAVE_OMP=0
|
||||
if [[ "$GCC_COMPILER" -ne "0" ]]; then
|
||||
"$CXX" -DCRYPTOPP_ADHOC_MAIN -fopenmp -O3 adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||
if [[ "$?" -eq "0" ]]; then
|
||||
HAVE_OMP=1
|
||||
OMP_FLAGS=(-fopenmp -O3)
|
||||
fi
|
||||
elif [[ "$INTEL_COMPILER" -ne "0" ]]; then
|
||||
"$CXX" -DCRYPTOPP_ADHOC_MAIN -openmp -O3 adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||
if [[ "$?" -eq "0" ]]; then
|
||||
HAVE_OMP=1
|
||||
OMP_FLAGS=(-openmp -O3)
|
||||
fi
|
||||
elif [[ "$CLANG_COMPILER" -ne "0" ]]; then
|
||||
"$CXX" -DCRYPTOPP_ADHOC_MAIN -fopenmp=libomp -O3 adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||
if [[ "$?" -eq "0" ]]; then
|
||||
HAVE_OMP=1
|
||||
OMP_FLAGS=(-fopenmp=libomp -O3)
|
||||
fi
|
||||
elif [[ "$SUN_COMPILER" -ne "0" ]]; then
|
||||
"$CXX" -DCRYPTOPP_ADHOC_MAIN -xopenmp=parallel -xO3 adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||
if [[ "$?" -eq "0" ]]; then
|
||||
HAVE_OMP=1
|
||||
OMP_FLAGS=(-xopenmp=parallel -xO3)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||
if [[ (-z "$HAVE_ASAN") ]]; then
|
||||
HAVE_ASAN=0
|
||||
|
|
@ -735,6 +765,7 @@ fi
|
|||
|
||||
# Tools available for testing
|
||||
echo | tee -a "$TEST_RESULTS"
|
||||
if [[ ((! -z "$HAVE_OMP") && ("$HAVE_OMP" -ne "0")) ]]; then echo "HAVE_OMP: $HAVE_OMP" | tee -a "$TEST_RESULTS"; fi
|
||||
echo "HAVE_ASAN: $HAVE_ASAN" | tee -a "$TEST_RESULTS"
|
||||
if [[ ("$HAVE_ASAN" -ne "0") && (! -z "$ASAN_SYMBOLIZE") ]]; then echo "ASAN_SYMBOLIZE: $ASAN_SYMBOLIZE" | tee -a "$TEST_RESULTS"; fi
|
||||
echo "HAVE_UBSAN: $HAVE_UBSAN" | tee -a "$TEST_RESULTS"
|
||||
|
|
@ -2343,8 +2374,11 @@ if [[ "$HAVE_OFAST" -ne "0" ]]; then
|
|||
fi
|
||||
|
||||
############################################
|
||||
# Debug build, dead code strip
|
||||
# Dead code stripping
|
||||
if [[ ("$SUN_COMPILER" -eq "0") ]]; then
|
||||
|
||||
############################################
|
||||
# Debug build
|
||||
echo
|
||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||
echo "Testing: Debug, dead code strip" | tee -a "$TEST_RESULTS"
|
||||
|
|
@ -2368,11 +2402,9 @@ if [[ ("$SUN_COMPILER" -eq "0") ]]; then
|
|||
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
############################################
|
||||
# Release build, dead code strip
|
||||
if [[ ("$SUN_COMPILER" -eq "0") ]]; then
|
||||
############################################
|
||||
# Release build
|
||||
echo
|
||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||
echo "Testing: Release, dead code strip" | tee -a "$TEST_RESULTS"
|
||||
|
|
@ -2398,6 +2430,34 @@ if [[ ("$SUN_COMPILER" -eq "0") ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
############################################
|
||||
# OpenMP
|
||||
if [[ ("$HAVE_OMP" -ne "0") ]]; then
|
||||
echo
|
||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||
echo "Testing: Release, OpenMP" | tee -a "$TEST_RESULTS"
|
||||
echo
|
||||
|
||||
"$MAKE" clean > /dev/null 2>&1
|
||||
rm -f adhoc.cpp > /dev/null 2>&1
|
||||
|
||||
CXXFLAGS="-DNDEBUG ${OMP_FLAGS[@]} ${PLATFORM_CXXFLAGS[@]} $USER_CXXFLAGS ${DEPRECATED_CXXFLAGS[@]}"
|
||||
CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" | 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"
|
||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
||||
fi
|
||||
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
############################################
|
||||
# Debug build, UBSan, c++03
|
||||
if [[ ("$HAVE_CXX03" -ne "0" && "$HAVE_UBSAN" -ne "0") ]]; then
|
||||
|
|
@ -2490,6 +2550,7 @@ if [[ ("$HAVE_CXX03" -ne "0" && "$HAVE_ASAN" -ne "0") ]]; then
|
|||
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue