Skip to content

tests: Fix tests runs with MICROPY_ERROR_REPORTING_NONE.#19326

Draft
agatti wants to merge 9 commits into
micropython:masterfrom
agatti:no-error-report-fix
Draft

tests: Fix tests runs with MICROPY_ERROR_REPORTING_NONE.#19326
agatti wants to merge 9 commits into
micropython:masterfrom
agatti:no-error-report-fix

Conversation

@agatti

@agatti agatti commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR contains fixes for MicroPython core and tests to make the Unix port pass tests when built with no error detail being generated in case of exceptions (ie. MICROPY_ERROR_REPORTING_NONE).

Some of the commits are here just to make sure things build and are executed from CI, marked with DO NOT MERGE - they will be removed once the CI job stops failing.

This PR depends on #19324 being merged first, otherwise things won't build when the support commits are removed.

Testing

There's a temporary CI job used to keep track of which tests still fail, and will be taken out once things work. Unless there's the need for an extra job running the test suite with this configuration, that is.

Generative AI

I did not use generative AI tools when creating this PR.

@agatti agatti marked this pull request as draft June 9, 2026 14:00
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.47%. Comparing base (af38ee1) to head (6276a29).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19326   +/-   ##
=======================================
  Coverage   98.47%   98.47%           
=======================================
  Files         176      176           
  Lines       22845    22845           
=======================================
  Hits        22497    22497           
  Misses        348      348           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Code size report:

Reference:  samd/mphalport: Run events at least once in mp_hal_delay_ms. [af38ee1]
Comparison: tests/stress/bytecode_limit: Fix test with no error details. [merge of 6276a29]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@agatti agatti force-pushed the no-error-report-fix branch 3 times, most recently from dabd976 to 0b3eac6 Compare June 9, 2026 16:00
agatti added 6 commits June 9, 2026 18:03
This commit fixes two build errors occurring when building any modern
port with error detail reporting is not enabled (ie.
`MICROPY_ERROR_REPORTING` is set to `MICROPY_ERROR_REPORTING_NONE` when
building).

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit updates the target info reporting script to work correctly
even when error reporting is disabled, effectively skipping any error
message attached to exceptions.

The code expected the exception message to be an empty string, but it is
`None` instead, making the script fail and the test runner not able to
execute tests.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
@agatti agatti force-pushed the no-error-report-fix branch from 0b3eac6 to f13b7d0 Compare June 9, 2026 16:04
agatti added 3 commits June 9, 2026 18:04
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
@agatti agatti force-pushed the no-error-report-fix branch from f13b7d0 to 6276a29 Compare June 9, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant