diff --git a/TestScripts/cryptest-ios.sh b/TestScripts/cryptest-ios.sh index 5b462402..bda4d8a6 100755 --- a/TestScripts/cryptest-ios.sh +++ b/TestScripts/cryptest-ios.sh @@ -83,6 +83,46 @@ do # run in subshell to not keep any envars ( source ./setenv-ios.sh + + if [[ "${cpu}" == "arm64" ]] + then + + # Test AES code generation + if make -f GNUmakefile-cross rijndael_simd.o + then + count=$(otool -tV rijndael_simd.o 2>&1 | grep -i -c -E 'aese|aesd|aesmc|aesimc') + if [[ "${count}" -gt 0 ]] + then + echo "${platform} : AES ==> SUCCESS" >> "${TMPDIR}/build.log" + else + echo "${platform} : AES ==> FAILURE" >> "${TMPDIR}/build.log" + touch "${TMPDIR}/build.failed" + fi + fi + + # Test SHA1 and SHA2 code generation + if make -f GNUmakefile-cross sha_simd.o + then + count=$(otool -tV sha_simd.o 2>&1 | grep -i -c -E 'sha1c|sha1m|sha1p|sha1h|sha1su0|sha1su1') + if [[ "${count}" -gt 0 ]] + then + echo "${platform} : SHA1 ==> SUCCESS" >> "${TMPDIR}/build.log" + else + echo "${platform} : SHA1 ==> FAILURE" >> "${TMPDIR}/build.log" + touch "${TMPDIR}/build.failed" + fi + + count=$(otool -tV sha_simd.o | grep -i -c -E 'sha256h|sha256su0|sha256su1') + if [[ "${count}" -gt 0 ]] + then + echo "${platform} : SHA2 ==> SUCCESS" >> "${TMPDIR}/build.log" + else + echo "${platform} : SHA2 ==> FAILURE" >> "${TMPDIR}/build.log" + touch "${TMPDIR}/build.failed" + fi + fi + fi + if make -k -j "${MAKE_JOBS}" -f GNUmakefile-cross static dynamic cryptest.exe; then echo "${platform} ==> SUCCESS" >> "${TMPDIR}/build.log"