summaryrefslogtreecommitdiff
path: root/tct
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-09-26 17:29:41 +0200
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-01-09 19:46:14 +0100
commit37aa8258baa34cfff2c37c304cb5f98e7c5d024a (patch)
treeb759c5fdfaf346fcb92e94094d9ec7ccfbc0bbe0 /tct
parent18105aff1a96caae1bb384490d24e5a3d334cdb8 (diff)
downloadmajor-37aa8258baa34cfff2c37c304cb5f98e7c5d024a.tar.gz
major-37aa8258baa34cfff2c37c304cb5f98e7c5d024a.tar.bz2
major-37aa8258baa34cfff2c37c304cb5f98e7c5d024a.zip
Add pull to SSH and SDB in tct/run/common_test.py
Change-Id: I5f549d1fa9dff3bcc075066521a3cd38f2335a1f Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tct')
-rwxr-xr-xtct/run/common_test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tct/run/common_test.py b/tct/run/common_test.py
index cb83afd..e8fa68f 100755
--- a/tct/run/common_test.py
+++ b/tct/run/common_test.py
@@ -18,6 +18,13 @@ class SSH(object):
return subprocess.Popen(["sshpass", "-p", "tizen", "ssh", "-F", self.ssh_config, "root@" + self.ip] + cmd,
stdout=subprocess.PIPE)
+ def pull(self, src, dest):
+ """
+ src, dest -> returncode (int)
+ """
+ return subprocess.call(["sshpass", "-p", "tizen", "scp", "-F", self.ssh_config,
+ "root@" + self.ip + ":" + src, dest], stdout=subprocess.PIPE)
+
class SDB(object):
def __init__(self, serial):
self.serial = serial
@@ -28,6 +35,12 @@ class SDB(object):
"""
return subprocess.Popen(["sdb", "-s", self.serial, "shell"] + cmd, stdout=subprocess.PIPE)
+ def pull(self, src, dest):
+ """
+ src, dest -> returncode (int)
+ """
+ return subprocess.call(["sdb", "-s", self.serial, "pull", src, dest], stdout=subprocess.PIPE)
+
class CommonTest(Test):
default_params = {'timeout': 60.0}