[OE-core] [PATCH] oeqa/runexported: Fix a problem with ssh_target_log existing in folder.

Lucian Musat george.l.musat at intel.com
Thu Sep 24 11:00:11 UTC 2015


When copying the exported tests to a remote machine ssh_target_log can
be transformed from softlink to file. This will recreate the link.

Signed-off-by: Lucian Musat <george.l.musat at intel.com>
---
 meta/lib/oeqa/runexported.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index d6097a1..07b5ba4 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -51,6 +51,8 @@ class FakeTarget(object):
         sshloglink = os.path.join(self.testdir, "ssh_target_log")
         if os.path.islink(sshloglink):
             os.unlink(sshloglink)
+        elif os.path.isfile(sshloglink):
+                os.remove(sshloglink)
         os.symlink(self.sshlog, sshloglink)
         print("SSH log file: %s" %  self.sshlog)
         self.connection = SSHControl(self.ip, logfile=self.sshlog)
-- 
2.1.4




More information about the Openembedded-core mailing list