summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/scp.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-11-01 07:48:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:20 +0000
commitb569aa0e0056a97b29577f5bda611ef3dd539db3 (patch)
tree64f4d7856959435abfc7c49258688f64861f6d7c /meta/lib/oeqa/runtime/cases/scp.py
parent3857e5c91da678d7bdc07712a1df9daa14354986 (diff)
downloadpoky-b569aa0e0056a97b29577f5bda611ef3dd539db3.tar.gz
oeqa/runtime/cases: Migrate runtime tests.
This migrates current runtime test suite to be used with the new framework. [YOCTO #10234] (From OE-Core rev: b39c61f2d442c79d03b73e8ffd104996fcb2177e) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/scp.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/scp.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/scp.py b/meta/lib/oeqa/runtime/cases/scp.py
new file mode 100644
index 0000000000..f488a6175b
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/scp.py
@@ -0,0 +1,33 @@
1import os
2from tempfile import mkstemp
3
4from oeqa.runtime.case import OERuntimeTestCase
5from oeqa.core.decorator.depends import OETestDepends
6from oeqa.core.decorator.oeid import OETestID
7
8class ScpTest(OERuntimeTestCase):
9
10 @classmethod
11 def setUpClass(cls):
12 cls.tmp_fd, cls.tmp_path = mkstemp()
13 with os.fdopen(cls.tmp_fd, 'w') as f:
14 f.seek(2 ** 22 -1)
15 f.write(os.linesep)
16
17 @classmethod
18 def tearDownClass(cls):
19 os.remove(cls.tmp_path)
20
21 @OETestID(220)
22 @OETestDepends(['ssh.SSHTest.test_ssh'])
23 def test_scp_file(self):
24 dst = '/tmp/test_scp_file'
25
26 (status, output) = self.target.copyTo(self.tmp_path, dst)
27 msg = 'File could not be copied. Output: %s' % output
28 self.assertEqual(status, 0, msg=msg)
29
30 (status, output) = self.target.run('ls -la %s' % dst)
31 self.assertEqual(status, 0, msg = 'SCP test failed')
32
33 self.target.run('rm %s' % dst)