Skip to content

Commit 85431bf

Browse files
committed
Merge branch 'travis-xenial'
Run builds on Travis on Ubuntu Xenial (16.04) images.
2 parents 9820e3d + 8a4f110 commit 85431bf

File tree

5 files changed

+80
-71
lines changed

5 files changed

+80
-71
lines changed

.travis.yml

Lines changed: 58 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
language: c
22

33
sudo: required
4-
dist: trusty
4+
dist: xenial
55

66
# don't build tags separately
77
if: tag IS blank
88

9-
compiler:
10-
- gcc
11-
- clang
9+
compiler: gcc
1210

1311
cache: ccache
1412

@@ -29,54 +27,73 @@ after_success:
2927

3028
after_failure:
3129
- cat config.log
30+
- sleep 1
3231

3332
env:
3433
global:
3534
- TESTS_REDUCED_KEYLENGTHS=yes
3635
- LEAK_DETECTIVE=no
3736
- MONOLITHIC=no
38-
matrix:
39-
- TEST=all
40-
- TEST=all MONOLITHIC=yes
41-
- TEST=all LEAK_DETECTIVE=yes
42-
- TEST=default
43-
- TEST=default MONOLITHIC=yes
44-
- TEST=default LEAK_DETECTIVE=yes
45-
- TEST=botan
46-
- TEST=botan LEAK_DETECTIVE=yes
47-
- TEST=openssl
48-
- TEST=openssl LEAK_DETECTIVE=yes
49-
- TEST=gcrypt
50-
- TEST=gcrypt LEAK_DETECTIVE=yes
51-
# we can't test Vstr as negative int args are not properly passed to CBs
52-
- TEST=printf-builtin
53-
- TEST=printf-builtin LEAK_DETECTIVE=yes
5437

5538
matrix:
5639
include:
57-
- compiler: clang
58-
os: osx
59-
env: TEST=osx
60-
- compiler: gcc
61-
env: TEST=sonarcloud
62-
if: env(SONAR_TOKEN) IS present
40+
- env: TEST=sonarcloud
41+
if: type = push
6342
git:
6443
depth: false
6544
addons:
6645
sonarcloud:
6746
organization: "strongswan"
68-
- compiler: gcc
69-
env: TEST=coverage
70-
- compiler: clang
71-
env: TEST=fuzzing MONOLITHIC=yes
72-
- compiler: gcc
73-
env: TEST=dist
74-
- compiler: gcc
75-
env: TEST=apidoc
76-
- compiler: gcc
77-
env: TEST=win64 MONOLITHIC=yes
78-
# this does not work on 14.04 due to a missing @4 decoration for
79-
# TryAcquireSRWLockExclusive in MinGW 3.1.0
80-
- compiler: gcc
81-
env: TEST=win32 MONOLITHIC=yes
82-
dist: precise
47+
- env: TEST=osx
48+
compiler: clang
49+
os: osx
50+
- env: TEST=all
51+
- env: TEST=all
52+
compiler: clang
53+
- env: TEST=all MONOLITHIC=yes
54+
- env: TEST=all MONOLITHIC=yes
55+
compiler: clang
56+
- env: TEST=all LEAK_DETECTIVE=yes
57+
- env: TEST=all LEAK_DETECTIVE=yes
58+
compiler: clang
59+
- env: TEST=coverage
60+
- env: TEST=fuzzing MONOLITHIC=yes
61+
compiler: clang
62+
- env: TEST=win64 MONOLITHIC=yes
63+
- env: TEST=win32 MONOLITHIC=yes
64+
- env: TEST=dist
65+
# "default" with GCC is already tested with "dist" above
66+
- env: TEST=default
67+
compiler: clang
68+
- env: TEST=default MONOLITHIC=yes
69+
- env: TEST=default MONOLITHIC=yes
70+
compiler: clang
71+
- env: TEST=default LEAK_DETECTIVE=yes
72+
- env: TEST=default LEAK_DETECTIVE=yes
73+
compiler: clang
74+
# we can't test Vstr as negative int args are not properly passed to CBs
75+
- env: TEST=printf-builtin
76+
- env: TEST=printf-builtin
77+
compiler: clang
78+
- env: TEST=printf-builtin LEAK_DETECTIVE=yes
79+
- env: TEST=printf-builtin LEAK_DETECTIVE=yes
80+
compiler: clang
81+
- env: TEST=botan
82+
- env: TEST=botan
83+
compiler: clang
84+
- env: TEST=botan LEAK_DETECTIVE=yes
85+
- env: TEST=botan LEAK_DETECTIVE=yes
86+
compiler: clang
87+
- env: TEST=openssl
88+
- env: TEST=openssl
89+
compiler: clang
90+
- env: TEST=openssl LEAK_DETECTIVE=yes
91+
- env: TEST=openssl LEAK_DETECTIVE=yes
92+
compiler: clang
93+
- env: TEST=gcrypt
94+
- env: TEST=gcrypt
95+
compiler: clang
96+
- env: TEST=gcrypt LEAK_DETECTIVE=yes
97+
- env: TEST=gcrypt LEAK_DETECTIVE=yes
98+
compiler: clang
99+
- env: TEST=apidoc

Doxyfile.in

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,18 +1789,6 @@ GENERATE_XML = NO
17891789

17901790
XML_OUTPUT = xml
17911791

1792-
# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
1793-
# validating XML parser to check the syntax of the XML files.
1794-
# This tag requires that the tag GENERATE_XML is set to YES.
1795-
1796-
XML_SCHEMA =
1797-
1798-
# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
1799-
# validating XML parser to check the syntax of the XML files.
1800-
# This tag requires that the tag GENERATE_XML is set to YES.
1801-
1802-
XML_DTD =
1803-
18041792
# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
18051793
# listings (including syntax highlighting and cross-referencing information) to
18061794
# the XML output. Note that enabling this will significantly increase the size

Makefile.am

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ config_includedir = $(ipseclibdir)/include
2424
nodist_config_include_HEADERS = config.h
2525
endif
2626

27+
# we can't (and shouldn't) install/uninstall system files during make distcheck,
28+
# so override the autodetected path for systemd units
29+
AM_DISTCHECK_CONFIGURE_FLAGS = \
30+
--with-systemdsystemunitdir='$$(prefix)/lib/systemd/system'
31+
2732
# we leave config files behind intentionally so prevent distcheck from complaining
2833
distuninstallcheck_listfiles = find . -type f \! -name '*.conf' \! -name '*.secrets' -print
2934

scripts/test.sh

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ build_tss2()
4949
curl -L $TSS2_SRC | tar xz -C $TRAVIS_BUILD_DIR/.. &&
5050
cd $TSS2_DIR &&
5151
./configure &&
52-
sudo make -j4 install >/dev/null &&
52+
make -j4 >/dev/null &&
53+
sudo make install >/dev/null &&
5354
sudo ldconfig || exit $?
5455
cd -
5556
}
@@ -98,11 +99,9 @@ all|coverage|sonarcloud)
9899
--disable-kernel-pfroute --disable-keychain
99100
--disable-lock-profiler --disable-padlock --disable-fuzzing
100101
--disable-osx-attr --disable-tkm --disable-uci
101-
--disable-systemd --disable-soup --disable-unwind-backtraces
102+
--disable-soup --disable-unwind-backtraces
102103
--disable-svc --disable-dbghelp-backtraces --disable-socket-win
103104
--disable-kernel-wfp --disable-kernel-iph --disable-winhttp"
104-
# Ubuntu 14.04 does not provide libnm
105-
CONFIG="$CONFIG --disable-nm"
106105
# not enabled on the build server
107106
CONFIG="$CONFIG --disable-af-alg"
108107
if test "$TEST" != "coverage"; then
@@ -113,8 +112,8 @@ all|coverage|sonarcloud)
113112
fi
114113
DEPS="$DEPS libcurl4-gnutls-dev libsoup2.4-dev libunbound-dev libldns-dev
115114
libmysqlclient-dev libsqlite3-dev clearsilver-dev libfcgi-dev
116-
libpcsclite-dev libpam0g-dev binutils-dev libunwind8-dev
117-
libjson0-dev iptables-dev python-pip libtspi-dev"
115+
libpcsclite-dev libpam0g-dev binutils-dev libunwind8-dev libnm-dev
116+
libjson0-dev iptables-dev python-pip libtspi-dev libsystemd-dev"
118117
PYDEPS="pytest"
119118
if test "$1" = "deps"; then
120119
build_botan
@@ -130,10 +129,12 @@ win*)
130129
--enable-updown --enable-ext-auth --enable-libipsec
131130
--enable-tnccs-20 --enable-imc-attestation --enable-imv-attestation
132131
--enable-imc-os --enable-imv-os --enable-tnc-imv --enable-tnc-imc
133-
--enable-pki --enable-swanctl --enable-socket-win"
132+
--enable-pki --enable-swanctl --enable-socket-win
133+
--enable-kernel-iph --enable-kernel-wfp --enable-winhttp"
134134
# no make check for Windows binaries unless we run on a windows host
135135
if test "$APPVEYOR" != "True"; then
136136
TARGET=
137+
CCACHE=ccache
137138
else
138139
CONFIG="$CONFIG --enable-openssl"
139140
CFLAGS="$CFLAGS -I/c/OpenSSL-$TEST/include"
@@ -144,21 +145,14 @@ win*)
144145
DEPS="gcc-mingw-w64-base"
145146
case "$TEST" in
146147
win64)
147-
# headers on 12.04 are too old, so we only build the plugins here
148-
CONFIG="--host=x86_64-w64-mingw32 $CONFIG --enable-dbghelp-backtraces
149-
--enable-kernel-iph --enable-kernel-wfp --enable-winhttp"
148+
CONFIG="--host=x86_64-w64-mingw32 $CONFIG --enable-dbghelp-backtraces"
150149
DEPS="gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev $DEPS"
151-
CC="x86_64-w64-mingw32-gcc"
152-
# apply patch to MinGW headers
153-
if test "$APPVEYOR" != "True" -a -z "$1"; then
154-
sudo patch -f -p 4 -d /usr/share/mingw-w64/include < src/libcharon/plugins/kernel_wfp/mingw-w64-4.8.1.diff
155-
fi
150+
CC="$CCACHE x86_64-w64-mingw32-gcc"
156151
;;
157152
win32)
158153
CONFIG="--host=i686-w64-mingw32 $CONFIG"
159-
# currently only works on 12.04, so use mingw-w64-dev instead of mingw-w64-i686-dev
160-
DEPS="gcc-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev $DEPS"
161-
CC="i686-w64-mingw32-gcc"
154+
DEPS="gcc-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-i686-dev $DEPS"
155+
CC="$CCACHE i686-w64-mingw32-gcc"
162156
;;
163157
esac
164158
;;
@@ -291,6 +285,7 @@ sonarcloud)
291285
-Dsonar.projectKey=strongswan \
292286
-Dsonar.projectVersion=$(git describe)+${TRAVIS_BUILD_NUMBER} \
293287
-Dsonar.sources=. \
288+
-Dsonar.cfamily.threads=2 \
294289
-Dsonar.cfamily.build-wrapper-output=bw-output || exit $?
295290
;;
296291
*)

src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ struct private_gcrypt_plugin_t {
4343
gcrypt_plugin_t public;
4444
};
4545

46+
#if GCRYPT_VERSION_NUMBER < 0x010600
4647
/**
4748
* Define gcrypt multi-threading callbacks as gcry_threads_pthread
4849
*/
4950
GCRY_THREAD_OPTION_PTHREAD_IMPL;
51+
#endif
5052

5153
METHOD(plugin_t, get_name, char*,
5254
private_gcrypt_plugin_t *this)
@@ -163,7 +165,9 @@ plugin_t *gcrypt_plugin_create()
163165
{
164166
private_gcrypt_plugin_t *this;
165167

168+
#if GCRYPT_VERSION_NUMBER < 0x010600
166169
gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
170+
#endif
167171

168172
if (!gcry_check_version(GCRYPT_VERSION))
169173
{

0 commit comments

Comments
 (0)