mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
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. (From OE-Core rev: 63cbed337241191f33fe951662a39ce59dce6774) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
92785a1a96
commit
fe5b333e1a
3
meta/lib/oeqa/runtime/files/test.cpp
Normal file
3
meta/lib/oeqa/runtime/files/test.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#include <limits>
|
||||
|
||||
int main() {}
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user