diff --git a/tests/scripts/components-build-system.sh b/tests/scripts/components-build-system.sh index 3333b51e5d..2074952ac2 100644 --- a/tests/scripts/components-build-system.sh +++ b/tests/scripts/components-build-system.sh @@ -240,20 +240,15 @@ component_test_cmake_install_with_destdir () { [ -L "$install_lib_path/lib${lib}.so" ] [ -e "$install_lib_path/lib${lib}.so" ] - # do not assume a fixed match ordering. - versioned=( "$install_lib_path/lib${lib}.so".* ) + # Match ABI-version names such as libxxx.so.17 + # and check that symlink. + versioned=( "$install_lib_path/lib${lib}.so".+([0-9]) ) if [ "$QUIET" -eq 0 ]; then declare -p versioned fi - versioned_symlink= - for candidate in "${versioned[@]}"; do - if [ -L "$candidate" ]; then - versioned_symlink="$candidate" - break - fi - done - [ -n "$versioned_symlink" ] - [ -e "$versioned_symlink" ] + [ "${#versioned[@]}" -eq 1 ] + [ -L "${versioned[0]}" ] + [ -e "${versioned[0]}" ] done fi }