all.sh/components: Moved build_aes_via_padlock to platform component.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
diff --git a/tests/scripts/components-platform.sh b/tests/scripts/components-platform.sh
index 8987191..b104428 100644
--- a/tests/scripts/components-platform.sh
+++ b/tests/scripts/components-platform.sh
@@ -494,3 +494,21 @@
armc6_cc="$ARMC6_BIN_DIR/armclang"
(check_tools "$armc5_cc" "$armc6_cc" > /dev/null 2>&1)
}
+
+# For timebeing, no VIA Padlock platform available.
+component_build_aes_via_padlock () {
+
+ msg "AES:VIA PadLock, build with default configuration."
+ scripts/config.py unset MBEDTLS_AESNI_C
+ scripts/config.py set MBEDTLS_PADLOCK_C
+ scripts/config.py unset MBEDTLS_AES_USE_HARDWARE_ONLY
+ make CC=gcc CFLAGS="$ASAN_CFLAGS -m32" LDFLAGS="-m32 $ASAN_CFLAGS"
+ grep -q mbedtls_padlock_has_support ./programs/test/selftest
+
+}
+
+support_build_aes_via_padlock_only () {
+ ( [ "$MBEDTLS_TEST_PLATFORM" == "Linux-x86_64" ] || \
+ [ "$MBEDTLS_TEST_PLATFORM" == "Linux-amd64" ] ) && \
+ [ "`dpkg --print-foreign-architectures`" == "i386" ]
+}