diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-03-23 15:26:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-23 15:26:54 +0100 |
commit | 959071cac27c0f59df11a204522b887ae2bec02a (patch) | |
tree | 426217c1f619c2e244fe199c5fe7c0ca5528e23e /test | |
parent | 2f5fa62bf7451b7f3acf5d4dace285e1495a732d (diff) | |
parent | 37c1d5e97dbc869edd8fc178427714e2d9428d2b (diff) | |
download | systemd-959071cac27c0f59df11a204522b887ae2bec02a.tar.gz |
Merge pull request #8552 from keszybz/test-improvements
Test and diagnostics improvements
Diffstat (limited to 'test')
-rw-r--r-- | test/meson.build | 10 | ||||
-rw-r--r-- | test/test-execute/exec-capabilityboundingset-invert.service | 2 | ||||
-rw-r--r-- | test/test-execute/exec-privatenetwork-yes.service | 2 | ||||
-rw-r--r-- | test/test-execute/exec-specifier-interpolation.service | 2 |
4 files changed, 10 insertions, 6 deletions
diff --git a/test/meson.build b/test/meson.build index 99103e9570..809bd44a93 100644 --- a/test/meson.build +++ b/test/meson.build @@ -233,9 +233,13 @@ custom_target( output : 'sys', build_by_default : true) -udev_test_pl = find_program('udev-test.pl') -test('udev-test', - udev_test_pl) +if perl.found() + udev_test_pl = find_program('udev-test.pl') + test('udev-test', + udev_test_pl) +else + message('Skipping udev-test because perl is not available') +endif if conf.get('ENABLE_HWDB') == 1 hwdb_test_sh = find_program('hwdb-test.sh') diff --git a/test/test-execute/exec-capabilityboundingset-invert.service b/test/test-execute/exec-capabilityboundingset-invert.service index fd5d248702..1abe390601 100644 --- a/test/test-execute/exec-capabilityboundingset-invert.service +++ b/test/test-execute/exec-capabilityboundingset-invert.service @@ -2,6 +2,6 @@ Description=Test for CapabilityBoundingSet [Service] -ExecStart=/bin/sh -x -c 'c=$$(capsh --print | grep "^Bounding set .*cap_chown"); test -z "$$c"' +ExecStart=/bin/sh -x -c '! capsh --print | grep "^Bounding set .*cap_chown"' Type=oneshot CapabilityBoundingSet=~CAP_CHOWN diff --git a/test/test-execute/exec-privatenetwork-yes.service b/test/test-execute/exec-privatenetwork-yes.service index 3df543ec93..a38d24912f 100644 --- a/test/test-execute/exec-privatenetwork-yes.service +++ b/test/test-execute/exec-privatenetwork-yes.service @@ -2,6 +2,6 @@ Description=Test for PrivateNetwork [Service] -ExecStart=/bin/sh -x -c 'i=$$(ip link | grep ": " | grep -v ": lo:"); test -z "$$i"' +ExecStart=/bin/sh -x -c '! ip link | grep ": " | grep -Ev ": (lo|sit0@.*):"' Type=oneshot PrivateNetwork=yes diff --git a/test/test-execute/exec-specifier-interpolation.service b/test/test-execute/exec-specifier-interpolation.service index 3e62662aa9..f128e3c4b3 100644 --- a/test/test-execute/exec-specifier-interpolation.service +++ b/test/test-execute/exec-specifier-interpolation.service @@ -3,4 +3,4 @@ Description=https://github.com/systemd/systemd/issues/2637 [Service] Type=oneshot -ExecStart=/bin/sh -x -c "perl -e 'exit(!(qq{%%U} eq qq{\\x25U}))'" +ExecStart=/bin/sh -x -c "! test -x perl || perl -e 'exit(!(qq{%%U} eq qq{\\x25U}))'" |