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

Enable coredumps on travis-ci #703

Merged
merged 2 commits into from Jun 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions .travis.yml
Expand Up @@ -27,6 +27,9 @@ addons:
- aspell
- aspell-en
- ccache
- apport # for coredumps
- gdb

coverity_scan:
project:
name: "grondo/flux-core"
Expand Down Expand Up @@ -64,9 +67,7 @@ before_install:
- echo '#error Non-build-tree flux/core.h!' > $HOME/local/include/flux/core.h

script:
- export LD_PRELOAD=libSegFault.so
- export SEGFAULT_USE_ALTSTACK=1
- export LIBC_FATAL_STDERR_=1
- ulimit -c unlimited
- export CC="ccache $CC"
- export MAKECMDS="make distcheck"
# Ensure travis builds libev such that libfaketime will work:
Expand Down Expand Up @@ -97,3 +98,4 @@ after_success:
after_failure:
- find . -name t[0-9]*.output | xargs -i sh -c 'printf "\033[31mFound {}\033[39m\n";cat {}'
- find . -name *.broker.log | xargs -i sh -c 'printf "\033[31mFound {}\033[39m\n";cat {}'
- src/test/backtrace-all.sh
18 changes: 18 additions & 0 deletions src/test/backtrace-all.sh
@@ -0,0 +1,18 @@
#!/bin/sh
#
# Find all possible core files under current directory. Attempt
# to determine exe using file(1) and dump stack trace with gdb.
#
say () { printf "\033[91m%s\033[39m\n" "$@" >&2; }
die () { say "$@"; exit 1; }

find . -name *.core -o -name core | while read -r line; do
d=$(dirname $line)
f=$(basename $line)
exe=$(file $line | sed "s/.*from '\([^ \t]*\).*'.*/\1/")
( cd $d &&
test -x $exe || die "Failed to find executable at $exe" &&
say "Found corefile for $exe" &&
gdb --batch --quiet -ex "thread apply all bt full" $exe $f
)
done