Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:openSUSE:QA:Leap:15
systemd-v234-testsuite
0021-TEST-12-ISSUE-3171-remove-qemu-from-testru...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0021-TEST-12-ISSUE-3171-remove-qemu-from-testrun.patch of Package systemd-v234-testsuite
From 5d1dce509a07089a593ee30b53bd1f9ea216f8dd Mon Sep 17 00:00:00 2001 From: Thomas Blume <thomas.blume@suse.com> Date: Mon, 1 Apr 2019 12:48:52 +0200 Subject: [PATCH] TEST-12-ISSUE-3171: remove qemu from testrun --- test/TEST-12-ISSUE-3171/test.sh | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/test/TEST-12-ISSUE-3171/test.sh b/test/TEST-12-ISSUE-3171/test.sh index 559fa469cd..cdb9fd9f52 100755 --- a/test/TEST-12-ISSUE-3171/test.sh +++ b/test/TEST-12-ISSUE-3171/test.sh @@ -7,15 +7,31 @@ TEST_NO_QEMU=1 . $TEST_BASE_DIR/test-functions +test_run() { + ret=1 + systemctl daemon-reload + systemctl start testsuite.service || return 1 + systemctl status --full testsuite.service + if [ -z "$TEST_NO_NSPAWN" ]; then + if run_nspawn; then + check_result_nspawn || return 1 + else + dwarn "can't run systemd-nspawn, skipping" + fi + fi + test -s /failed && ret=$(($ret+1)) + [[ -e /testok ]] && ret=0 + return $ret +} + test_setup() { - create_empty_image mkdir -p $TESTDIR/root - mount ${LOOPDEV}p1 $TESTDIR/root + initdir=$TESTDIR/root + STRIP_BINARIES=no # Create what will eventually be our root filesystem onto an overlay ( LOG_LEVEL=5 - eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) setup_basic_environment dracut_install cat mv stat nc @@ -27,7 +43,8 @@ Description=Testsuite service After=multi-user.target [Service] -ExecStart=/test-socket-group.sh +ExecStart=$initdir/test-socket-group.sh +ExecStartPost=/bin/sh -x -c 'echo -e "\nfailed:" > /failed; systemctl --state=failed --no-pager >> /failed; echo -e "\ntestresult:\nOK" > /testok' Type=oneshot EOF @@ -84,13 +101,23 @@ touch /testok EOF chmod 0755 $initdir/test-socket-group.sh + for service in testsuite.service; do + cp $initdir/etc/systemd/system/$service /etc/systemd/system/ + done setup_testsuite ) || return 1 setup_nspawn_root +} + +test_cleanup() { + for service in testsuite.service; do + rm /etc/systemd/system/$service + done + [[ -e /testok ]] && rm /testok + [[ -e /failed ]] && rm /failed + return 0 - ddebug "umount $TESTDIR/root" - umount $TESTDIR/root } do_test "$@" -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor