Commit 7bf00c93 authored by Gerson Fernando Budke's avatar Gerson Fernando Budke Committed by Anas Nashif
Browse files

scripts: runners: openocd: Fix empty search path



When enable thread awareness feature for OpenOCD the search path was
converted to a list.  In some environments OPENOCD_DEFAULT_PATH may
not be defined.  That create an empty search path list system fails.
This add a test to skips fill search_args with openocd_search values
when list is empty.

Fixes #38272.

Signed-off-by: default avatarGerson Fernando Budke <nandojve@gmail.com>
parent 3ad2b06f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ class OpenOcdBinaryRunner(ZephyrBinaryRunner):
                    search_args.append('-s')
                    search_args.append(path.dirname(i))

        if cfg.openocd_search is not None:
            for p in cfg.openocd_search:
                search_args.extend(['-s', p])
        self.openocd_cmd = [cfg.openocd] + search_args