From 17135214db28ce26fbee1afb59ed0a1e60c34a44 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 5 May 2023 19:17:33 +0100 Subject: [PATCH] The skipping of items without a relevant path was failing to pick items with the final element set to None. Now we skip whenever the final element in the path is None. (#26328) Depending on the exact test setup, paths, including ones that initially come back as `[ None ]` because the application does not exist, can end up with a prefix (e.g. to run the application in a network namespace on Linux), so we can't rely on missing applications being represented by a single-element list. --- scripts/tests/chiptest/test_definition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index a655fa894eb3c9..5b0f4a548f505c 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -283,7 +283,7 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, # happen if the relevant application does not exist. It's # non-fatal as long as we are not trying to run any tests that # need that application. - if len(path) == 1 and path[0] is None: + if path[-1] is None: continue # For the app indicated by self.target, give it the 'default' key to add to the register