[oe-commits] Corneliu Stoicescu : oeqa/runtime: add new cpp test and file

git at git.openembedded.org git at git.openembedded.org
Mon Aug 11 11:31:05 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: 63cbed337241191f33fe951662a39ce59dce6774
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=63cbed337241191f33fe951662a39ce59dce6774

Author: Corneliu Stoicescu <corneliux.stoicescu at intel.com>
Date:   Sat Aug  9 14:01:25 2014 +0300

oeqa/runtime: add new cpp test and file

This tests out the limits header which we've noticed does have problems in
some SDK builds.

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/runtime/files/test.cpp | 3 +++
 meta/lib/oeqa/runtime/gcc.py         | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/meta/lib/oeqa/runtime/files/test.cpp b/meta/lib/oeqa/runtime/files/test.cpp
new file mode 100644
index 0000000..9e1a764
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/test.cpp
@@ -0,0 +1,3 @@
+#include <limits>
+
+int main() {}
\ No newline at end of file
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
index 08b3cf1..a7f62e1 100644
--- a/meta/lib/oeqa/runtime/gcc.py
+++ b/meta/lib/oeqa/runtime/gcc.py
@@ -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')



More information about the Openembedded-commits mailing list