Skip to content

Commit c251420

Browse files
author
Arnd R. Strube
committed
Merge remote-tracking branch 'origin/master' into travis
2 parents 9449763 + 36b5ea2 commit c251420

File tree

2 files changed

+67
-45
lines changed

2 files changed

+67
-45
lines changed

.travis.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,48 @@ compiler:
88
rvm:
99
- 1.9.3
1010
env:
11-
- BUILDTOOL=autotools
12-
- BUILDTOOL=autotools_old_compilers
13-
- BUILDTOOL=cmake
14-
- BUILDTOOL=cmake-coverage
15-
- BUILDTOOL=make-dos
11+
- BUILD=autotools
12+
- BUILD=cmake
13+
- BUILD=autotools_gtest
14+
- BUILD=cmake_gtest
15+
- BUILD=test_report
16+
- BUILD=autotools_old_compilers
17+
- BUILD=cmake-coverage
18+
- BUILD=make-dos
1619
matrix:
1720
exclude:
18-
- env: BUILDTOOL=cmake-coverage
19-
- env: BUILDTOOL=autotools_old_compilers
20-
- env: BUILDTOOL=make-dos
21+
- env: BUILD=cmake-coverage
22+
- env: BUILD=autotools_old_compilers
23+
- env: BUILD=make-dos
24+
- env: BUILD=test_report
2125
- compiler: wcl
2226
include:
23-
- env: BUILDTOOL=cmake-coverage
27+
- env: BUILD=cmake-coverage
2428
compiler: gcc
25-
- env: BUILDTOOL=make-dos
29+
- env: BUILD=test_report
30+
compiler: gcc
31+
- env: BUILD=make-dos
2632
compiler: wcl
2733
global:
2834
- secure: |-
2935
P05xUfJVw5YM4hF7hzQLjyMzDD4Q1/fyWP9Uk5aK5VrSWNY99EuxldXI5QK/
3036
vA1NkcW49tQW1wQvBlRtdlLNOmUfDP/oiJFXPwNn4dqwOIOEet2P7JO/5hnH
3137
MNHlZmGu2WpoZREhOFBfsIhK0IP8mloqLDq2XemBdga/LWygrLU=
3238
- secure: Y/8iNkf6uEbE3qltnM+7mGlCvFWzyttwwRGgVGw1m9xOiUJcobvOImQRU8XZ91dgO+Fz0A3mljqs1sK1OPjpXmFGE1jP/NlotMw0WlDOuSIDjQ4ubwdTNGAwNY53R9ygbIjEmqxHAJm9mOZqxW2hNaoI7TcX6oX248/hLibyx8M=
39+
addons:
40+
apt:
41+
packages:
42+
# - dosbox
43+
- valgrind
44+
before_install:
45+
# - sudo pip install cpp-coveralls
46+
- sudo apt-get install dosbox
3347
install:
34-
- gem install travis_github_deployer
35-
- sudo apt-get update --fix-missing
36-
- sudo apt-get install valgrind
48+
- gem install travis_github_deployer
49+
- sudo apt-get update --fix-missing
50+
# - sudo apt-get install valgrind
3751
before_script:
38-
- export CPPUTEST_BUILD_DIR=$TRAVIS_BUILD_DIR/cpputest_build
39-
- mkdir -p $CPPUTEST_BUILD_DIR && cd $CPPUTEST_BUILD_DIR
52+
- export CPPUTEST_BUILD_DIR=$TRAVIS_BUILD_DIR/cpputest_build
53+
- mkdir -p $CPPUTEST_BUILD_DIR && cd $CPPUTEST_BUILD_DIR
4054
script:
4155
- "../scripts/travis_ci_build.sh"

scripts/travis_ci_build.sh

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
11
#!/bin/bash
22
# Script run in the travis CI
3-
set -e
3+
set -ex
44

5-
if [ "x$BUILDTOOL" = "xautotools" ]; then
5+
if [ "x$BUILD" = "xautotools" ]; then
66
autoreconf -i ..
77
../configure
88
echo "CONFIGURATION DONE. Compiling now."
99
make check_all
1010

11-
# Special check for all the gtest versions.
12-
make check_gtest
13-
14-
# One more normal build for generating test reports
15-
../configure
16-
make check
17-
./CppUTestTests -ojunit
18-
./CppUTestExtTests -ojunit
19-
cp ../scripts/generate_junit_report_ant.xml .
20-
ant -f generate_junit_report_ant.xml
21-
2211
make dist
2312
make dist-zip
2413

@@ -28,17 +17,26 @@ if [ "x$BUILDTOOL" = "xautotools" ]; then
2817
fi;
2918
fi
3019

31-
if [ "x$BUILDTOOL" = "xcmake" ]; then
20+
if [ "x$BUILD" = "xcmake" ]; then
3221
cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
33-
make || exit 1
34-
ctest -V || exit 1
22+
make
23+
ctest -V
3524

3625
if [ "x$CXX" != "xg++" ]; then
3726
cmake .. -DC++11=ON -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
38-
make || exit 1
39-
ctest -V || exit 1
27+
make
28+
ctest -V
4029
fi
30+
fi
4131

32+
if [ "x$BUILD" = "xautotools_gtest" ]; then
33+
autoreconf -i ..
34+
../configure
35+
36+
make check_gtest
37+
fi
38+
39+
if [ "x$BUILD" = "xcmake_gtest" ]; then
4240
wget https://googlemock.googlecode.com/files/gmock-1.6.0.zip
4341
unzip gmock-1.6.0.zip -d $TRAVIS_BUILD_DIR
4442
cd $TRAVIS_BUILD_DIR/gmock-1.6.0
@@ -47,33 +45,44 @@ if [ "x$BUILDTOOL" = "xcmake" ]; then
4745

4846
export GMOCK_HOME=$TRAVIS_BUILD_DIR/gmock-1.6.0
4947
export GTEST_HOME=$TRAVIS_BUILD_DIR/gmock-1.6.0/gtest
50-
cmake .. -DGMOCK=ON || exit 1
51-
make || exit 1
52-
ctest -V || exit 1
48+
cmake .. -DGMOCK=ON
49+
make
50+
ctest -V
5351
fi
5452

55-
if [ "x$BUILDTOOL" = "xcmake-coverage" ]; then
56-
sudo pip install cpp-coveralls
53+
if [ "x$BUILD" = "xtest_report" ]; then
54+
autoreconf -i ..
55+
../configure
56+
make check
57+
./CppUTestTests -ojunit
58+
./CppUTestExtTests -ojunit
59+
cp ../scripts/generate_junit_report_ant.xml .
60+
ant -f generate_junit_report_ant.xml
61+
fi
62+
63+
if [ "x$BUILD" = "xcmake-coverage" ]; then
64+
pip install cpp-coveralls --user `whoami`
65+
5766
cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=ON
58-
make || exit 1
59-
ctest || exit 1
67+
make
68+
ctest
6069

6170
coveralls -b . -r .. -i "src" -i "include" --gcov-options="-bc" || true
6271
fi
6372

64-
if [ "x$BUILDTOOL" = "xmake-dos" ]; then
65-
sudo apt-get install dosbox
73+
if [ "x$BUILD" = "xmake-dos" ]; then
6674
wget ftp://ftp.openwatcom.org/pub/open-watcom-c-linux-1.9 -O /tmp/watcom.zip
6775
mkdir -p watcom && unzip -aqd watcom /tmp/watcom.zip && sudo chmod -R 755 watcom/binl
6876
export PATH=$PATH:$PWD/watcom/binl
6977
export WATCOM=$PWD/watcom
7078
export CPPUTEST_HOME=$TRAVIS_BUILD_DIR
79+
wcl --version
7180
export CC=wcl
7281
export CXX=wcl
7382
$CC --version
7483
make -f ../platforms/Dos/Makefile || exit 1
75-
printf "" > exit # has to be there so dosbox will do 'exit' correctly
76-
printf "\n" > ./ALLTESTS.LOG
84+
printf "" > exit # has to be there so dosbox will do 'exit' correctly
85+
printf "\n" > ./ALLTESTS.LOG
7786
dosbox -conf ../platforms/Dos/dosbox-0.74.conf exit \
7887
-c "echo.>>ALLTESTS.LOG" \
7988
-c "echo.>>ALLTESTS.LOG" \
@@ -85,4 +94,3 @@ if [ "x$BUILDTOOL" = "xmake-dos" ]; then
8594
cat ALLTESTS.LOG
8695
# Generate an error here if failures occur in ALLTESTS.LOG
8796
fi
88-

0 commit comments

Comments
 (0)