Skip to content

Commit

Permalink
Fix run_testsuite.py so it works if not all of the apps are specified. (
Browse files Browse the repository at this point in the history
#25600)

When running only a subset of tests (e.g. only DL_* tests), not all apps are
needed for the tests to run.

This used to work because we used a fake "NOT_FOUND_IN_OUTPUT_" path for the
missing apps, which was a string so the string manipulation on it worked, and
the output was never used.

But after #25368 we end up
with None where we expect a string, and the script dies.

The fix is just to skip string manipulation on the path of apps that have None
as a path.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Oct 19, 2023
1 parent 27e6ee4 commit 1326440
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/tests/chiptest/test_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str,
if path == paths.chip_tool or path == paths.chip_repl_yaml_tester_cmd or path == paths.chip_tool_with_python_cmd:
continue

# Skip items where we don't actually have a path. This can
# 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:
continue

# For the app indicated by self.target, give it the 'default' key to add to the register
if path == target_app:
key = 'default'
Expand Down

0 comments on commit 1326440

Please sign in to comment.