fix(ci): fixing log collection for xNB run logs and iper operations

* Copying everything back to the python executor workspace
    * For iperf operations, client and server logs are always copied,
      even when successful
    * for xNB run logs, since we could delete completely xNB workspaces
      on the python executor, they are always there
  * Copying back to the xNB server #0 for artifacting

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
Raphael Defosseux
2022-10-26 21:35:18 +02:00
parent c447b814c2
commit f3594a663a
3 changed files with 48 additions and 3 deletions
+3 -2
View File
@@ -229,10 +229,11 @@ class SSHConnection():
else:
return -1
def copyout(self, ipaddress, username, password, source, destination):
def copyout(self, ipaddress, username, password, source, destination, silent=False):
count = 0
copy_status = False
logging.info('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination)
if not silent:
logging.info('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination)
while count < 4:
scp_spawn = pexpect.spawn('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination, timeout = 100)
scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT])