public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: AdrianF <adrian.freihofer@siemens.com>
To: openembedded-core@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@siemens.com>
Subject: [PATCH v2 3/9] oe-selftest: devtool: use assertRegex to match test output for meson
Date: Sun, 22 Mar 2026 16:12:54 +0100	[thread overview]
Message-ID: <20260322151320.661246-4-adrian.freihofer@siemens.com> (raw)
In-Reply-To: <20260322151320.661246-1-adrian.freihofer@siemens.com>

From: Adrian Freihofer <adrian.freihofer@siemens.com>

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 <adrian.freihofer@siemens.com>
---
 meta/lib/oeqa/selftest/cases/devtool.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 297dda7457..dc83d406fd 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
 
-- 
2.53.0



  parent reply	other threads:[~2026-03-22 15:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-22 15:12 [PATCH v2 0/9] devtool: ide-sdk clang/LLDB support and minor fixes AdrianF
2026-03-22 15:12 ` [PATCH v2 1/9] oe-selftest: devtool: use stat for reading user/group names in ide-sdk tests AdrianF
2026-03-22 15:12 ` [PATCH v2 2/9] oe-selftest: devtool: GDB breakpoint after std::vector is constructed AdrianF
2026-03-22 15:12 ` AdrianF [this message]
2026-03-22 15:12 ` [PATCH v2 4/9] oe-selftest/cpp-example: fix conf file ownership with static UIDs/GIDs AdrianF
2026-03-22 15:12 ` [PATCH v2 5/9] devtool: ide-sdk: use TOOLCHAIN not TCOVERRIDE AdrianF
2026-03-22 15:12 ` [PATCH v2 6/9] devtool: ide-sdk debugger back-end abstraction AdrianF
2026-03-22 15:12 ` [PATCH v2 7/9] devtool: ide-sdk add LLDB support for clang toolchain AdrianF
2026-03-22 15:12 ` [PATCH v2 8/9] meta-selftest: refactor cpp examples into .inc files and add clang variants AdrianF
2026-03-22 15:13 ` [PATCH v2 9/9] oe-selftest: devtool ide-sdk: add clang/LLDB test AdrianF
2026-03-24 17:22   ` [OE-core] " Mathieu Dubois-Briand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260322151320.661246-4-adrian.freihofer@siemens.com \
    --to=adrian.freihofer@siemens.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox