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