From de4ba4cbe1584fc865bc5aae9fe8a91c1a777684 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 14 Jan 2023 17:38:26 +0200 Subject: [PATCH] Fixed an issue with an incorrect test summary when a testcase name includes a colon // Resolve #4508 --- HISTORY.rst | 1 + platformio/test/runners/unity.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 48725df2da..3e5be32dc4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,7 @@ PlatformIO Core 6 * Updated `Clang-Tidy `__ check tool to v15.0.5 with new diagnostics and bugfixes * Removed dependency on the "zeroconf" package and install it only when a user lists mDNS devices (issue with zeroconf's LGPL license) * Show the real error message instead of "Can not remove temporary directory" when |PIOCONF| is broken (`issue #4480 `_) +* Fixed an issue with an incorrect test summary when a testcase name includes a colon (`issue #4508 `_) 6.1.5 (2022-11-01) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/test/runners/unity.py b/platformio/test/runners/unity.py index a8970cf514..b7d8026be5 100644 --- a/platformio/test/runners/unity.py +++ b/platformio/test/runners/unity.py @@ -29,10 +29,11 @@ class UnityTestRunner(TestRunnerBase): EXTRA_LIB_DEPS = ["throwtheswitch/Unity@^2.5.2"] - # Example: + # Examples: # test/test_foo.cpp:44:test_function_foo:FAIL: Expected 32 Was 33 + # test/group/test_foo/test_main.cpp:5:test::dummy:FAIL: Expression Evaluated To FALSE TESTCASE_PARSE_RE = re.compile( - r"(?P[^:]+):(?P\d+):(?P[^:]+):" + r"(?P[^:]+):(?P\d+):(?P[^\s]+):" r"(?PPASS|IGNORE|FAIL)(:\s*(?P.+)$)?" )