summaryrefslogtreecommitdiffstats
path: root/scripts/patchtest
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-10-19 14:40:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-19 17:01:04 +0100
commit53c006ba1a4982db8af3e7b4ff91cd1f64f9f2d4 (patch)
tree192a798fef517809886e6d4c2039ada2a3674d39 /scripts/patchtest
parenta98b1229df8d614beeb452d7a0d8a145862cbab0 (diff)
downloadpoky-53c006ba1a4982db8af3e7b4ff91cd1f64f9f2d4.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: b2bbd5b4071d913ed24a9ffe43d4a97b0db16c6c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/patchtest')
-rwxr-xr-xscripts/patchtest2
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():
178 return 1 178 return 1
179 179
180 if os.path.isdir(patch_path): 180 if os.path.isdir(patch_path):
181 patch_list = [os.path.join(patch_path, filename) for filename in os.listdir(patch_path)] 181 patch_list = [os.path.join(patch_path, filename) for filename in sorted(os.listdir(patch_path))]
182 else: 182 else:
183 patch_list = [patch_path] 183 patch_list = [patch_path]
184 184