chiark / gitweb /
tests: do not use systemctl status --failed
[elogind.git] / test / TEST-01-BASIC / test.sh
index aaf63f4f529e7e8c175014f5a9606e0967987103..d97fbe24d492a71b49084ae630dd6780f6a81728 100755 (executable)
@@ -5,9 +5,6 @@ TEST_DESCRIPTION="Basic systemd setup"
 
 . $TEST_BASE_DIR/test-functions
 
-# Uncomment this to debug failures
-#DEBUGFAIL="systemd.unit=multi-user.target"
-
 check_result_qemu() {
     ret=1
     mkdir -p $TESTDIR/root
@@ -23,11 +20,10 @@ check_result_qemu() {
 }
 
 test_run() {
-    if check_qemu ; then
-        run_qemu
+    if run_qemu; then
         check_result_qemu || return 1
     else
-        dwarn "can't run qemu-kvm, skipping"
+        dwarn "can't run QEMU, skipping"
     fi
     if check_nspawn; then
         run_nspawn
@@ -57,7 +53,7 @@ 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;'
+ExecStart=/bin/bash -c 'set -x; systemctl --failed --no-legend --no-pager > /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