summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/cases/perl.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/cases/perl.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/cases/perl.py')
-rw-r--r--meta/lib/oeqa/sdk/cases/perl.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdk/cases/perl.py b/meta/lib/oeqa/sdk/cases/perl.py
new file mode 100644
index 0000000000..45f422ef0b
--- /dev/null
+++ b/meta/lib/oeqa/sdk/cases/perl.py
@@ -0,0 +1,28 @@
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-perl"):
9 skipModule("No perl package in the SDK")
10
11
12class PerlTest(oeSDKTest):
13
14 @classmethod
15 def setUpClass(self):
16 for f in ['test.pl']:
17 shutil.copyfile(os.path.join(self.tc.filesdir, f), self.tc.sdktestdir + f)
18 self.testfile = self.tc.sdktestdir + "test.pl"
19
20 def test_perl_exists(self):
21 self._run('which perl')
22
23 def test_perl_works(self):
24 self._run('perl %s/test.pl' % self.tc.sdktestdir)
25
26 @classmethod
27 def tearDownClass(self):
28 bb.utils.remove("%s/test.pl" % self.tc.sdktestdir)