5 # keep this in sync with setup.sh
6 CONTAINER
=${RELEASE:-buster}-${ARCH:-amd64}
7 AUTOPKGTESTDIR
=${SEMAPHORE_CACHE_DIR:-/tmp}/autopkgtest
8 # semaphore cannot expose these, but useful for interactive/local runs
9 ARTIFACTS_DIR
=/tmp
/artifacts
11 # add current debian/ packaging
12 git fetch
--depth=1 https
://salsa.debian.org
/systemd-team
/systemd.git master
13 git checkout FETCH_HEAD debian
16 UPSTREAM_VER
=$
(git describe |
sed 's/^v//')
17 cat << EOF > debian/changelog.new
18 systemd (${UPSTREAM_VER}-0) UNRELEASED; urgency=low
20 * Automatic build for upstream test
22 -- systemd test <pkg-systemd-maintainers@lists.alioth.debian.org> $(date -R)
25 cat debian
/changelog
>> debian
/changelog.new
26 mv debian
/changelog.new debian
/changelog
30 # disable autopkgtests which are not for upstream
31 sed -i '/# NOUPSTREAM/ q' debian
/tests
/control
32 # enable more unit tests
33 sed -i '/^CONFFLAGS =/ s/=/= -Dtests=unsafe -Dsplit-usr=true -Dslow-tests=true /' debian
/rules
35 echo '1.0' > debian
/source
/format
37 # build source package
38 dpkg-buildpackage
-S -I -I$
(basename "$SEMAPHORE_CACHE_DIR") -d -us -uc -nc
40 # now build the package and run the tests
41 rm -rf "$ARTIFACTS_DIR"
42 # autopkgtest exits with 2 for "some tests skipped", accept that
43 $AUTOPKGTESTDIR/runner
/autopkgtest
--apt-upgrade --env DEB_BUILD_OPTIONS
=noudeb
--env TEST_UPSTREAM
=1 ..
/systemd_
*.dsc
-o "$ARTIFACTS_DIR" -- lxc
-s $CONTAINER ||
[ $?
-eq 2 ]