diff options
author | Andrzej Kurek <andrzej.kurek@mobica.com> | 2019-02-14 04:07:51 -0500 |
---|---|---|
committer | Andrzej Kurek <andrzej.kurek@mobica.com> | 2019-02-14 04:07:51 -0500 |
commit | 4d3e710d05e19ce104d7abd53dd438724192b207 (patch) | |
tree | e6de0ad8fc8dc3c7483e81f314b82ff945e68c16 | |
parent | ccbff2a5226c8ffb6475e66dbfb72fbcd5375717 (diff) | |
download | mbedtls-archive/psa-all-sh-fixes.zip mbedtls-archive/psa-all-sh-fixes.tar.gz mbedtls-archive/psa-all-sh-fixes.tar.bz2 |
all.sh - add an "objdump must not have" option to objdump_must_containarchive/psa-all-sh-fixes
-rwxr-xr-x | tests/scripts/all.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 2b7f2cd..98d71fd 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -300,8 +300,10 @@ check_tools() done } +# objdump_must_contain OBJECT_FILE MANDATORY_RE [MATCHING_LINES_MUST_NOT_INCLUDE] objdump_must_contain () { - objdump -g "$1" | grep -E "$2" + objdump -g "$1" | grep -E "$2" | + if [ -n "$3" ]; then ! grep -q -E "$3"; else cat; fi } check_headers_in_cpp () { @@ -828,7 +830,7 @@ component_test_not_submodule_make () { msg "test: submodule libmbedcrypto wasn't built (USE_CRYPTO_SUBMODULE, make)" if_build_succeeded not test -f crypto/library/libmbedcrypto.a msg "test: libmbedcrypto symbols are from library files (USE_CRYPTO_SUBMODULE, make)" - if_build_succeeded objdump -g library/libmbedcrypto.a | if_build_succeeded grep -E 'library$' | if_build_succeeded not grep 'crypto' > /dev/null + if_build_succeeded objdump_must_contain library/libmbedcrypto.a 'library$' 'crypto' } component_test_not_submodule_cmake () { @@ -840,7 +842,7 @@ component_test_not_submodule_cmake () { msg "test: submodule libmbedcrypto wasn't built (USE_CRYPTO_SUBMODULE, cmake)" if_build_succeeded not test -f crypto/library/libmbedcrypto.a msg "test: libmbedcrypto symbols are from library files (USE_CRYPTO_SUBMODULE, cmake)" - if_build_succeeded objdump -g library/libmbedcrypto.a | if_build_succeeded grep -E 'library$' | if_build_succeeded not grep 'crypto' > /dev/null + if_build_succeeded objdump_must_contain library/libmbedcrypto.a 'library$' 'crypto' } component_test_use_psa_crypto_full_cmake_asan() { |