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 14:53:45 +0100 |
commit | 3fbd82e194095c2e82568ea254e3ad8d198778fb (patch) | |
tree | fd8dc226bdaba3fa6f6c2d01fb64a5b52bbaa4be /scripts | |
parent | 4cea51a9addeae3a7bd054dcfa34c59ccda31099 (diff) | |
download | poky-3fbd82e194095c2e82568ea254e3ad8d198778fb.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.
(From OE-Core rev: 4d6b586d37ab4528ed6dae6779cd730af9ef09c2)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/patchtest | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/patchtest b/scripts/patchtest index b71345d828..a1c824f7b7 100755 --- a/scripts/patchtest +++ b/scripts/patchtest | |||
@@ -177,7 +177,7 @@ def main(): | |||
177 | return 1 | 177 | return 1 |
178 | 178 | ||
179 | if os.path.isdir(patch_path): | 179 | if os.path.isdir(patch_path): |
180 | patch_list = [os.path.join(patch_path, filename) for filename in os.listdir(patch_path)] | 180 | patch_list = [os.path.join(patch_path, filename) for filename in sorted(os.listdir(patch_path))] |
181 | else: | 181 | else: |
182 | patch_list = [patch_path] | 182 | patch_list = [patch_path] |
183 | 183 | ||