]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/runtime: add new cpp test and file
authorCorneliu Stoicescu <corneliux.stoicescu@intel.com>
Sat, 9 Aug 2014 11:01:25 +0000 (14:01 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 11 Aug 2014 11:30:16 +0000 (12:30 +0100)
This tests out the limits header which we've noticed does have problems in
some SDK builds.

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/files/test.cpp [new file with mode: 0644]
meta/lib/oeqa/runtime/gcc.py

diff --git a/meta/lib/oeqa/runtime/files/test.cpp b/meta/lib/oeqa/runtime/files/test.cpp
new file mode 100644 (file)
index 0000000..9e1a764
--- /dev/null
@@ -0,0 +1,3 @@
+#include <limits>
+
+int main() {}
\ No newline at end of file
index 08b3cf1230d179448590ea6b4c472d04787e522b..a7f62e175831194215a802a9113fa072dd275958 100644 (file)
@@ -14,6 +14,7 @@ class GccCompileTest(oeRuntimeTest):
     def setUpClass(self):
         oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.c"), "/tmp/test.c")
         oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "testmakefile"), "/tmp/testmakefile")
+        oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.cpp"), "/tmp/test.cpp")
 
     @testcase(203)
     def test_gcc_compile(self):
@@ -29,6 +30,12 @@ class GccCompileTest(oeRuntimeTest):
         (status, output) = self.target.run('/tmp/test')
         self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
 
+    def test_gpp2_compile(self):
+        (status, output) = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm')
+        self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
+        (status, output) = self.target.run('/tmp/test')
+        self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
+
     @testcase(204)
     def test_make(self):
         (status, output) = self.target.run('cd /tmp; make -f testmakefile')