summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/runtime/files/test.cpp3
-rw-r--r--meta/lib/oeqa/runtime/gcc.py7
2 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/files/test.cpp b/meta/lib/oeqa/runtime/files/test.cpp
new file mode 100644
index 0000000000..9e1a76473d
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/test.cpp
@@ -0,0 +1,3 @@
1#include <limits>
2
3int main() {} \ No newline at end of file
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
index 08b3cf1230..a7f62e1758 100644
--- a/meta/lib/oeqa/runtime/gcc.py
+++ b/meta/lib/oeqa/runtime/gcc.py
@@ -14,6 +14,7 @@ class GccCompileTest(oeRuntimeTest):
14 def setUpClass(self): 14 def setUpClass(self):
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 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.cpp"), "/tmp/test.cpp")
17 18
18 @testcase(203) 19 @testcase(203)
19 def test_gcc_compile(self): 20 def test_gcc_compile(self):
@@ -29,6 +30,12 @@ class GccCompileTest(oeRuntimeTest):
29 (status, output) = self.target.run('/tmp/test') 30 (status, output) = self.target.run('/tmp/test')
30 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output) 31 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
31 32
33 def test_gpp2_compile(self):
34 (status, output) = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm')
35 self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
36 (status, output) = self.target.run('/tmp/test')
37 self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
38
32 @testcase(204) 39 @testcase(204)
33 def test_make(self): 40 def test_make(self):
34 (status, output) = self.target.run('cd /tmp; make -f testmakefile') 41 (status, output) = self.target.run('cd /tmp; make -f testmakefile')