mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-12 13:58:35 -04:00
scripts/run_tests.sh: test for correct symbol prefixes
This commit is contained in:
parent
3a378845c4
commit
3b12acdf32
@ -182,6 +182,20 @@ do_run_tests() {
|
||||
gzip_tests "$@"
|
||||
}
|
||||
|
||||
check_symbol_prefixes() {
|
||||
log "Checking that all global symbols are prefixed with \"libdeflate_\""
|
||||
$MAKE libdeflate.a
|
||||
if nm libdeflate.a | grep ' T ' | grep -E -v " _?libdeflate_"; then
|
||||
fail "Some global symbols aren't prefixed with \"libdeflate_\""
|
||||
fi
|
||||
log "Checking that all exported symbols are prefixed with \"libdeflate\""
|
||||
$MAKE libdeflate.so
|
||||
if nm libdeflate.so | grep ' T ' \
|
||||
| grep -E -v " (libdeflate_|_init\>|_fini\>)"; then
|
||||
fail "Some exported symbols aren't prefixed with \"libdeflate_\""
|
||||
fi
|
||||
}
|
||||
|
||||
install_uninstall_tests() {
|
||||
local shell
|
||||
|
||||
@ -237,6 +251,7 @@ run_tests() {
|
||||
fi
|
||||
|
||||
install_uninstall_tests
|
||||
check_symbol_prefixes
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user