selftest/meta_ide: source the environment first, then change to the sources directory

This too used to work by coincidence: sourcing the environment
quietly failed without changing to the build directory, but
now that it works properly, things should be done in correct order.

(From OE-Core rev: ed98173057fa128ff565e1e1078b150ca14a85e0)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2025-10-07 20:21:43 +02:00
committed by Richard Purdie
parent 9225dc234d
commit c040dccaf1

View File

@@ -37,7 +37,7 @@ class MetaIDE(OESelftestTestCase):
def test_meta_ide_can_compile_c_program(self):
runCmd('cp %s/test.c %s' % (self.tc.files_dir, self.tmpdir_metaideQA))
runCmd("cd %s; . %s; $CC test.c -lm" % (self.tmpdir_metaideQA, self.environment_script_path))
runCmd(". %s; cd %s; $CC test.c -lm" % (self.environment_script_path, self.tmpdir_metaideQA))
compiled_file = '%s/a.out' % self.tmpdir_metaideQA
self.assertExists(compiled_file)