]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/sdk/gcc: Fix makefile test
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 27 Sep 2015 10:07:38 +0000 (11:07 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 28 Sep 2015 10:58:34 +0000 (11:58 +0100)
The makefile test was hardcoding a test for gcc. In the SDK context, we
need to use $(CC) to use the cross compiler.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/files/testsdkmakefile [new file with mode: 0644]
meta/lib/oeqa/sdk/gcc.py

diff --git a/meta/lib/oeqa/runtime/files/testsdkmakefile b/meta/lib/oeqa/runtime/files/testsdkmakefile
new file mode 100644 (file)
index 0000000..fb05f82
--- /dev/null
@@ -0,0 +1,5 @@
+test: test.o
+       $(CC) -o test test.o -lm
+test.o: test.c
+       $(CC) -c test.c
+
index 67994b9b5aff4f42de0128a6cfb7df84cef62547..8395b9b908dd62f4f455dc0e0f8e69de46ca690d 100644 (file)
@@ -14,7 +14,7 @@ class GccCompileTest(oeSDKTest):
 
     @classmethod
     def setUpClass(self):
-        for f in ['test.c', 'test.cpp', 'testmakefile']:
+        for f in ['test.c', 'test.cpp', 'testsdkmakefile']:
             shutil.copyfile(os.path.join(self.tc.filesdir, f), self.tc.sdktestdir + f)
 
     def test_gcc_compile(self):
@@ -27,10 +27,10 @@ class GccCompileTest(oeSDKTest):
         self._run('$CXX %s/test.cpp -o %s/test -lm' % (self.tc.sdktestdir, self.tc.sdktestdir))
 
     def test_make(self):
-        self._run('cd %s; make -f testmakefile' % self.tc.sdktestdir)
+        self._run('cd %s; make -f testsdkmakefile' % self.tc.sdktestdir)
 
     @classmethod
     def tearDownClass(self):
-        files = [self.tc.sdktestdir + f for f in ['test.c', 'test.cpp', 'test.o', 'test', 'testmakefile']]
+        files = [self.tc.sdktestdir + f for f in ['test.c', 'test.cpp', 'test.o', 'test', 'testsdkmakefile']]
         for f in files:
             bb.utils.remove(f)