From 958f40e7cc9b65fbbbdf3b39e41eecf3f57431eb Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 26 Oct 2016 18:39:44 +0100 Subject: [PATCH] libs/utils/env: Explicitly check 'host' setting is present for Linux For Linux targets you need a 'host' parameter to set up the SSH connection. If it's missing, the error appears at the end of a deep dark call stack. Add an explicit check before constructing the LinuxTarget so it's more obvious what you did wrong when this param is missing. --- libs/utils/env.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/utils/env.py b/libs/utils/env.py index 3f2bbc8fa..3d76cd872 100644 --- a/libs/utils/env.py +++ b/libs/utils/env.py @@ -462,6 +462,9 @@ class TestEnv(ShareState): if platform_type.lower() == 'linux': logging.debug('%14s - Setup LINUX target...', 'Target') + if "host" not in self.__connection_settings: + raise ValueError('Missing "host" param in Linux target conf') + self.target = devlib.LinuxTarget( platform = platform, connection_settings = self.__connection_settings, -- GitLab