]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: sort files in generate-sym-test.py
authorLuca Boccassi <bluca@debian.org>
Sat, 11 Nov 2023 20:29:03 +0000 (20:29 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 12 Nov 2023 03:54:23 +0000 (12:54 +0900)
The test binaries are different depending on the filesystem, due to os.walk().
Sort the input before iterating on it to make it stable.

src/test/generate-sym-test.py

index 54e3c5fa10586dc65544de881c5d78103db0b37c..e97b6bbbd524975a693b7d4e6af50662e6ad2851 100755 (executable)
@@ -65,7 +65,7 @@ with open(sys.argv[1], "r") as f:
 print('''        {}
 }, symbols_from_source[] = {''')
 
-for dirpath, _, filenames in os.walk(sys.argv[2]):
+for dirpath, _, filenames in sorted(os.walk(sys.argv[2])):
     for filename in filenames:
         if not filename.endswith(".c") and not filename.endswith(".h"):
             continue