mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
test: merge TEST-28-PERCENTJ-WANTEDBY into TEST-23-UNIT-FILE
This commit is contained in:
parent
fb03fea2a2
commit
23cb7362f1
@ -1 +0,0 @@
|
||||
../TEST-01-BASIC/Makefile
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -e
|
||||
|
||||
TEST_DESCRIPTION="Ensure %j Wants directives work"
|
||||
RUN_IN_UNPRIVILEGED_CONTAINER=yes
|
||||
|
||||
# shellcheck source=test/test-functions
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
|
||||
do_test "$@"
|
@ -1,7 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Dependent service for percent-j specifier
|
||||
After=testsuite-28-pre.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
@ -1,11 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Wants with percent-j specifier
|
||||
Wants=specifier-j-depends-%j.service
|
||||
After=specifier-j-depends-%j.service
|
||||
After=testsuite-28-pre.service
|
||||
Wants=testsuite-23-specifier-j-depends-%j.service
|
||||
After=testsuite-23-specifier-j-depends-%j.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=test -f /tmp/test-specifier-j-%j
|
||||
ExecStart=sh -c 'echo OK >/testok'
|
||||
ExecStart=touch /tmp/tetsuite-23-specifier-j-done
|
@ -1,4 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Service]
|
||||
ExecStart=rm -f /failed /testok
|
||||
Type=oneshot
|
15
test/units/testsuite-23.percentj-wantedby.sh
Executable file
15
test/units/testsuite-23.percentj-wantedby.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
# Ensure %j Wants directives work
|
||||
systemd-run --wait \
|
||||
--property="Type=oneshot" \
|
||||
--property="Wants=testsuite-23-specifier-j-wants.service" \
|
||||
--property="After=testsuite-23-specifier-j-wants.service" \
|
||||
true
|
||||
|
||||
test -f /tmp/tetsuite-23-specifier-j-done
|
@ -1,12 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=TEST-28-PERCENTJ-WANTEDBY
|
||||
# Testsuite: Ensure %j Wants directives work
|
||||
Wants=specifier-j-wants.service
|
||||
After=specifier-j-wants.service
|
||||
Requires=testsuite-28-pre.service
|
||||
After=testsuite-28-pre.service
|
||||
|
||||
[Service]
|
||||
ExecStart=true
|
||||
Type=oneshot
|
Loading…
Reference in New Issue
Block a user