Skip to content

Unit test runner shows PASSED in summary when there are failing tests #5183

Closed

Description

@ssilverman

I'm seeing the summary showing as passing when there are failures. Many tests pass, then there's a few failures, and my end-of-test summary looks like this (most names are removed for brevity):

...
test/test_math/test_main.cpp:518:PASS
test/test_math/test_main.cpp:519:PASS
test/test_math/test_main.cpp:520:PASS
test/test_math/test_main.cpp:521:PASS
test/test_math/test_main.cpp:522:PASS
test/test_math/test_main.cpp:414:FAIL
test/test_math/test_main.cpp:414:FAIL
test/test_math/test_main.cpp:414:FAIL
test/test_math/test_main.cpp:414:FAIL
test/test_math/test_main.cpp:414:FAIL
test/test_math/test_main.cpp:414:FAIL
test/test_math/test_main.cpp:529:PASS
test/test_math/test_main.cpp:530:PASS
test/test_math/test_main.cpp:531:PASS
...
-----------------------
91 Tests 6 Failures 0 Ignored 
FAIL

The final summary shows PASSED.

I responded to the following issue, but I don't think this is Teensy-specific: platformio/platform-teensy#68

Activity

  1. added this to the 6.1.19 milestone on Jun 22, 2025
  2. ssilverman commented on Jun 26, 2025

    @ssilverman
    Author

    Note that the summary also shows "SKIPPED", even when a test ran with some duration and passed. For example:

    teensy41 test_math SKIPPED 00:00:31.206
    
  3. ssilverman commented on Jun 26, 2025

    @ssilverman
    Author

    Note: I usually run with pio test -v.

  4. added a commit that references this issue on Oct 29, 2025
    1fc9424
  5. SpacePlushy commented on Oct 29, 2025

    @SpacePlushy

    I've identified and fixed the issue!

    Root Cause:
    In platformio/test/cli.py line 201, the print_suite_footer function was hardcoding "PASSED" for any non-error test status. This caused SKIPPED test suites to incorrectly display as PASSED.

    The Fix:
    Changed to use the actual test_suite.status.name with appropriate color coding via status.to_ansi_color(). Now the footer correctly displays the actual test execution result (PASSED, FAILED, ERRORED, or SKIPPED).

    PR: #5302

    I've tested this with multiple test scenarios and verified it works correctly for all status types.

  6. modified the milestones: 6.1.19, 6.1.20 on Feb 3, 2026
  7. ivankravets commented on Apr 21, 2026

    @ivankravets
    Member

    Thanks for the report! Please re-test with pio upgrade --dev.

  8. added a commit that references this issue on Apr 21, 2026
    39592f8
  9. added a commit that references this issue on Sep 15, 2026
    c80dad5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions