summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/python.py
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2016-10-31 17:20:48 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:19 +0000
commit2726c26efe8e135bb63408cad38509a89e49fa0d (patch)
tree3596d1e4294e18b57ad4763c149abf913f6671e3 /meta/lib/oeqa/sdk/python.py
parent8d3640b90dca79f7a79b3a62de5cf5326577434e (diff)
downloadpoky-2726c26efe8e135bb63408cad38509a89e49fa0d.tar.gz
oeqa/sdk: Move test cases inside cases directory
For match with the new structure of the OEQA framework. In the new framework Test component base directory in this case sdk module will contain case and context implementations. [YOCTO #10599] (From OE-Core rev: 57af8ee4021c302bd351adf03e6d85274ad7efd5) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> 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/sdk/python.py')
-rw-r--r--meta/lib/oeqa/sdk/python.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/meta/lib/oeqa/sdk/python.py b/meta/lib/oeqa/sdk/python.py
deleted file mode 100644
index 896fab4dfb..0000000000
--- a/meta/lib/oeqa/sdk/python.py
+++ /dev/null
@@ -1,32 +0,0 @@
1import unittest
2import os
3import shutil
4from oeqa.oetest import oeSDKTest, skipModule
5from oeqa.utils.decorators import *
6
7def setUpModule():
8 if not oeSDKTest.hasHostPackage("nativesdk-python"):
9 skipModule("No python package in the SDK")
10
11
12class PythonTest(oeSDKTest):
13
14 @classmethod
15 def setUpClass(self):
16 for f in ['test.py']:
17 shutil.copyfile(os.path.join(self.tc.filesdir, f), self.tc.sdktestdir + f)
18
19 def test_python_exists(self):
20 self._run('which python')
21
22 def test_python_stdout(self):
23 output = self._run('python %s/test.py' % self.tc.sdktestdir)
24 self.assertEqual(output.strip(), "the value of a is 0.01", msg="Incorrect output: %s" % output)
25
26 def test_python_testfile(self):
27 self._run('ls /tmp/testfile.python')
28
29 @classmethod
30 def tearDownClass(self):
31 bb.utils.remove("%s/test.py" % self.tc.sdktestdir)
32 bb.utils.remove("/tmp/testfile.python")