diff options
Diffstat (limited to 'meta/lib/oeqa/runtime_cases/gcc.py')
-rw-r--r-- | meta/lib/oeqa/runtime_cases/gcc.py | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/meta/lib/oeqa/runtime_cases/gcc.py b/meta/lib/oeqa/runtime_cases/gcc.py deleted file mode 100644 index 6edb89f6f2..0000000000 --- a/meta/lib/oeqa/runtime_cases/gcc.py +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | import unittest | ||
2 | import os | ||
3 | from oeqa.oetest import oeRuntimeTest, skipModule | ||
4 | from oeqa.utils.decorators import * | ||
5 | |||
6 | def setUpModule(): | ||
7 | if not oeRuntimeTest.hasFeature("tools-sdk"): | ||
8 | skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES") | ||
9 | |||
10 | |||
11 | class GccCompileTest(oeRuntimeTest): | ||
12 | |||
13 | @classmethod | ||
14 | def setUpClass(self): | ||
15 | oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, "test.c"), "/tmp/test.c") | ||
16 | oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "testmakefile"), "/tmp/testmakefile") | ||
17 | oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, "test.cpp"), "/tmp/test.cpp") | ||
18 | |||
19 | @testcase(203) | ||
20 | def test_gcc_compile(self): | ||
21 | (status, output) = self.target.run('gcc /tmp/test.c -o /tmp/test -lm') | ||
22 | self.assertEqual(status, 0, msg="gcc compile failed, output: %s" % output) | ||
23 | (status, output) = self.target.run('/tmp/test') | ||
24 | self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output) | ||
25 | |||
26 | @testcase(200) | ||
27 | def test_gpp_compile(self): | ||
28 | (status, output) = self.target.run('g++ /tmp/test.c -o /tmp/test -lm') | ||
29 | self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output) | ||
30 | (status, output) = self.target.run('/tmp/test') | ||
31 | self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output) | ||
32 | |||
33 | @testcase(1142) | ||
34 | def test_gpp2_compile(self): | ||
35 | (status, output) = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm') | ||
36 | self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output) | ||
37 | (status, output) = self.target.run('/tmp/test') | ||
38 | self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output) | ||
39 | |||
40 | @testcase(204) | ||
41 | def test_make(self): | ||
42 | (status, output) = self.target.run('cd /tmp; make -f testmakefile') | ||
43 | self.assertEqual(status, 0, msg="running make failed, output %s" % output) | ||
44 | |||
45 | @classmethod | ||
46 | def tearDownClass(self): | ||
47 | oeRuntimeTest.tc.target.run("rm /tmp/test.c /tmp/test.o /tmp/test /tmp/testmakefile") | ||