]> git.ipfire.org Git - thirdparty/lldpd.git/blame - tests/ci/run.sh
build: don't use boxed feature of xdist
[thirdparty/lldpd.git] / tests / ci / run.sh
CommitLineData
8bb212d9
VB
1#!/bin/sh
2
3set -e
4
c0e225c0 5LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --enable-pie"
c0e225c0
VB
6case "$(uname -s)" in
7 Linux)
b941efa6 8 LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --localstatedir=/var --sysconfdir=/etc --prefix=/usr"
eec0cfa5
VB
9 [ $(uname -m) != x86_64 ] || \
10 LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --enable-sanitizers"
c0e225c0 11 ;;
b941efa6 12 Darwin)
518eb927
VB
13 LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS CFLAGS=-mmacosx-version-min=11.1"
14 LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS LDFLAGS=-mmacosx-version-min=11.1"
8ab49f77 15 MAKE_ARGS=""
b941efa6 16 ;;
e47df85e
VB
17 OpenBSD)
18 export AUTOCONF_VERSION=2.71
19 export AUTOMAKE_VERSION=1.16
20 ;;
c0e225c0 21esac
4f9d887a 22
8bb212d9 23./autogen.sh
518eb927
VB
24mkdir build && cd build
25../configure $LLDPD_CONFIG_ARGS || {
6a6c7bd9
VB
26 cat config.log
27 exit 1
28}
27ea4d1e 29make all ${MAKE_ARGS-CFLAGS=-Werror} || make all ${MAKE_ARGS-CFLAGS=-Werror} V=1
475c21e0
VB
30make check ${MAKE_ARGS-CFLAGS=-Werror} || {
31 [ ! -f tests/test-suite.log ] || cat tests/test-suite.log
32 exit 1
33}
b64391c6
VB
34if [ "$LLDPD_RELEASE" = "true" ]; then
35 make distcheck
36fi
37
62f9ab5e
VB
38
39case "$(uname -s)" in
40 Darwin)
41 # Create a package
5b9178e1 42 make -C osx pkg # ARCHS="x86_64 arm64"
b941efa6 43 otool -l osx/lldpd*/usr/local/sbin/lldpd
62f9ab5e
VB
44 ;;
45 Linux)
46 # Integration tests
518eb927 47 cd ../tests/integration
4d68b166 48 sudo $(which python3) -m pytest -n 5 -vv || \
36d3582e 49 sudo $(which python3) -m pytest -vvv --last-failed --maxfail=5
62f9ab5e
VB
50 ;;
51esac