Add accelerator only tests.
The cases with runtime detection have been
covered by `full` configuration
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/.travis.yml b/.travis.yml
index bf5ccd9..7ed130a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -129,6 +129,31 @@
- tests/scripts/travis-log-failure.sh
- tests/context-info.sh
+ - name: Arm64 accelerators tests on arm64 host
+ os: linux
+ dist: focal
+ arch: arm64
+ addons:
+ apt:
+ packages:
+ - gcc
+ script:
+ # Do a manual build+test sequence rather than using all.sh.
+ #
+ # This is arm64 host only test for no runtime detection case. Internal
+ # and Open CI do not include Arm64 host, and they check if components
+ # are be tested. As result, it will always fail on `pre-test-check` in
+ # them.
+ - scripts/config.py unset MBEDTLS_AESNI_C
+ - scripts/config.py unset MBEDTLS_PADLOCK_C
+ - scripts/config.py set MBEDTLS_AESCE_C
+ - scripts/config.py set MBEDTLS_AES_HAS_NO_BUILTIN
+ - make generated_files
+ - make
+ - programs/test/selftest
+ - tests/scripts/travis-log-failure.sh
+ - tests/context-info.sh
+
after_failure:
- tests/scripts/travis-log-failure.sh
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index 97c01f3..8dd6b8c 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -4941,6 +4941,43 @@
python3 -m unittest tests/scripts/translate_ciphers.py 2>&1
}
+component_test_aes_builtin_only () {
+ msg "Test: AES builtin only"
+ scripts/config.py unset MBEDTLS_AESNI_C
+ scripts/config.py unset MBEDTLS_PADLOCK_C
+ scripts/config.py unset MBEDTLS_AESCE_C
+ scripts/config.py unset MBEDTLS_AES_HAS_NO_BUILTIN
+ msg "build: make, AES built-in only" # ~10s
+ make
+
+ msg "selftest: AES built-in only" # ~10s
+ programs/test/selftest
+}
+
+component_test_aes_aesni_only () {
+ msg "Test: AESNI only"
+ scripts/config.py set MBEDTLS_AESNI_C
+ scripts/config.py unset MBEDTLS_PADLOCK_C
+ scripts/config.py unset MBEDTLS_AESCE_C
+ scripts/config.py set MBEDTLS_AES_HAS_NO_BUILTIN
+ msg "build: AESNI only" # ~10s
+ make
+
+ msg "selftest: AESNI only" # ~10s
+ programs/test/selftest
+}
+
+component_test_aes_padlock_only () {
+ msg "Test: AES, VIA padlock only"
+ scripts/config.py unset MBEDTLS_AESNI_C
+ scripts/config.py set MBEDTLS_PADLOCK_C
+ scripts/config.py unset MBEDTLS_AESCE_C
+ scripts/config.py set MBEDTLS_AES_HAS_NO_BUILTIN
+ msg "build: AES, VIA padlock only" # ~10s
+ make CC=gcc CFLAGS="$ASAN_CFLAGS -m32 -O2" LDFLAGS="-m32 $ASAN_CFLAGS"
+
+}
+
################################################################
#### Termination
################################################################