summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Bentley <prb@google.com>2023-10-09 15:36:47 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-09 15:36:47 +0000
commit967a6ec1db71972d1047834753bb0ec34e2e24ff (patch)
tree3605aa759a0f2c721b560d66c983520d7f035ec4
parenta2c3874d4a0b876a6d828d377bfb1194598178c8 (diff)
parent447dd2fa7a2cbc9f5149cf6a5dfe39515fa5ddb9 (diff)
downloadboringssl-967a6ec1db71972d1047834753bb0ec34e2e24ff.tar.gz
Add support for 32bit break tests on Android. am: 447dd2fa7a
Original change: https://android-review.googlesource.com/c/platform/external/boringssl/+/2778328 Change-Id: I028a3b4d9427ca967a8af6e0f74a8192dc9fc606 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp9
-rwxr-xr-xsrc/util/fipstools/break-tests.sh42
2 files changed, 35 insertions, 16 deletions
diff --git a/Android.bp b/Android.bp
index a7fceebe..95ea1822 100644
--- a/Android.bp
+++ b/Android.bp
@@ -689,6 +689,15 @@ cc_test {
cc_binary {
name: "test_fips",
host_supported: false,
+ compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "",
+ },
+ },
defaults: [
"boringssl_flags",
],
diff --git a/src/util/fipstools/break-tests.sh b/src/util/fipstools/break-tests.sh
index 44ca2305..736d0664 100755
--- a/src/util/fipstools/break-tests.sh
+++ b/src/util/fipstools/break-tests.sh
@@ -46,20 +46,24 @@ inferred_mode() {
fi
}
+MODE=`inferred_mode`
# Prefer mode from command line if present.
-case "$1" in
- local|device)
- MODE=$1
- ;;
-
- "")
- MODE=`inferred_mode`
- ;;
-
- *)
- usage
- ;;
-esac
+while [ "$1" ]; do
+ case "$1" in
+ local|device)
+ MODE=$1
+ ;;
+
+ "32")
+ TEST32BIT="true"
+ ;;
+
+ *)
+ usage
+ ;;
+ esac
+ shift
+done
check_directory() {
test -d "$1" || die "Directory $1 not found."
@@ -145,10 +149,16 @@ else # Device mode
test "$ANDROID_BUILD_TOP" || die "'lunch aosp_arm64-eng' first"
check_directory "$ANDROID_PRODUCT_OUT"
- TEST_FIPS_BIN="$ANDROID_PRODUCT_OUT/system/bin/test_fips"
+ if [ "$TEST32BIT" ]; then
+ TEST_FIPS_BIN="$ANDROID_PRODUCT_OUT/system/bin/test_fips32"
+ LIBCRYPTO_BIN="$ANDROID_PRODUCT_OUT/system/lib/libcrypto.so"
+ LIBCRYPTO_BREAK_BIN="$ANDROID_PRODUCT_OUT/system/lib/libcrypto_for_testing.so"
+ else
+ TEST_FIPS_BIN="$ANDROID_PRODUCT_OUT/system/bin/test_fips"
+ LIBCRYPTO_BIN="$ANDROID_PRODUCT_OUT/system/lib64/libcrypto.so"
+ LIBCRYPTO_BREAK_BIN="$ANDROID_PRODUCT_OUT/system/lib64/libcrypto_for_testing.so"
+ fi
check_file "$TEST_FIPS_BIN"
- LIBCRYPTO_BIN="$ANDROID_PRODUCT_OUT/system/lib64/libcrypto.so"
- LIBCRYPTO_BREAK_BIN="$ANDROID_PRODUCT_OUT/system/lib64/libcrypto_for_testing.so"
check_file "$LIBCRYPTO_BIN"
check_file "$LIBCRYPTO_BREAK_BIN"