Skip to content

Commit 6de6927

Browse files
committed
Moving grm parsing to a function for testing
1 parent 7ddb278 commit 6de6927

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/mbed_os_tools/test/host_tests_runner/host_test_default.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,9 @@ def callback__notify_prn(key, value, timestamp):
179179
}
180180

181181
if self.options.global_resource_mgr:
182-
grm_module, grm_host, grm_port = self.options.global_resource_mgr.split(':')
183-
184-
config.update({
185-
"conn_resource" : 'grm',
186-
"grm_module" : grm_module,
187-
"grm_host" : grm_host,
188-
"grm_port" : grm_port,
189-
})
182+
grm_config = self._parse_grm(self.options.global_resource_mgr)
183+
grm_config["conn_resource"] = "grm"
184+
config.update(grm_config)
190185

191186
if self.options.fast_model_connection:
192187

@@ -572,3 +567,13 @@ def match_log(self, line):
572567
# May not be a regular expression
573568
return False
574569
return self.compare_log_idx == len(self.compare_log)
570+
571+
@staticmethod
572+
def _parse_grm(grm_arg):
573+
grm_module, grm_host, grm_port = grm_arg.split(':')
574+
575+
return {
576+
"grm_module" : grm_module,
577+
"grm_host" : grm_host,
578+
"grm_port" : grm_port,
579+
}

0 commit comments

Comments
 (0)