]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/TEST-03-JOBS/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-03-JOBS / test.sh
index 88bbf3cdac4d82aef772439a01d5c1e5e2faa9d1..50b7bce3ed910a35f5b95aea59093d4e9224e0da 100755 (executable)
@@ -1,15 +1,12 @@
 #!/bin/bash
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
 set -e
 TEST_DESCRIPTION="Job-related tests"
+TEST_NO_QEMU=1
 
 . $TEST_BASE_DIR/test-functions
 
 test_setup() {
-    create_empty_image
-    mkdir -p $TESTDIR/root
-    mount ${LOOPDEV}p1 $TESTDIR/root
+    create_empty_image_rootdir
 
     # Create what will eventually be our root filesystem onto an overlay
     (
@@ -17,6 +14,7 @@ test_setup() {
         eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
 
         setup_basic_environment
+        mask_supporting_services
 
         # setup the testsuite service
         cat >$initdir/etc/systemd/system/testsuite.service <<EOF
@@ -35,11 +33,8 @@ EOF
         cp test-jobs.sh $initdir/
 
         setup_testsuite
-    ) || return 1
+    )
     setup_nspawn_root
-
-    ddebug "umount $TESTDIR/root"
-    umount $TESTDIR/root
 }
 
 do_test "$@"