Ver código fonte

oeqa/runexported: Fix a problem with ssh_target_log existing in folder.

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.

(From OE-Core rev: 2bc7732c27e192821b9ebb76e1dfba739cf5b088)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Lucian Musat 9 anos atrás
pai
commit
1222eb18aa
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      meta/lib/oeqa/runexported.py

+ 2 - 2
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)