Add Exception to error counts
parent
be4cc91a63
commit
69b141efa8
60
cryptest.sh
60
cryptest.sh
|
|
@ -949,6 +949,33 @@ else
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
############################################
|
||||||
|
# Release build
|
||||||
|
echo
|
||||||
|
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||||
|
echo "Testing: release, default CXXFLAGS" | tee -a "$TEST_RESULTS"
|
||||||
|
echo
|
||||||
|
|
||||||
|
"$MAKE" clean > /dev/null 2>&1
|
||||||
|
rm -f adhoc.cpp > /dev/null 2>&1
|
||||||
|
|
||||||
|
CXXFLAGS="$RELEASE_CXXFLAGS ${DEPRECATED_CXXFLAGS[@]}"
|
||||||
|
CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic 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"
|
||||||
|
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
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# Debug build, platform defines
|
# Debug build, platform defines
|
||||||
if [[ ("${#PLATFORM_CXXFLAGS[@]}" -ne "0") ]]; then
|
if [[ ("${#PLATFORM_CXXFLAGS[@]}" -ne "0") ]]; then
|
||||||
|
|
@ -978,33 +1005,6 @@ if [[ ("${#PLATFORM_CXXFLAGS[@]}" -ne "0") ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
############################################
|
|
||||||
# Release build
|
|
||||||
echo
|
|
||||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
|
||||||
echo "Testing: release, default CXXFLAGS" | tee -a "$TEST_RESULTS"
|
|
||||||
echo
|
|
||||||
|
|
||||||
"$MAKE" clean > /dev/null 2>&1
|
|
||||||
rm -f adhoc.cpp > /dev/null 2>&1
|
|
||||||
|
|
||||||
CXXFLAGS="$RELEASE_CXXFLAGS ${DEPRECATED_CXXFLAGS[@]}"
|
|
||||||
CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic 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"
|
|
||||||
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
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# Release build, platform defines
|
# Release build, platform defines
|
||||||
if [[ ("${#PLATFORM_CXXFLAGS[@]}" -ne "0") ]]; then
|
if [[ ("${#PLATFORM_CXXFLAGS[@]}" -ne "0") ]]; then
|
||||||
|
|
@ -4345,18 +4345,18 @@ echo
|
||||||
echo "************************************************" | tee -a "$TEST_RESULTS"
|
echo "************************************************" | tee -a "$TEST_RESULTS"
|
||||||
echo | tee -a "$TEST_RESULTS"
|
echo | tee -a "$TEST_RESULTS"
|
||||||
|
|
||||||
# "FAILED" is from Crypto++
|
# "FAILED" and "Exception" are from Crypto++
|
||||||
# "ERROR" is from this script
|
# "ERROR" is from this script
|
||||||
# "Error" is from the GNU assembler
|
# "Error" is from the GNU assembler
|
||||||
# "error" is from the sanitizers
|
# "error" is from the sanitizers
|
||||||
# "Illegal", "Conditional", "0 errors" and "suppressed errors" are from Valgrind.
|
# "Illegal", "Conditional", "0 errors" and "suppressed errors" are from Valgrind.
|
||||||
ECOUNT=$("$EGREP" '(Error|ERROR|error|FAILED|Illegal|Conditional)' $TEST_RESULTS | "$EGREP" -v '( 0 errors|suppressed errors|error detector)' | wc -l | "$AWK" '{print $1}')
|
ECOUNT=$("$EGREP" '(Error|ERROR|error|FAILED|Illegal|Conditional|Exception)' $TEST_RESULTS | "$EGREP" -v '( 0 errors|suppressed errors|error detector)' | wc -l | "$AWK" '{print $1}')
|
||||||
if (( "$ECOUNT" == "0" )); then
|
if (( "$ECOUNT" == "0" )); then
|
||||||
echo "No failures detected" | tee -a "$TEST_RESULTS"
|
echo "No failures detected" | tee -a "$TEST_RESULTS"
|
||||||
else
|
else
|
||||||
echo "$ECOUNT errors detected. See $TEST_RESULTS for details" | tee -a "$TEST_RESULTS"
|
echo "$ECOUNT errors detected. See $TEST_RESULTS for details" | tee -a "$TEST_RESULTS"
|
||||||
if (( "$ECOUNT" < 16 )); then
|
if (( "$ECOUNT" < 16 )); then
|
||||||
"$EGREP" -n '(Error|ERROR|error|FAILED|Illegal)' "$TEST_RESULTS" | "$EGREP" -v '( 0 errors|suppressed errors|error detector)'
|
"$EGREP" -n '(Error|ERROR|error|FAILED|Illegal|Conditional|Exception)' "$TEST_RESULTS" | "$EGREP" -v '( 0 errors|suppressed errors|error detector)'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue