]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3493] Filter out root tests from non-root runs only if passwordless sudo is set up
authorAndrei Pavel <andrei@isc.org>
Fri, 13 Jun 2025 04:41:50 +0000 (07:41 +0300)
committerAndrei Pavel <andrei@isc.org>
Tue, 17 Jun 2025 18:34:44 +0000 (21:34 +0300)
src/hooks/dhcp/ping_check/tests/meson.build
src/lib/dhcp/tests/meson.build

index 9cad2dc223c8a98931b2f95a7a0da1aabd9ed1f1..181525f34cfd0f4cb622153a2dbe7df3f3471546 100644 (file)
@@ -21,10 +21,15 @@ dhcp_ping_check_tests = executable(
 
 root_tests = 'RootICMPSocketTest.*:RootPingChannelTest.*:RootPingCheckMgr.*:RootPingCheckMgrTest.*'
 
+args_filter_out = []
+if PASSWORDLESS_SUDO_SET_UP
+    args_filter_out = [f'--gtest_filter=-@root_tests@']
+endif
+
 test(
     'dhcp-ping-check-tests',
     dhcp_ping_check_tests,
-    args: [f'--gtest_filter=-@root_tests@'],
+    args: args_filter_out,
     protocol: 'gtest',
     is_parallel: false,
     priority: -1,
index 333a730cb4d86261a74febd77c80d9f2ce7a4b43..b08f6ca9acc87165272035251cb23626ce4ec476 100644 (file)
@@ -69,10 +69,15 @@ kea_dhcp_tests = executable(
 
 root_tests = 'RootPktFilterBPFTest.*:RootPktFilterLPFTest.*'
 
+args_filter_out = []
+if PASSWORDLESS_SUDO_SET_UP
+    args_filter_out = [f'--gtest_filter=-@root_tests@']
+endif
+
 test(
     'kea-dhcp-tests',
     kea_dhcp_tests,
-    args: [f'--gtest_filter=-@root_tests@'],
+    args: args_filter_out,
     protocol: 'gtest',
     is_parallel: false,
     priority: -1,