test.sh revision 889a90422dd47284dffa32b9234a6e58991b000c
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering# ex: ts=8 sw=4 sts=4 et filetype=sh
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering# Uncomment this to debug failures
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering#DEBUGFAIL="systemd.unit=multi-user.target"
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering [[ -f $TESTDIR/root/failed ]] && cp -a $TESTDIR/root/failed $TESTDIR
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering cp -a $TESTDIR/root/var/log/journal $TESTDIR
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering test -s $TESTDIR/failed && ret=$(($ret+1))
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering dwarn "can't run systemd-nspawn, skipping"
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering # Create what will eventually be our root filesystem onto an overlay
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering cat >$initdir/etc/systemd/system/testsuite.service <<EOF
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart PoetteringDescription=Testsuite service
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart PoetteringAfter=multi-user.target
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart PoetteringExecStart=/test-jobs.sh
ef63833d532dd86bdba63211e6a1363cbb3ef61dLennart Poettering cp $TEST_BASE_DIR/{hello.service,sleep.service,hello-after-sleep.target,unstoppable.service} \