mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-09-14 06:09:57 +00:00
test: reorder if-else structure
Signed-off-by: Yi Wu <[email protected]>
This commit is contained in:
@@ -174,7 +174,14 @@ component_test_cmake_install_with_destdir () {
|
|||||||
|
|
||||||
install_lib_path="$OUT_OF_SOURCE_DIR/stage/usr/${install_lib_subdir}"
|
install_lib_path="$OUT_OF_SOURCE_DIR/stage/usr/${install_lib_subdir}"
|
||||||
|
|
||||||
if [[ "$OSTYPE" != darwin* ]]; then
|
if [[ "$OSTYPE" == darwin* ]]; then
|
||||||
|
# On macOS the custom install logic installs libmbedcrypto.dylib
|
||||||
|
# directly without a versioned symlink chain.
|
||||||
|
for lib in tfpsacrypto mbedcrypto mbedx509 mbedtls; do
|
||||||
|
[ -f "$install_lib_path/lib${lib}.a" ]
|
||||||
|
[ -e "$install_lib_path/lib${lib}.dylib" ]
|
||||||
|
done
|
||||||
|
else
|
||||||
# library/CMakeLists.txt installs libmbedcrypto.so with a versioned
|
# library/CMakeLists.txt installs libmbedcrypto.so with a versioned
|
||||||
# symlink chain on Linux.
|
# symlink chain on Linux.
|
||||||
for lib in tfpsacrypto mbedcrypto mbedx509 mbedtls; do
|
for lib in tfpsacrypto mbedcrypto mbedx509 mbedtls; do
|
||||||
@@ -188,19 +195,10 @@ component_test_cmake_install_with_destdir () {
|
|||||||
if [ "$QUIET" -eq 0 ]; then
|
if [ "$QUIET" -eq 0 ]; then
|
||||||
declare -p versioned
|
declare -p versioned
|
||||||
fi
|
fi
|
||||||
[ "${#versioned[@]}" -ge 1 ]
|
# [ "${#versioned[@]}" -ge 1 ]
|
||||||
# [ -L "${versioned[0]}" ]
|
[ -L "${versioned[0]}" ]
|
||||||
[ -e "${versioned[0]}" ]
|
[ -e "${versioned[0]}" ]
|
||||||
done
|
done
|
||||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
# On macOS the custom install logic installs libmbedcrypto.dylib
|
|
||||||
# directly without a versioned symlink chain.
|
|
||||||
for lib in tfpsacrypto mbedcrypto mbedx509 mbedtls; do
|
|
||||||
[ -f "$install_lib_path/lib${lib}.a" ]
|
|
||||||
[ -e "$install_lib_path/lib${lib}.dylib" ]
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "Unsupported platform for DESTDIR shared library checks"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user