]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/sdk/autotools: verify that configure is using the correct host
authorRoss Burton <ross.burton@arm.com>
Sat, 10 May 2025 08:43:50 +0000 (09:43 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 May 2025 09:52:52 +0000 (10:52 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/sdk/cases/autotools.py

index b3a71f2aa50b46c79cae1db9f779f9f381576846..ee6c522551b8e791c36a5b02408e5e7b505ca697 100644 (file)
@@ -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))