From 53c006ba1a4982db8af3e7b4ff91cd1f64f9f2d4 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 19 Oct 2023 14:40:53 +0100 Subject: 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 Signed-off-by: Richard Purdie --- scripts/patchtest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/patchtest') 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] -- cgit v1.2.3-54-g00ecf