summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/gcc.py
diff options
context:
space:
mode:
authorLucian Musat <georgex.l.musat@intel.com>2014-07-25 12:02:30 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-25 16:54:42 +0100
commit8e26ab7d52edd13ffa50b2d0b26606bea8890e76 (patch)
tree2b2bcfc87341d3a5136710c8412fb6348ce2069d /meta/lib/oeqa/runtime/gcc.py
parent242cceeedf2351e4337d8e45fb4c2c8360937ead (diff)
downloadpoky-8e26ab7d52edd13ffa50b2d0b26606bea8890e76.tar.gz
oeqa/rutime: Added testcase decorators for automated runtime tests. Also added LogResults decorator for oeTest class in oetest.py
(From OE-Core rev: 95b83084487d0712362ade8ac487999c3274bb96) Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/gcc.py')
-rw-r--r--meta/lib/oeqa/runtime/gcc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
index b63badd3e4..08b3cf1230 100644
--- a/meta/lib/oeqa/runtime/gcc.py
+++ b/meta/lib/oeqa/runtime/gcc.py
@@ -15,18 +15,21 @@ class GccCompileTest(oeRuntimeTest):
15 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.c"), "/tmp/test.c") 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") 16 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "testmakefile"), "/tmp/testmakefile")
17 17
18 @testcase(203)
18 def test_gcc_compile(self): 19 def test_gcc_compile(self):
19 (status, output) = self.target.run('gcc /tmp/test.c -o /tmp/test -lm') 20 (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 self.assertEqual(status, 0, msg="gcc compile failed, output: %s" % output)
21 (status, output) = self.target.run('/tmp/test') 22 (status, output) = self.target.run('/tmp/test')
22 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output) 23 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
23 24
25 @testcase(200)
24 def test_gpp_compile(self): 26 def test_gpp_compile(self):
25 (status, output) = self.target.run('g++ /tmp/test.c -o /tmp/test -lm') 27 (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) 28 self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
27 (status, output) = self.target.run('/tmp/test') 29 (status, output) = self.target.run('/tmp/test')
28 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output) 30 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
29 31
32 @testcase(204)
30 def test_make(self): 33 def test_make(self):
31 (status, output) = self.target.run('cd /tmp; make -f testmakefile') 34 (status, output) = self.target.run('cd /tmp; make -f testmakefile')
32 self.assertEqual(status, 0, msg="running make failed, output %s" % output) 35 self.assertEqual(status, 0, msg="running make failed, output %s" % output)