File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 68
68
CLUSTER_PATH=$( pwd) /test_cluster
69
69
$initdb_path -D $CLUSTER_PATH -U $USER -A trust
70
70
71
+ # enable core dumps and specify their path
72
+ ulimit -c unlimited -S
73
+ echo ' /tmp/%e-%s-%p.core' | sudo tee /proc/sys/kernel/core_pattern
74
+
71
75
# build jsquery (using CFLAGS_SL for gcov)
72
76
make USE_PGXS=1 PG_CONFIG=$config_path CFLAGS_SL=" $( $config_path --cflags_sl) -coverage"
73
77
sudo make install USE_PGXS=1 PG_CONFIG=$config_path
@@ -89,6 +93,13 @@ PGPORT=55435 PGUSER=$USER PG_CONFIG=$config_path make installcheck USE_PGXS=1 ||
89
93
# show diff if it exists
90
94
if test -f regression.diffs; then cat regression.diffs; fi
91
95
96
+ # check core dumps if any
97
+ for corefile in $( find /tmp/ -name ' *.core' 2> /dev/null) ; do
98
+ binary=$( gdb -quiet -core $corefile -batch -ex ' info auxv' | grep AT_EXECFN | perl -pe " s/^.*\" (.*)\"\$ /\$ 1/g" )
99
+ echo dumping $corefile for $binary
100
+ gdb --batch --quiet -ex " thread apply all bt full" -ex " quit" $binary $corefile
101
+ done
102
+
92
103
# generate *.gcov files
93
104
gcov * .c * .h
94
105
You can’t perform that action at this time.
0 commit comments