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

Lucian Musat george.l.musat at intel.com
Mon Sep 28 14:25:56 UTC 2015


When copying the exported tests to a remote machine ssh_target_log can
be transformed from softlink to file which will throw an error when
trying to run again.

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

diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index 4213cab..0daedd0 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -49,8 +49,8 @@ class FakeTarget(object):
     def exportStart(self):
         self.sshlog = os.path.join(self.testdir, "ssh_target_log.%s" % self.datetime)
         sshloglink = os.path.join(self.testdir, "ssh_target_log")
-        if os.path.islink(sshloglink):
-            os.unlink(sshloglink)
+        if os.path.exists(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