diff options
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/meson.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdk/cases/meson.py b/meta/lib/oeqa/sdk/cases/meson.py index 4fb101f9f7..a809ca3a53 100644 --- a/meta/lib/oeqa/sdk/cases/meson.py +++ b/meta/lib/oeqa/sdk/cases/meson.py | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | import json | ||
| 7 | import os | 8 | import os |
| 8 | import subprocess | 9 | import subprocess |
| 9 | import tempfile | 10 | import tempfile |
| @@ -36,6 +37,14 @@ class MesonTestBase(OESDKTestCase): | |||
| 36 | # Check that Meson thinks we're doing a cross build and not a native | 37 | # Check that Meson thinks we're doing a cross build and not a native |
| 37 | self.assertIn("Build type: cross build", log) | 38 | self.assertIn("Build type: cross build", log) |
| 38 | 39 | ||
| 40 | # Check that the cross-compiler used is the one we set. | ||
| 41 | data = json.loads(self._run(f"meson introspect --compilers {builddir}")) | ||
| 42 | self.assertIn(self.td.get("CC").split()[0], data["host"]["c"]["exelist"]) | ||
| 43 | |||
| 44 | # Check that the target architectures was set correctly. | ||
| 45 | data = json.loads(self._run(f"meson introspect --machines {builddir}")) | ||
| 46 | self.assertEqual(data["host"]["cpu"], self.td["HOST_ARCH"]) | ||
| 47 | |||
| 39 | self._run(f"meson compile -C {builddir} -v") | 48 | self._run(f"meson compile -C {builddir} -v") |
| 40 | 49 | ||
| 41 | if installdir: | 50 | if installdir: |
