diff mbox series

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

Message ID 20251007182143.1235445-2-alex.kanavin@gmail.com
State Accepted, archived
Commit ed98173057fa128ff565e1e1078b150ca14a85e0
Headers show
Series [1/2] meta/classes-recipe/toolchain-scripts.bbclass: eliminate bash-ism | expand

Commit Message

Alexander Kanavin Oct. 7, 2025, 6:21 p.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

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.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/lib/oeqa/selftest/cases/meta_ide.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/meta_ide.py b/meta/lib/oeqa/selftest/cases/meta_ide.py
index c3a7df4cdf5..1a114737975 100644
--- a/meta/lib/oeqa/selftest/cases/meta_ide.py
+++ b/meta/lib/oeqa/selftest/cases/meta_ide.py
@@ -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)