summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/gcc.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-28 11:53:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-29 10:58:55 +0100
commit26997d1d21453447e952c32ada2a7faa1a849db7 (patch)
tree6f34767d56f90733a26f3e23eea715a334649e0b /meta/lib/oeqa/sdk/gcc.py
parent527b28c10955daf0387597020d69593ce24bcaa4 (diff)
downloadpoky-26997d1d21453447e952c32ada2a7faa1a849db7.tar.gz
lib/oeqa: Add sdk tests for gcc/perl/python
Enhance testing of the generated SDK tarballs by adding tests for gcc/perl/python based on the existing runtime tests. (From OE-Core rev: 18160403427b2aab4207c939312fb0981c3f2d1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdk/gcc.py')
-rw-r--r--meta/lib/oeqa/sdk/gcc.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdk/gcc.py b/meta/lib/oeqa/sdk/gcc.py
new file mode 100644
index 0000000000..67994b9b5a
--- /dev/null
+++ b/meta/lib/oeqa/sdk/gcc.py
@@ -0,0 +1,36 @@
1import unittest
2import os
3import shutil
4from oeqa.oetest import oeSDKTest, skipModule
5from oeqa.utils.decorators import *
6
7def setUpModule():
8 machine = oeSDKTest.tc.d.getVar("MACHINE", True)
9 if not oeSDKTest.hasHostPackage("packagegroup-cross-canadian-" + machine):
10 skipModule("SDK doesn't contain a cross-canadian toolchain")
11
12
13class GccCompileTest(oeSDKTest):
14
15 @classmethod
16 def setUpClass(self):
17 for f in ['test.c', 'test.cpp', 'testmakefile']:
18 shutil.copyfile(os.path.join(self.tc.filesdir, f), self.tc.sdktestdir + f)
19
20 def test_gcc_compile(self):
21 self._run('$CC %s/test.c -o %s/test -lm' % (self.tc.sdktestdir, self.tc.sdktestdir))
22
23 def test_gpp_compile(self):
24 self._run('$CXX %s/test.c -o %s/test -lm' % (self.tc.sdktestdir, self.tc.sdktestdir))
25
26 def test_gpp2_compile(self):
27 self._run('$CXX %s/test.cpp -o %s/test -lm' % (self.tc.sdktestdir, self.tc.sdktestdir))
28
29 def test_make(self):
30 self._run('cd %s; make -f testmakefile' % self.tc.sdktestdir)
31
32 @classmethod
33 def tearDownClass(self):
34 files = [self.tc.sdktestdir + f for f in ['test.c', 'test.cpp', 'test.o', 'test', 'testmakefile']]
35 for f in files:
36 bb.utils.remove(f)