add script that asserts on expected symbols
This commit is contained in:
parent
f32f3b34ae
commit
5e06dfb50b
2 changed files with 32 additions and 3 deletions
|
@ -106,15 +106,13 @@ script:
|
|||
# (and might work) for the next build
|
||||
- DURATION=2400
|
||||
- scripts/travis-command-wrapper.py -s "date" -i 120 --deadline=$(( $(date +%s) + ${DURATION} )) make
|
||||
# dump glibcxx symbols >= 3.4.20 (if this returns output
|
||||
# then it means the binaries will not run on ubuntu trusty without upgrading libstdc++)
|
||||
- nm src/libmapnik* | grep "GLIBCXX_3.4.2[0-9]" || true
|
||||
- RESULT=0
|
||||
- make test || RESULT=$?
|
||||
# we allow visual failures with g++ for now: https://github.com/mapnik/mapnik/issues/3567
|
||||
- if [[ ${RESULT} != 0 ]] && [[ ${CXX} =~ 'clang++' ]]; then false; fi;
|
||||
- enabled ${COVERAGE} coverage
|
||||
- enabled ${BENCH} make bench
|
||||
- ./scripts/check_glibcxx.sh
|
||||
|
||||
after_success:
|
||||
- enabled ${TRIGGER} trigger_downstream
|
||||
|
|
31
scripts/check_glibcxx.sh
Executable file
31
scripts/check_glibcxx.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
: '
|
||||
|
||||
Ensure no GLIBCXX_3.4.2x symbols are present in the binary
|
||||
if ENABLE_GLIBC_WORKAROUND is set.
|
||||
|
||||
If symbols >= 3.4.20 then it means the binaries would not run on ubuntu trusty without upgrading libstdc++
|
||||
|
||||
'
|
||||
function check() {
|
||||
local RESULT=0
|
||||
nm ${1} | grep "GLIBCXX_3.4.2[0-9]" > /tmp/out.txt || RESULT=$?
|
||||
if [[ ${RESULT} != 0 ]]; then
|
||||
echo "Success: GLIBCXX_3.4.2[0-9] symbols not present in binary (as expected)"
|
||||
else
|
||||
echo "$(cat /tmp/out.txt | c++filt)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ ${ENABLE_GLIBC_WORKAROUND:-false} == true ]]; then
|
||||
for i in src/libmapnik*; do
|
||||
echo "checking $i"
|
||||
check $i
|
||||
done
|
||||
fi
|
Loading…
Reference in a new issue