Unverified Commit 03abe768 authored by Ge Jun's avatar Ge Jun Committed by GitHub

Merge pull request #939 from zyearn/fix_core_name

remove core before running test
parents 40fd868f e8d1b1ab
......@@ -17,6 +17,10 @@ env:
before_script:
- ulimit -c unlimited -S # enable core dumps
# The real command should be put into another "bash -c" otherwise it
# would cause a permission issue. The reason may be that the 'sudo'
# only promote the 'echo' part but not the whole command.
- sudo bash -c "echo 'core.%e.%p' > /proc/sys/kernel/core_pattern"
before_install:
- wget --no-clobber https://github.com/bazelbuild/bazel/releases/download/0.25.1/bazel_0.25.1-linux-x86_64.deb && sudo dpkg -i bazel_0.25.1-linux-x86_64.deb
......
......@@ -40,6 +40,7 @@ print_bt () {
# find newest core file
COREFILE=$(find . -name "core*" -type f -printf "%T@ %p\n" | sort -k 1 -n | cut -d' ' -f 2- | tail -n 1)
if [ ! -z "$COREFILE" ]; then
>&2 echo "corefile=$COREFILE prog=$1"
gdb -c "$COREFILE" $1 -ex "thread apply all bt" -ex "set pagination 0" -batch;
fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment