Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix symbol checking test when compiled with debug symbols (backport #1474) #1476

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions test/integration/all_symbols_have_version.bash.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ LIBPATH=$1
VERSIONED_NS=v@PROJECT_VERSION_MAJOR@

# Sanity check - there should be at least one symbol
NUM_SYMBOLS=$(nm $LIBPATH | grep -e "sdf" | wc -l)

# nm options:
# -D to get only dynamic symbols exported
# 3 before the sdf is <length, id> used by
# mangled symbols in C++ to check for the
# sdf namespace
NUM_SYMBOLS=$(nm -D $LIBPATH | grep -e "3sdf" | wc -l)

if [ $NUM_SYMBOLS -eq 0 ]
then
Expand All @@ -13,7 +19,7 @@ then
fi

# There must be no unversioned symbols
UNVERSIONED_SYMBOLS=$(nm $LIBPATH | grep -e "sdf" | grep -e "$VERSIONED_NS" -v)
UNVERSIONED_SYMBOLS=$(nm -D $LIBPATH | grep -e "3sdf" | grep -e "$VERSIONED_NS" -v)
UNVERSIONED_SYMBOL_CHARS=$(printf "$UNVERSIONED_SYMBOLS" | wc -m)

if [ $UNVERSIONED_SYMBOL_CHARS -ne 0 ]
Expand Down
Loading