From: Adrian Freihofer <[email protected]> Use QEMU target commands instead of spawning a separate ssh process for simple target-side executable checks in the ide=code selftest helper. This keeps the test consistent with the rest of the qemu-based cleanup and avoids duplicating SSH option handling in the test itself.
Signed-off-by: Adrian Freihofer <[email protected]> --- meta/lib/oeqa/selftest/cases/devtool.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index a16c7a93f6..5301b6013e 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -3529,13 +3529,10 @@ class DevtoolIdeSdkGccTests(DevtoolIdeSdkTests): self.assertEqual(task_command, "ssh", f"Task '{prelaunch_task_name}' should use ssh command") self.assertTrue(len(task_args) >= 2, f"Task '{prelaunch_task_name}' should have at least 2 args (ssh options and remote command)") - sshargs = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' - result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, 'test -x /usr/bin/gdbserver'), - output_log=self._cmd_logger) - self.assertEqual(result.status, 0, "gdbserver should be installed on target") - result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, 'test -x ' + os.path.join('/usr/bin', example_exe)), - output_log=self._cmd_logger) - self.assertEqual(result.status, 0, "Example binary should be installed on target") + status, _ = qemu.run('test -x /usr/bin/gdbserver') + self.assertEqual(status, 0, "gdbserver should be installed on target") + status, _ = qemu.run('test -x ' + os.path.join('/usr/bin', example_exe)) + self.assertEqual(status, 0, "Example binary should be installed on target") # Start gdbserver on target using the task command (keep the ssh connection open while debugging) ssh_gdbserver_cmd = [task_command] + task_args -- 2.55.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#243550): https://lists.openembedded.org/g/openembedded-core/message/243550 Mute This Topic: https://lists.openembedded.org/mt/120780722/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
