mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
oeqa/sdk/gcc: Fix makefile test
The makefile test was hardcoding a test for gcc. In the SDK context, we need to use $(CC) to use the cross compiler. (From OE-Core rev: d28ddc23bbf232901ae07f7a01f821ecc4b79e32) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
5
meta/lib/oeqa/runtime/files/testsdkmakefile
Normal file
5
meta/lib/oeqa/runtime/files/testsdkmakefile
Normal file
@@ -0,0 +1,5 @@
|
||||
test: test.o
|
||||
$(CC) -o test test.o -lm
|
||||
test.o: test.c
|
||||
$(CC) -c test.c
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user