]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
generate-sym-test: only look in .c and .h files 27493/head
authorLennart Poettering <lennart@poettering.net>
Tue, 2 May 2023 09:22:22 +0000 (11:22 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 2 May 2023 09:30:51 +0000 (11:30 +0200)
Otherwise it might find backup files and such, which triggered all kinds
of false positives (at least on my devel machine).

src/test/generate-sym-test.py

index 0d220d9a283fff80e099891e0cc55563647ad510..54e3c5fa10586dc65544de881c5d78103db0b37c 100755 (executable)
@@ -67,6 +67,8 @@ print('''        {}
 
 for dirpath, _, filenames in os.walk(sys.argv[2]):
     for filename in filenames:
+        if not filename.endswith(".c") and not filename.endswith(".h"):
+            continue
         with open(os.path.join(dirpath, filename), "r") as f:
             process_source_file(f)