From: Adrian Freihofer Date: Mon, 6 Apr 2026 22:10:31 +0000 (+0200) Subject: oe-selftest: devtool: use assertRegex to match test output for meson X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a42c2beedbfd1fc9fc8bfa30f77fa50105afa403;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git oe-selftest: devtool: use assertRegex to match test output for meson Replace strict string matching with assertRegex to allow for flexible whitespace in the "Fail: 0" output from meson tests. This improves test robustness against formatting changes. This issue was discovered with scarthgap. Signed-off-by: Adrian Freihofer Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 36b7f16d3d..f4ccffd9b9 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -2911,7 +2911,7 @@ class DevtoolIdeSdkTests(DevtoolBase): result = runCmd('%s test -C %s' % (meson_exe, build_dir), cwd=tempdir, output_log=self._cmd_logger) self.assertEqual(result.status, 0) - self.assertIn("Fail: 0", result.output) + self.assertRegex(result.output, r"Fail:\s+0") # Verify re-building and testing works again result = runCmd('%s compile -C %s --clean' % (meson_exe, build_dir), @@ -2922,7 +2922,7 @@ class DevtoolIdeSdkTests(DevtoolBase): result = runCmd('%s test -C %s' % (meson_exe, build_dir), cwd=tempdir, output_log=self._cmd_logger) self.assertEqual(result.status, 0) - self.assertIn("Fail: 0", result.output) + self.assertRegex(result.output, r"Fail:\s+0") return compile_cmd