Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8ee9409

Browse filesBrowse files
author
Alexander Korotkov
committed
Add travis output folding.
1 parent 954f6da commit 8ee9409
Copy full SHA for 8ee9409

File tree

1 file changed

+30
-11
lines changed
Filter options

1 file changed

+30
-11
lines changed

‎travis/pg-travis-test.sh

Copy file name to clipboardExpand all lines: travis/pg-travis-test.sh
+30-11Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -eux
44

5+
echo -en 'travis_fold:start:pg_install\\r' && echo 'PostgreSQL installation'
6+
57
sudo apt-get update
68

79
# bug: http://www.postgresql.org/message-id/20130508192711.GA9243@msgid.df7cb.de
@@ -46,16 +48,18 @@ config_path=$prefix/bin/pg_config
4648
# exit code
4749
status=0
4850

51+
echo -en 'travis_fold:end:pg_install\\r'
52+
4953
# perform code analysis if necessary
5054
if [ $CHECK_TYPE = "static" ]; then
55+
echo -en 'travis_fold:start:static_analysis\\r' && echo 'Static analysis'
5156

5257
if [ "$CC" = "clang" ]; then
5358
sudo apt-get -y install -qq clang-$LLVM_VER
5459

5560
scan-build-$LLVM_VER --status-bugs \
5661
-disable-checker deadcode.DeadStores \
5762
make USE_PGXS=1 USE_ASSERT_CHECKING=1 PG_CONFIG=$config_path || status=$?
58-
exit $status
5963

6064
elif [ "$CC" = "gcc" ]; then
6165
sudo apt-get -y install -qq cppcheck
@@ -71,22 +75,15 @@ if [ $CHECK_TYPE = "static" ]; then
7175
cat cppcheck.log
7276
status=1 # error
7377
fi
74-
75-
exit $status
7678
fi
7779

7880
# don't forget to "make clean"
7981
make clean USE_PGXS=1 PG_CONFIG=$config_path
82+
echo -en 'travis_fold:end:static_analysis\\r'
83+
exit $status
8084
fi
8185

82-
83-
# create cluster 'test'
84-
CLUSTER_PATH=$(pwd)/test_cluster
85-
$initdb_path -D $CLUSTER_PATH -U $USER -A trust
86-
87-
# enable core dumps and specify their path
88-
ulimit -c unlimited -S
89-
echo '/tmp/%e-%s-%p.core' | sudo tee /proc/sys/kernel/core_pattern
86+
echo -en 'travis_fold:start:build_extension\\r' && echo 'Build extension'
9087

9188
# build extension (using CFLAGS_SL for gcov)
9289
if [ $CHECK_TYPE == "valgrind" ]; then
@@ -101,9 +98,21 @@ fi
10198
status=$?
10299
if [ $status -ne 0 ]; then exit $status; fi
103100

101+
echo -en 'travis_fold:end:build_extension\\r'
102+
103+
echo -en 'travis_fold:start:run_tests\\r' && echo 'Run tests'
104+
105+
# enable core dumps and specify their path
106+
ulimit -c unlimited -S
107+
echo '/tmp/%e-%s-%p.core' | sudo tee /proc/sys/kernel/core_pattern
108+
104109
# set permission to write postgres locks
105110
sudo chown $USER /var/run/postgresql/
106111

112+
# create cluster 'test'
113+
CLUSTER_PATH=$(pwd)/test_cluster
114+
$initdb_path -D $CLUSTER_PATH -U $USER -A trust
115+
107116
# start cluster 'test'
108117
echo "port = 55435" >> $CLUSTER_PATH/postgresql.conf
109118
if [ $CHECK_TYPE = "valgrind" ]; then
@@ -122,6 +131,10 @@ PGPORT=55435 PGUSER=$USER PG_CONFIG=$config_path make installcheck USE_PGXS=1 ||
122131
# stop cluster
123132
$pg_ctl_path -D $CLUSTER_PATH stop -l postgres.log -w
124133

134+
echo -en 'travis_fold:end:run_tests\\r'
135+
136+
echo -en 'travis_fold:start:output\\r' && echo 'Check output'
137+
125138
# show diff if it exists
126139
if test -f regression.diffs; then cat regression.diffs; fi
127140

@@ -143,11 +156,17 @@ for corefile in $(find /tmp/ -name '*.core' 2>/dev/null) ; do
143156
gdb --batch --quiet -ex "thread apply all bt full" -ex "quit" $binary $corefile
144157
done
145158

159+
echo -en 'travis_fold:end:output\\r'
160+
161+
echo -en 'travis_fold:start:coverage\\r' && echo 'Coverage check'
162+
146163
#generate *.gcov files
147164
if [ $CC = "clang" ]; then
148165
bash <(curl -s https://codecov.io/bash) -x "llvm-cov gcov"
149166
else
150167
bash <(curl -s https://codecov.io/bash)
151168
fi
152169

170+
echo -en 'travis_fold:end:coverage\\r'
171+
153172
exit $status

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.