diff mbox series

[17/23] oeqa/sdk/autotools: verify that configure is using the correct host

Message ID 20250510084400.269726-17-ross.burton@arm.com
State New
Headers show
Series [01/23] buildtools-tarball: fix default_cases assignment | expand

Commit Message

Ross Burton May 10, 2025, 8:43 a.m. UTC
Search config.log for the correct host_alias assignment to verify that
configure has correctly identified the host system.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/lib/oeqa/sdk/cases/autotools.py | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/sdk/cases/autotools.py b/meta/lib/oeqa/sdk/cases/autotools.py
index b3a71f2aa50..ee6c522551b 100644
--- a/meta/lib/oeqa/sdk/cases/autotools.py
+++ b/meta/lib/oeqa/sdk/cases/autotools.py
@@ -36,6 +36,12 @@  class AutotoolsTest(OESDKTestCase):
             os.makedirs(dirs["build"])
 
             self._run("cd {build} && {source}/configure CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' $CONFIGURE_FLAGS".format(**dirs))
+
+            # Check that configure detected the target correctly
+            with open(os.path.join(dirs["build"], "config.log")) as f:
+                host_sys = self.td["HOST_SYS"]
+                self.assertIn(f"host_alias='{host_sys}'\n", f.readlines())
+
             self._run("cd {build} && make CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' -j".format(**dirs))
             self._run("cd {build} && make install DESTDIR={install}".format(**dirs))