diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 13:00:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 13:00:48 +0000 |
commit | f542925b701989ba6eed7b08b5226d4021b9b85f (patch) | |
tree | 57e14731f21a6d663326d30b7b88736e9d51c420 /debian/tests/upstream | |
parent | Adding upstream version 247.3. (diff) | |
download | systemd-f542925b701989ba6eed7b08b5226d4021b9b85f.tar.xz systemd-f542925b701989ba6eed7b08b5226d4021b9b85f.zip |
Adding debian version 247.3-7+deb11u4.debian/247.3-7+deb11u4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/upstream')
-rwxr-xr-x | debian/tests/upstream | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/debian/tests/upstream b/debian/tests/upstream new file mode 100755 index 0000000..04be11a --- /dev/null +++ b/debian/tests/upstream @@ -0,0 +1,65 @@ +#!/bin/sh +# run upstream system integration tests +# Author: Martin Pitt <martin.pitt@ubuntu.com> +set -e + +DPKGARCH=$(dpkg --print-architecture) + +# quiesce Makefile.guess; not really relevant as systemd/nspawn run from +# installed packages +export BUILD_DIR=. + +# modify the image build scripts to install systemd from the debs instead of +# from a "make/ninja install" as we don't have a built tree here. Also call +# systemd-nspawn from the system. +sed -i '/DESTDIR.* install/ s%^.*$% for p in `grep ^Package: '`pwd`'/debian/control | cut -f2 -d\\ |grep -Ev -- "-(udeb|dev)"`; do (cd /tmp; apt-get download $p \&\& dpkg-deb --fsys-tarfile ${p}[._]*deb | tar -C $initdir --dereference -x); done%; s_[^" ]*/systemd-nspawn_systemd-nspawn_g; s/\(_ninja_bin=\).*/\1dummy-ninja/' test/test-functions + +# adjust path +sed -i 's_/usr/libexec/selinux/hll/pp_/usr/lib/selinux/hll/pp_' test/TEST-06-SELINUX/test.sh + +FAILED="" + +# Because this test is used both by upstream and by Debian, we use different deny-list filenames. +# For more details see https://salsa.debian.org/systemd-team/systemd/merge_requests/52 +# The naming is transitioning from blacklist to deny-list, so currently both are supported +# More details in https://github.com/systemd/systemd/pull/16262 +if [ -n "$TEST_UPSTREAM" ]; then + DENY_LIST="deny-list-ubuntu-ci" + BLACKLIST="blacklist-ubuntu-ci" +else + DENY_LIST="deny-list-upstream-ci" + BLACKLIST="blacklist-upstream-ci" +fi + +for t in test/TEST*; do + testname=$(basename $t) + if [ -f "$t/${DENY_LIST}" -o -f "$t/${BLACKLIST}" ]; then + echo "========== DENY-LISTED: $testname ==========" + continue + elif [ -f "$t/${DENY_LIST}-$DPKGARCH" -o -f "$t/${BLACKLIST}-$DPKGARCH" ]; then + echo "========== DENY-LISTED (for arch $DPKGARCH): $testname ==========" + continue + fi + echo "========== START: $testname ==========" + rm -rf /var/tmp/systemd-test.* + if ! make -C $t clean setup run; then + for j in /var/tmp/systemd-test.*/journal/* /var/tmp/systemd-test.*/system.journal; do + [ -e "$j" ] || continue + # keep the entire journal in artifacts, in case one needs the debug messages + cp -r "$j" "$AUTOPKGTEST_ARTIFACTS/${testname}-$(basename $j)" + echo "---- $j ----" + [ -d "$j" ] && journalctl --priority=warning --directory=$j + [ -f "$j" ] && journalctl --priority=warning --file=$j + done + FAILED="$FAILED $testname" + fi + echo + # always cleanup each test run + make -C $t clean-again + echo "========== END: $testname ==========" +done + +if [ -n "$FAILED" ]; then + echo FAILED TESTS: "$FAILED" + exit 1 +fi |