diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-15 07:30:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-15 07:30:04 +0200 |
commit | 985ea31173f5ff2ad7159dcf5f3f4ed4228972e3 (patch) | |
tree | 04e61453e75ae2b3a22f12fdaf88fa9cfbe54962 /test | |
parent | Finalize for v256~rc2 (diff) | |
parent | test: Add TEST-85-NETWORK to run systemd-networkd-tests.py (diff) | |
download | systemd-985ea31173f5ff2ad7159dcf5f3f4ed4228972e3.tar.xz systemd-985ea31173f5ff2ad7159dcf5f3f4ed4228972e3.zip |
Merge pull request #32666 from DaanDeMeyer/mkosi-network
test: Add TEST-85-NETWORK to run systemd-networkd-tests.py
Diffstat (limited to 'test')
-rw-r--r-- | test/TEST-85-NETWORK/Makefile | 6 | ||||
-rw-r--r-- | test/TEST-85-NETWORK/meson.build | 42 | ||||
-rw-r--r-- | test/meson.build | 1 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 10 |
4 files changed, 57 insertions, 2 deletions
diff --git a/test/TEST-85-NETWORK/Makefile b/test/TEST-85-NETWORK/Makefile new file mode 100644 index 0000000000..653f16163f --- /dev/null +++ b/test/TEST-85-NETWORK/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +all setup run clean clean-again: + true + +.PHONY: all setup run clean clean-again diff --git a/test/TEST-85-NETWORK/meson.build b/test/TEST-85-NETWORK/meson.build new file mode 100644 index 0000000000..95b91f77df --- /dev/null +++ b/test/TEST-85-NETWORK/meson.build @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +name = fs.name(meson.current_source_dir()) +unit = configure_file( + input : files('../test.service.in'), + output : '@0@.service'.format(name), + configuration : integration_test_template['configuration'] + { + 'command' : '@0@ --no-journal'.format(testdata_dir / 'test-network/systemd-networkd-tests.py') + }, +) + +foreach testcase : [ + 'NetworkctlTests', + 'NetworkdMatchTests', + 'WaitOnlineTests', + 'NetworkdNetDevTests', + 'NetworkdL2TPTests', + 'NetworkdNetworkTests', + 'NetworkdTCTests', + 'NetworkdStateFileTests', + 'NetworkdBondTests', + 'NetworkdBridgeTests', + 'NetworkdSRIOVTests', + 'NetworkdLLDPTests', + 'NetworkdRATests', + 'NetworkdDHCPServerTests', + 'NetworkdDHCPServerRelayAgentTests', + 'NetworkdDHCPClientTests', + 'NetworkdDHCPPDTests', + 'NetworkdIPv6PrefixTests', + 'NetworkdMTUTests', +] + integration_tests += [ + integration_test_template + { + 'name' : '@0@-@1@'.format(name, testcase), + 'unit' : unit, + 'cmdline' : integration_test_template['cmdline'] + [ + 'systemd.setenv=TEST_MATCH_TESTCASE=@0@'.format(testcase) + ], + }, + ] +endforeach diff --git a/test/meson.build b/test/meson.build index 2a07d120fa..1026be67cb 100644 --- a/test/meson.build +++ b/test/meson.build @@ -372,6 +372,7 @@ foreach dirname : [ 'TEST-82-SOFTREBOOT', 'TEST-83-BTRFS', 'TEST-84-STORAGETM', + 'TEST-85-NETWORK', ] subdir(dirname) endforeach diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index eb9a2ebdfc..6e7ce7cbd8 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -7805,5 +7805,11 @@ if __name__ == '__main__': if enable_debug: wait_online_env.update({'SYSTEMD_LOG_LEVEL': 'debug'}) - sys.argv[1:] = unknown_args - unittest.main(verbosity=3) + unittest.main( + verbosity=3, + argv=[ + sys.argv[0], + *unknown_args, + *(["-k", match] if (match := os.getenv("TEST_MATCH_TESTCASE")) else []) + ], + ) |