]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: introduce dump_dnsmasq_log_file()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Dec 2021 00:55:54 +0000 (09:55 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Dec 2021 01:09:07 +0000 (10:09 +0900)
test/test-network/systemd-networkd-tests.py

index 009ab70699012db34d248f4a1a640ce44f7929ea..28a54dc4f753d398be90005e8f2c281bbb8cb1c1 100755 (executable)
@@ -526,6 +526,11 @@ def stop_by_pid_file(pid_file):
 def stop_dnsmasq():
     stop_by_pid_file(dnsmasq_pid_file)
 
+def dump_dnsmasq_log_file():
+    if os.path.exists(dnsmasq_log_file):
+        with open (dnsmasq_log_file) as in_file:
+            print(in_file.read())
+
 def search_words_in_dnsmasq_log(words, show_all=False):
     if os.path.exists(dnsmasq_log_file):
         with open (dnsmasq_log_file) as in_file: