mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
patchtest: sort when reading patches from a directory
When reading patches from a directory it's important to sort the output of os.listdir(), as that returns the files in an effectively random order. We can't test the patches apply if they're applied in the wrong order, and typically patch filenames are prefixed with a counter to ensure the order is correct. (From OE-Core rev: b2bbd5b4071d913ed24a9ffe43d4a97b0db16c6c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a98b1229df
commit
53c006ba1a
@@ -178,7 +178,7 @@ def main():
|
||||
return 1
|
||||
|
||||
if os.path.isdir(patch_path):
|
||||
patch_list = [os.path.join(patch_path, filename) for filename in os.listdir(patch_path)]
|
||||
patch_list = [os.path.join(patch_path, filename) for filename in sorted(os.listdir(patch_path))]
|
||||
else:
|
||||
patch_list = [patch_path]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user