Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commita667714

Browse files
author
Alexander Korotkov
committed
Travis folds.
1 parent92e83f6 commita667714

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

‎travis/pg-travis-test.sh

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -eux
44

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

79
# bug: http://www.postgresql.org/message-id/20130508192711.GA9243@msgid.df7cb.de
@@ -46,15 +48,17 @@ 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'Static analysis'&&echo -en'travis_fold:start:static_analysis\\r'
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
make USE_PGXS=1 USE_ASSERT_CHECKING=1 PG_CONFIG=$config_path|| status=$?
57-
exit$status
5862

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

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

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

9087
# build extension (using CFLAGS_SL for gcov)
9188
if [$CHECK_TYPE=="valgrind" ];then
@@ -100,9 +97,21 @@ fi
10097
status=$?
10198
if [$status-ne 0 ];thenexit$status;fi
10299

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

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

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

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

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

169+
echo -en'travis_fold:end:coverage\\r'
170+
152171
exit$status

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp