test.sh revision 889a90422dd47284dffa32b9234a6e58991b000c
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
TEST_DESCRIPTION="Basic systemd setup"
. $TEST_BASE_DIR/test-functions
# Uncomment this to debug failures
#DEBUGFAIL="systemd.unit=multi-user.target"
ret=1
return $ret
}
if check_qemu ; then
check_result_qemu || return 1
else
dwarn "can't run qemu-kvm, skipping"
fi
if check_nspawn; then
check_result_nspawn || return 1
else
dwarn "can't run systemd-nspawn, skipping"
fi
return 0
}
# Create what will eventually be our root filesystem onto an overlay
(
# setup the testsuite service
[Unit]
Description=Testsuite service
After=multi-user.target
[Service]
ExecStart=/bin/bash -c 'set -x; ( systemctl --failed --no-legend --no-pager; systemctl status --failed ) > /failed ; echo OK > /testok; while : ;do echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;'
Type=oneshot
EOF
)
}
return 0
}
do_test "$@"