mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-27 01:55:32 +03:00
test: move TEST-28-PERCENTJ-WANTEDBY setup to static files
This commit is contained in:
parent
468874997a
commit
94370e627f
@ -15,42 +15,8 @@ test_setup() {
|
||||
|
||||
setup_basic_environment
|
||||
mask_supporting_services
|
||||
|
||||
# Set up the services.
|
||||
cat >$initdir/etc/systemd/system/specifier-j-wants.service << EOF
|
||||
[Unit]
|
||||
Description=Wants with percent-j specifier
|
||||
Wants=specifier-j-depends-%j.service
|
||||
After=specifier-j-depends-%j.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=test -f /tmp/test-specifier-j-%j
|
||||
ExecStart=/bin/sh -c 'echo OK > /testok'
|
||||
EOF
|
||||
cat >$initdir/etc/systemd/system/specifier-j-depends-wants.service << EOF
|
||||
[Unit]
|
||||
Description=Dependent service for percent-j specifier
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=touch /tmp/test-specifier-j-wants
|
||||
EOF
|
||||
cat >$initdir/etc/systemd/system/testsuite.service << EOF
|
||||
[Unit]
|
||||
Description=Testsuite: Ensure %j Wants directives work
|
||||
Wants=specifier-j-wants.service
|
||||
After=specifier-j-wants.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/true
|
||||
EOF
|
||||
|
||||
setup_testsuite
|
||||
)
|
||||
|
||||
setup_nspawn_root
|
||||
}
|
||||
|
||||
do_test "$@"
|
||||
do_test "$@" 28
|
||||
|
@ -22,6 +22,8 @@ install_subdir('testsuite-11.units',
|
||||
install_dir : testdata_dir)
|
||||
install_subdir('testsuite-16.units',
|
||||
install_dir : testdata_dir)
|
||||
install_subdir('testsuite-28.units',
|
||||
install_dir : testdata_dir)
|
||||
|
||||
testsuite08_dir = testdata_dir + '/testsuite-08.units'
|
||||
install_data('testsuite-08.units/-.mount',
|
||||
|
@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Dependent service for percent-j specifier
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=touch /tmp/test-specifier-j-wants
|
9
test/testsuite-28.units/specifier-j-wants.service
Normal file
9
test/testsuite-28.units/specifier-j-wants.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Wants with percent-j specifier
|
||||
Wants=specifier-j-depends-%j.service
|
||||
After=specifier-j-depends-%j.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=test -f /tmp/test-specifier-j-%j
|
||||
ExecStart=sh -c 'echo OK > /testok'
|
9
test/units/testsuite-28.service
Normal file
9
test/units/testsuite-28.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=TEST-28-PERCENTJ-WANTEDBY
|
||||
# Testsuite: Ensure %j Wants directives work
|
||||
Wants=specifier-j-wants.service
|
||||
After=specifier-j-wants.service
|
||||
|
||||
[Service]
|
||||
ExecStart=true
|
||||
Type=oneshot
|
Loading…
Reference in New Issue
Block a user