]> git.ipfire.org Git - thirdparty/lldpd.git/blame - tests/ci/run.sh
travis: only enable sanitizers on Linux
[thirdparty/lldpd.git] / tests / ci / run.sh
CommitLineData
8bb212d9
VB
1#!/bin/sh
2
3set -e
4
5# Handle coverity scan
6case "${RUN_COVERITY}","${TRAVIS_BRANCH}" in
7 0,"${COVERITY_SCAN_BRANCH_PATTERN}")
8 exit 0
9 ;;
10 1,"${COVERITY_SCAN_BRANCH_PATTERN}")
11 [ x"${COVERITY_SCAN_TOKEN}" = x"" ] || \
12 curl -s https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | \
13 COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG" \
14 COVERITY_SCAN_BUILD_COMMAND="make CFLAGS=-Werror" \
15 bash
16 exit $?
17 ;;
18 1,*)
19 exit 0
20 ;;
21esac
22
4f9d887a 23[ $CC != gcc ] || CC=gcc-5
d609cc13 24[ $(uname -s) != Linux ] || LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --enable-sanitizers"
4f9d887a 25
8bb212d9 26./autogen.sh
abced782
VB
27./configure $LLDPD_CONFIG_ARGS \
28 --enable-pie \
abced782
VB
29 --localstatedir=/var --sysconfdir=/etc --prefix=/usr \
30 CFLAGS="-O1 -g"
8bb212d9
VB
31make all check CFLAGS=-Werror
32make distcheck
62f9ab5e
VB
33
34case "$(uname -s)" in
35 Darwin)
36 # Create a package
37 make -C osx pkg
38 ;;
39 Linux)
40 # Integration tests
41 cd tests/integration
36d3582e
VB
42 sudo $(which python3) -m pytest -n 5 -vv --boxed || \
43 sudo $(which python3) -m pytest -vvv --last-failed --maxfail=5
62f9ab5e
VB
44 ;;
45esac