diff options
author | Ross Burton <ross.burton@arm.com> | 2023-10-19 14:40:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-19 17:00:56 +0100 |
commit | b2bbd5b4071d913ed24a9ffe43d4a97b0db16c6c (patch) | |
tree | 091ea16093552d0bdb0311b5f78c818ca63c4f4d | |
parent | 2d24ff9568d729b17cfc746d0948e63c78d9f3ae (diff) | |
download | openembedded-core-b2bbd5b4071d913ed24a9ffe43d4a97b0db16c6c.tar.gz |
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.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/patchtest | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/patchtest b/scripts/patchtest index be40e4b2a4..7b47d45dce 100755 --- a/scripts/patchtest +++ b/scripts/patchtest @@ -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] |