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>
This commit is contained in:
Jerry Yu 2023-03-31 15:03:55 +08:00
parent 0d4f4e5b01
commit d767cc4106
2 changed files with 62 additions and 0 deletions

View File

@ -129,6 +129,31 @@ jobs:
- 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

View File

@ -4941,6 +4941,43 @@ component_check_test_helpers () {
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
################################################################