898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ex: ts=8 sw=4 sts=4 et filetype=sh
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [[ -f $TESTDIR/root/failed ]] && cp -a $TESTDIR/root/failed $TESTDIR
278d5115470919319c514ea37d7b14e3f7d0580bEvgeny Vereshchagin cp -a $TESTDIR/root/var/log/journal $TESTDIR
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
32d965851d8cbb39f8ee0eeaf76a89e8f5fc174fLennart Poettering test -s $TESTDIR/failed && ret=$(($ret+1))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer # Create what will eventually be our root filesystem onto an overlay
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
6b197f2a03fa03a2a853cf726d47be2ea4c623b6Harald Hoyer cat >$initdir/etc/systemd/system/testsuite.service <<EOF
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerDescription=Testsuite service
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAfter=multi-user.target
5c404f1ab8e96efedb983806443ca982a1b2a372Evgeny VereshchaginExecStart=/bin/sh -x -c 'systemctl --failed --no-legend --no-pager > /failed ; echo OK > /testok'
6f9d3b08cf3e50d3903282d2ce36244bb86c7b7cDaniel Mack # mask some services that we do not want to run in these tests
6f9d3b08cf3e50d3903282d2ce36244bb86c7b7cDaniel Mack ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
6f9d3b08cf3e50d3903282d2ce36244bb86c7b7cDaniel Mack ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
6f9d3b08cf3e50d3903282d2ce36244bb86c7b7cDaniel Mack ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service
6f9d3b08cf3e50d3903282d2ce36244bb86c7b7cDaniel Mack ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket