Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:openSUSE:QA:Leap:15
systemd-v234-testsuite
0024-TEST-15-DROPIN-remove-qemu-from-testrun.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0024-TEST-15-DROPIN-remove-qemu-from-testrun.patch of Package systemd-v234-testsuite
From 7f9f234e6de7e492bad11cbd42ce2216b76c9960 Mon Sep 17 00:00:00 2001 From: Thomas Blume <thomas.blume@suse.com> Date: Mon, 8 Apr 2019 11:55:16 +0200 Subject: [PATCH] TEST-15-DROPIN: remove qemu from testrun --- test/TEST-15-DROPIN/test.sh | 31 +++++++++++++++++++++++++++---- test/TEST-15-DROPIN/testsuite.service | 1 + 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/test/TEST-15-DROPIN/test.sh b/test/TEST-15-DROPIN/test.sh index cc0d56da8a..e89ddc71ac 100755 --- a/test/TEST-15-DROPIN/test.sh +++ b/test/TEST-15-DROPIN/test.sh @@ -5,9 +5,26 @@ set -e TEST_DESCRIPTION="Dropin tests" TEST_NO_QEMU=1 +export TEST_BASE_DIR=/var/opt/systemd-tests/test . $TEST_BASE_DIR/test-functions +test_run() { + ret=1 + systemctl daemon-reload + systemctl start testsuite.service || return 1 + systemctl status --full testsuite.service + test -s /failed && ret=$(($ret+1)) + [[ -e /testok ]] && ret=0 + return $ret +} + test_setup() { + mkdir -p $TESTDIR/root + initdir=$TESTDIR/root + STRIP_BINARIES=no + + LOG_LEVEL=5 + # create the basic filesystem layout setup_basic_environment @@ -19,8 +36,8 @@ test_setup() { ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service # import the test scripts in the rootfs and plug them in systemd - cp testsuite.service $initdir/etc/systemd/system/ - cp test-dropin.sh $initdir/ + cp testsuite.service /etc/systemd/system/ + cp test-dropin.sh / setup_testsuite # create dedicated rootfs for nspawn (located in $TESTDIR/nspawn-root) @@ -28,7 +45,13 @@ test_setup() { } test_cleanup() { - return 0 -} + for service in testsuite.service; do + rm /etc/systemd/system/$service + done + rm /test-dropin.sh + [[ -e /testok ]] && rm /testok + [[ -e /failed ]] && rm /failed + return 0 + } do_test "$@" diff --git a/test/TEST-15-DROPIN/testsuite.service b/test/TEST-15-DROPIN/testsuite.service index d9790c2610..9c0eb6d470 100644 --- a/test/TEST-15-DROPIN/testsuite.service +++ b/test/TEST-15-DROPIN/testsuite.service @@ -4,4 +4,5 @@ After=multi-user.target [Service] ExecStart=/test-dropin.sh +ExecStartPost=/bin/sh -x -c 'echo -e "\nfailed:" > /failed; systemctl --state=failed --no-pager >> /failed; echo -e "\ntestresult:\nOK" > /testok' Type=oneshot -- 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