Skip to content

tests: various improvements for Octoprobe (WIP) #17782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

dpgeorge
Copy link
Member

@dpgeorge dpgeorge commented Jul 29, 2025

Summary

This is a collection of various small improvements to the test suite to get Octoprobe to pass more of the tests.

Once fully working, these changes will be made into separate PRs.

Testing

To be tested by Octoprobe: https://reports.octoprobe.org/

Test report prior to this PR: https://reports.octoprobe.org/github_selfhosted_testrun_194/octoprobe_summary_report.html

Test report with this PR: https://reports.octoprobe.org/github_selfhosted_testrun_199/octoprobe_summary_report.html

@dpgeorge dpgeorge added the tests Relates to tests/ directory in source label Jul 29, 2025
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.38%. Comparing base (f67a370) to head (aee37bb).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #17782   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files         171      171           
  Lines       22276    22283    +7     
=======================================
+ Hits        21917    21924    +7     
  Misses        359      359           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link

github-actions bot commented Jul 31, 2025

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:  +272 +0.032% standard
      stm32:  +176 +0.045% PYBV10
     mimxrt:  +168 +0.045% TEENSY40
        rp2:  +152 +0.017% RPI_PICO_W
       samd:  +160 +0.059% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:  +196 +0.043% VIRT_RV32

@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch from c399b93 to ca374fa Compare July 31, 2025 13:16
@hmaerki
Copy link
Contributor

hmaerki commented Jul 31, 2025

@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch from ca374fa to aee37bb Compare August 1, 2025 02:45
dpgeorge added 17 commits August 1, 2025 14:04
Signed-off-by: Damien George <damien@micropython.org>
Some boards define ESP32C3, some define ESP32-C3.

Probably it should just use default pins, eg SPI(1).

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Some tests (currently given by the `special_tests` list) have output which
must be mached via a regex, because it can change from run to run (eg the
address of an object is printed).  These tests are currently classified as
`is_special` in the test runner, which means they get special treatment.
In particular they don't set the emitter as specified by `args.emit`.  That
means these tests do not run via .mpy or using the native emitter, even if
those options are given on the command line.

This commit fixes that by considering `is_special` as different to
`tests_with_regex_output`.  The former is used for things like target
feature detection (which are not really tests) and when extra command line
options need to be passed to the unix micropython executable.  The latter
(now called `tests_with_regex_output`) are specifically for tests that have
output to be matched via regex.

The `thread_exc2.py` test now needs to be excluded when running using the
native emitter, because the native emitter doesn't print traceback info.
And the `sys_settrace_cov.py` test needs to be excluded because set-trace
output is different with the native emitter.

Signed-off-by: Damien George <damien@micropython.org>
To get `micropython/extreme_exc.py` to pass when run via-mpy.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Eg for ESP8266-512K.

Signed-off-by: Damien George <damien@micropython.org>
In --via-mpy --emit native mode.

Signed-off-by: Damien George <damien@micropython.org>
On ESP8266 this test can fail with --via-mpy.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Because RP2350 uses float-abi=softfp!  Maybe we should change that somehow?

Could also use `defined(__SOFTFP__)` to detect soft (all software fp) or
softfp (hardware for calculations but soft/integer for passing arguments).

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Tested on ADAFRUIT_ITSYBITSY_M0_EXPRESS.

Signed-off-by: Damien George <damien@micropython.org>
On RP2350 these must now be skipped with via-mpy, due to mpy-cross not
knowing the correct architecture.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch from aee37bb to 8920560 Compare August 1, 2025 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Relates to tests/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants