]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: disable debugging logs from networkctl, resolvectl, and so on
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 9 Jul 2022 02:59:38 +0000 (11:59 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 9 Jul 2022 03:19:20 +0000 (12:19 +0900)
test/test-network/systemd-networkd-tests.py

index eb9344085101e068d16b2182446e72ef4b43d86e..a09396f52eaa80d96c9000dd77d153c5ee44b72f 100755 (executable)
@@ -52,6 +52,7 @@ timedatectl_bin=shutil.which('timedatectl', path=which_paths)
 use_valgrind=False
 enable_debug=True
 env = {}
+wait_online_env = {}
 asan_options=None
 lsan_options=None
 ubsan_options=None
@@ -691,7 +692,7 @@ class Utilities():
         if ipv6:
             args += ['--ipv6']
         try:
-            check_output(*args, env=env)
+            check_output(*args, env=wait_online_env)
         except subprocess.CalledProcessError:
             for link in links_with_operstate:
                 name = link.split(':')[0]
@@ -5712,8 +5713,6 @@ if __name__ == '__main__':
         timedatectl_cmd = [timedatectl_bin]
         wait_online_cmd = [wait_online_bin]
 
-    if enable_debug:
-        env.update({ 'SYSTEMD_LOG_LEVEL' : 'debug' })
     if asan_options:
         env.update({ 'ASAN_OPTIONS' : asan_options })
     if lsan_options:
@@ -5721,5 +5720,9 @@ if __name__ == '__main__':
     if ubsan_options:
         env.update({ 'UBSAN_OPTIONS' : ubsan_options })
 
+    wait_online_env = env.copy()
+    if enable_debug:
+        wait_online_env.update({ 'SYSTEMD_LOG_LEVEL' : 'debug' })
+
     sys.argv[1:] = unknown_args
     unittest.main(verbosity=3)