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

Commit2092dff

Browse files
committed
make Codecov work in Docker
1 parent85e2b80 commit2092dff

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

‎.travis.yml‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
os:
2-
-linux
2+
-linux
33

44
sudo:required
55
dist:trusty
@@ -10,22 +10,19 @@ services:
1010
-docker
1111

1212
install:
13-
-sed -e 's/${CHECK_CODE}/'${CHECK_CODE}/g -e 's/${PG_VERSION}/'${PG_VERSION}/g Dockerfile.tmpl> Dockerfile
13+
-sed -e 's/${CHECK_CODE}/'${CHECK_CODE}/g -e 's/${PG_VERSION}/'${PG_VERSION}/g Dockerfile.tmpl > Dockerfile
1414
-docker-compose build
1515

1616
script:
17-
-docker-compose run tests
17+
-docker-compose run tests $(bash <(curl -s https://codecov.io/env))
1818

1919
env:
2020
-PG_VERSION=10 CHECK_CODE=clang
2121
-PG_VERSION=9.6 CHECK_CODE=clang
2222
-PG_VERSION=9.5 CHECK_CODE=clang
2323
-PG_VERSION=10 CHECK_CODE=cppcheck
24-
-PG_VERSION=10 CHECK_CODE=false
2524
-PG_VERSION=9.6 CHECK_CODE=cppcheck
26-
-PG_VERSION=9.6 CHECK_CODE=false
2725
-PG_VERSION=9.5 CHECK_CODE=cppcheck
26+
-PG_VERSION=10 CHECK_CODE=false
27+
-PG_VERSION=9.6 CHECK_CODE=false
2828
-PG_VERSION=9.5 CHECK_CODE=false
29-
30-
after_success:
31-
-bash <(curl -s https://codecov.io/bash)

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ python_tests:
8383
$(MAKE) -C tests/python partitioning_tests
8484

8585
cmocka_tests:
86-
$(MAKE) -C tests/cmocka check
86+
$(MAKE) -C tests/cmockacleancheck

‎run_tests.sh‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash
22

3+
# This is a main testing script for:
4+
#* regression tests
5+
#* testgres-based tests
6+
#* cmocka-based tests
7+
# Copyright (c) 2017, Postgres Professional
8+
39
set -eux
410

511
echo CHECK_CODE=$CHECK_CODE
@@ -12,7 +18,8 @@ if [ "$CHECK_CODE" = "clang" ]; then
1218
exit$status
1319

1420
elif ["$CHECK_CODE"="cppcheck" ];then
15-
cppcheck --template"{file} ({line}): {severity} ({id}): {message}" \
21+
cppcheck \
22+
--template"{file} ({line}): {severity} ({id}): {message}" \
1623
--enable=warning,portability,performance \
1724
--suppress=redundantAssignment \
1825
--suppress=uselessAssignmentPtrArg \
@@ -34,8 +41,8 @@ make USE_PGXS=1 clean
3441
# initialize database
3542
initdb
3643

37-
# build pg_pathman (usingCFLAGS_SL for gcov)
38-
make USE_PGXS=1CFLAGS_SL="$(pg_config --cflags_sl)-coverage"
44+
# build pg_pathman (usingPG_CPPFLAGS for gcov)
45+
make USE_PGXS=1PG_CPPFLAGS="-coverage"
3946
make USE_PGXS=1 install
4047

4148
# check build
@@ -69,7 +76,10 @@ if [ $status -ne 0 ]; then exit $status; fi
6976
rm -f tests/cmocka/*.gcno
7077
rm -f tests/cmocka/*.gcda
7178

72-
#generate *.gcov files
79+
#generate *.gcov files
7380
gcov src/*.c src/compat/*.c src/include/*.h src/include/compat/*.h
7481

82+
# send coverage stats to Coveralls
83+
bash<(curl -s https://codecov.io/bash)
84+
7585
exit$status

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp