mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 10:11:29 +08:00
This patch adds collecting coredumps to the regression workflow in addition to the binary all shared libraries used by the coredump are collected as well.
21 lines
430 B
Bash
Executable File
21 lines
430 B
Bash
Executable File
#!/bin/bash
|
|
|
|
TARGET=coredumps
|
|
COREDUMP_DIR=/var/lib/systemd/coredump
|
|
|
|
set -e
|
|
|
|
mkdir -p "$TARGET"
|
|
|
|
# get information from gdb
|
|
info=$(echo "info sharedlibrary" | coredumpctl gdb)
|
|
|
|
executable=$(echo "$info" | grep Executable | sed -e 's!^[^/]\+!!')
|
|
|
|
cp "$executable" "$TARGET"
|
|
cp ${COREDUMP_DIR}/* "$TARGET"
|
|
|
|
# copy libraries extracted from gdb info
|
|
echo "$info" | grep '^0x' | sed -e 's!^[^/]\+!!' | xargs -ILIB cp "LIB" "$TARGET"
|
|
|