1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/sh
set -ex
# This executes the equivalent of `make integration` from the main Makefile,
# but with all dependencies, golang libraries, and executables built from Debian sources
# The containerd package will start containerd automatically, and will confuse the test
# To remedy, make sure to stop that service
systemctl stop containerd
systemctl mask containerd
systemctl status containerd || true
# Copy all sources into the _build directory
dh_auto_configure -O--buildsystem=golang -O--builddirectory=_build
# build and make runc-fp available
DH_GOLANG_BUILDPKG=github.com/containerd/containerd/v2/integration/failpoint/cmd/runc-fp \
dh_auto_build -O--buildsystem=golang -O--builddirectory=_build 2>&1
cp -v _build/bin/runc-fp /usr/local/bin
PATH=$(readlink -f _build/bin):$PATH
export PATH
# overlayfs not work in lxc
find _build/ -name snapshotter_default_linux.go -exec sed -i 's|DefaultSnapshotter = "overlayfs"|DefaultSnapshotter = "native"|g' {} +
DH_GOLANG_BUILDPKG=github.com/containerd/containerd/v2/integration/client \
dh_auto_test -O--buildsystem=golang -O--builddirectory=_build -- -c 2>&1
# criu no permission in lxc testbed
exec ./_build/client.test -test.v -test.root
|