summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/gcc.py
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/lib/oeqa/runtime/gcc.py
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/lib/oeqa/runtime/gcc.py')
-rw-r--r--meta/lib/oeqa/runtime/gcc.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
new file mode 100644
index 0000000000..b63badd3e4
--- /dev/null
+++ b/meta/lib/oeqa/runtime/gcc.py
@@ -0,0 +1,36 @@
1import unittest
2import os
3from oeqa.oetest import oeRuntimeTest, skipModule
4from oeqa.utils.decorators import *
5
6def setUpModule():
7 if not oeRuntimeTest.hasFeature("tools-sdk"):
8 skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
9
10
11class GccCompileTest(oeRuntimeTest):
12
13 @classmethod
14 def setUpClass(self):
15 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.c"), "/tmp/test.c")
16 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "testmakefile"), "/tmp/testmakefile")
17
18 def test_gcc_compile(self):
19 (status, output) = self.target.run('gcc /tmp/test.c -o /tmp/test -lm')
20 self.assertEqual(status, 0, msg="gcc compile failed, output: %s" % output)
21 (status, output) = self.target.run('/tmp/test')
22 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
23
24 def test_gpp_compile(self):
25 (status, output) = self.target.run('g++ /tmp/test.c -o /tmp/test -lm')
26 self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
27 (status, output) = self.target.run('/tmp/test')
28 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
29
30 def test_make(self):
31 (status, output) = self.target.run('cd /tmp; make -f testmakefile')
32 self.assertEqual(status, 0, msg="running make failed, output %s" % output)
33
34 @classmethod
35 def tearDownClass(self):
36 oeRuntimeTest.tc.target.run("rm /tmp/test.c /tmp/test.o /tmp/test /tmp/testmakefile")