GIT_STRATEGY: fetch
DOCKER_CMD: docker --config="$HOME/.docker/$CI_JOB_ID/"
IMG_BASE: registry.nic.cz/labs/bird
- TOOLS_DIR: /var/lib/gitlab-runner/bird-tools
STAYRTR_BINARY: /var/lib/gitlab-runner/stayrtr-0.1-108-g8d18a41-linux-x86_64
stages:
script:
- DIR=$(pwd)
- autoreconf
- - ./configure
- - make
- - cd $TOOLS_DIR
- - sudo git clean -fx
- - git pull --ff-only
- - mv $DIR/bird $DIR/birdc netlab/common
- - ln -s $STAYRTR_BINARY netlab/common/stayrtr
+ - ./configure --with-stayrtr=$STAYRTR_BINARY
+ - make aux-test-prepare
.test: &test-base
stage: test
- birdlab
- amd64
script:
- - cd $TOOLS_DIR/netlab
- - sudo ./stop
- - sudo ./runtest -s v2 -m check $TEST_NAME
+ - cd aux-tools/netlab
+ - make -f tests-v2.mk NETLAB_TEST_SHOW_OUTPUT=1 netlab-test-$TEST_NAME
test-ospf-base:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-base
+ TEST_NAME: ospf-base
test-ospf-default:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-default
+ TEST_NAME: ospf-default
test-ospf-priority:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-priority
+ TEST_NAME: ospf-priority
test-ospf-nbma:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-nbma
+ TEST_NAME: ospf-nbma
test-ospf-ptmp:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-ptmp
+ TEST_NAME: ospf-ptmp
test-ospf-authentication:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-authentication
+ TEST_NAME: ospf-authentication
test-ospf-bfd:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-bfd
+ TEST_NAME: ospf-bfd
test-ospf-custom:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-custom
+ TEST_NAME: ospf-custom
test-ospf-area:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-area
+ TEST_NAME: ospf-area
test-ospf-vrf:
<<: *test-base
variables:
- TEST_NAME: cf-ospf-vrf
+ TEST_NAME: ospf-vrf
test-bgp-base:
<<: *test-base
variables:
- TEST_NAME: cf-bgp-base
+ TEST_NAME: bgp-base
test-bgp-auth:
<<: *test-base
variables:
- TEST_NAME: cf-bgp-auth
+ TEST_NAME: bgp-auth
test-bgp-int:
<<: *test-base
variables:
- TEST_NAME: cf-bgp-int
+ TEST_NAME: bgp-int
test-bgp-merged:
<<: *test-base
variables:
- TEST_NAME: cf-bgp-merged
+ TEST_NAME: bgp-merged
test-bgp-flowspec:
<<: *test-base
variables:
- TEST_NAME: cf-bgp-flowspec
+ TEST_NAME: bgp-flowspec
test-bgp-rs-multitab:
<<: *test-base
variables:
- TEST_NAME: cf-bgp-rs-multitab
+ TEST_NAME: bgp-rs-multitab
test-ebgp-loop:
<<: *test-base
variables:
- TEST_NAME: cf-ebgp-loop
+ TEST_NAME: ebgp-loop
test-ebgp-star:
<<: *test-base
variables:
- TEST_NAME: cf-ebgp-star
+ TEST_NAME: ebgp-star
test-ebgp-role:
<<: *test-base
variables:
- TEST_NAME: cf-ebgp-role
+ TEST_NAME: ebgp-role
test-ebgp-graceful:
<<: *test-base
variables:
- TEST_NAME: cf-ebgp-graceful
+ TEST_NAME: ebgp-graceful
test-ebgp-import-limit:
<<: *test-base
variables:
- TEST_NAME: cf-ebgp-import-limit
+ TEST_NAME: ebgp-import-limit
test-ibgp-loop:
<<: *test-base
variables:
- TEST_NAME: cf-ibgp-loop
+ TEST_NAME: ibgp-loop
test-ibgp-loop-big:
<<: *test-base
variables:
- TEST_NAME: cf-ibgp-loop-big
+ TEST_NAME: ibgp-loop-big
test-ibgp-flat:
<<: *test-base
variables:
- TEST_NAME: cf-ibgp-flat
+ TEST_NAME: ibgp-flat
test-babel-base:
<<: *test-base
variables:
- TEST_NAME: cf-babel-base
+ TEST_NAME: babel-base
test-babel-auth:
<<: *test-base
variables:
- TEST_NAME: cf-babel-auth
+ TEST_NAME: babel-auth
test-rip-base:
<<: *test-base
variables:
- TEST_NAME: cf-rip-base
+ TEST_NAME: rip-base
test-kernel-learn:
<<: *test-base
variables:
- TEST_NAME: cf-kernel-learn
+ TEST_NAME: kernel-learn
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
+STAYRTR_BINARY=@STAYRTR_BINARY@
+NETLAB_DATA_SUFFIX=v2
+
client=$(addprefix $(exedir)/,@CLIENT@)
daemon=$(exedir)/bird
protocols=@protocols@
tests: $(tests_targets)
tests_run: $(tests_targets_ok)
+aux-test-prepare: all
+ $(E)echo Preparing netlab test suite ...
+ $(Q)cd $(srcdir) && git submodule update --init --force --checkout aux-tools
+ $(Q)cd $(srcdir)/aux-tools && git clean -fxdq || true
+ $(Q)cd $(srcdir)/aux-tools/netlab/common && ln $(shell readlink -f $(exedir)/bird) && ln $(shell readlink -f $(exedir)/birdc)
+ $(Q)cd $(srcdir)/aux-tools/netlab/common && ln -s $(STAYRTR_BINARY) stayrtr
+ $(E)echo Netlab test suite prepared.
+
+-include $(srcdir)/aux-tools/netlab/tests-$(NETLAB_DATA_SUFFIX).mk
+
STATIC_CHECKERS_ENABLE := nullability.NullableDereferenced nullability.NullablePassedToNonnull nullability.NullableReturnedFromNonnull optin.portability.UnixAPI valist.CopyToSelf valist.Uninitialized valist.Unterminated
STATIC_CHECKERS_DISABLE := deadcode.DeadStores
STATIC_SCAN_FLAGS := -o $(objdir)/static-scan/ $(addprefix -enable-checker ,$(STATIC_CHECKERS_ENABLE)) $(addprefix -disable-checker ,$(STATIC_CHECKERS_DISABLE))
[given_iproutedir="yes"]
)
+AC_ARG_WITH([stayrtr],
+ [AS_HELP_STRING([--with-stayrtr=PATH], [path to stayrtr built binary for RPKI testing @<:@/usr/bin/stayrtr@:>@])],
+ [],
+ [with_stayrtr="/usr/bin/stayrtr"]
+)
+
AC_ARG_VAR([FLEX], [location of the Flex program])
AC_ARG_VAR([BISON], [location of the Bison program])
AC_ARG_VAR([M4], [location of the M4 program])
+AC_SUBST([STAYRTR_BINARY], [${with_stayrtr}])
+
if test "$enable_debug_expensive" = yes; then
enable_debug=yes
fi