diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-10 10:08:09 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-28 11:46:48 +0100 |
commit | d48b27bffdd31f0f5dbe0e6de43727400b0d5746 (patch) | |
tree | b5a7162d5d3239f778ce90cdea0cba78080fd58c /test/TEST-40-EXEC-COMMAND-EX | |
parent | test: move TEST-39-EXECRELOAD setup to static files (diff) | |
download | systemd-d48b27bffdd31f0f5dbe0e6de43727400b0d5746.tar.xz systemd-d48b27bffdd31f0f5dbe0e6de43727400b0d5746.zip |
test: move TEST-40-EXEC-COMMAND-EX setup to static files
Diffstat (limited to 'test/TEST-40-EXEC-COMMAND-EX')
-rwxr-xr-x | test/TEST-40-EXEC-COMMAND-EX/test.sh | 15 | ||||
-rwxr-xr-x | test/TEST-40-EXEC-COMMAND-EX/testsuite.sh | 46 |
2 files changed, 1 insertions, 60 deletions
diff --git a/test/TEST-40-EXEC-COMMAND-EX/test.sh b/test/TEST-40-EXEC-COMMAND-EX/test.sh index a7933b0070..eae4e37c96 100755 --- a/test/TEST-40-EXEC-COMMAND-EX/test.sh +++ b/test/TEST-40-EXEC-COMMAND-EX/test.sh @@ -13,21 +13,8 @@ test_setup() { setup_basic_environment mask_supporting_services - - # setup the testsuite service - cat >$initdir/etc/systemd/system/testsuite.service <<EOF -[Unit] -Description=Testsuite service - -[Service] -ExecStart=/testsuite.sh -Type=oneshot -EOF - cp testsuite.sh $initdir/ - - setup_testsuite ) setup_nspawn_root } -do_test "$@" +do_test "$@" 40 diff --git a/test/TEST-40-EXEC-COMMAND-EX/testsuite.sh b/test/TEST-40-EXEC-COMMAND-EX/testsuite.sh deleted file mode 100755 index 957d22031a..0000000000 --- a/test/TEST-40-EXEC-COMMAND-EX/testsuite.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -set -ex -set -o pipefail - -systemd-analyze log-level debug -systemd-analyze log-target console - -declare -A property - -property[1_one]=ExecCondition -property[2_two]=ExecStartPre -property[3_three]=ExecStart -property[4_four]=ExecStartPost -property[5_five]=ExecReload -property[6_six]=ExecStop -property[7_seven]=ExecStopPost - -# These should all get upgraded to the corresponding Ex property as the non-Ex variant -# does not support the ":" prefix (no-env-expand). -for c in "${!property[@]}"; do - systemd-run --unit="$c" -r -p "Type=oneshot" -p "${property[$c]}=:/bin/echo \${$c}" /bin/true - systemctl show -p "${property[$c]}" "$c" | grep -F "path=/bin/echo ; argv[]=/bin/echo \${$c} ; ignore_errors=no" - systemctl show -p "${property[$c]}Ex" "$c" | grep -F "path=/bin/echo ; argv[]=/bin/echo \${$c} ; flags=no-env-expand" -done - -declare -A property_ex - -property_ex[1_one_ex]=ExecConditionEx -property_ex[2_two_ex]=ExecStartPreEx -property_ex[3_three_ex]=ExecStartEx -property_ex[4_four_ex]=ExecStartPostEx -property_ex[5_five_ex]=ExecReloadEx -property_ex[6_six_ex]=ExecStopEx -property_ex[7_seven_ex]=ExecStopPostEx - -for c in "${!property_ex[@]}"; do - systemd-run --unit="$c" -r -p "Type=oneshot" -p "${property_ex[$c]}=:/bin/echo \${$c}" /bin/true - systemctl show -p "${property_ex[$c]%??}" "$c" | grep -F "path=/bin/echo ; argv[]=/bin/echo \${$c} ; ignore_errors=no" - systemctl show -p "${property_ex[$c]}" "$c" | grep -F "path=/bin/echo ; argv[]=/bin/echo \${$c} ; flags=no-env-expand" -done - -systemd-analyze log-level info - -echo OK > /testok - -exit 0 |