Skip to content

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
@codecov
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 (b87d73f) to head (fa51543).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #17782   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files         171      171           
  Lines       22298    22299    +1     
=======================================
+ Hits        21937    21938    +1     
  Misses        361      361           

☔ 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.

@github-actions
Copy link

github-actions bot commented Jul 31, 2025

Code size report:

Reference:  tools/mpy_ld.py: Write architecture flags to output natmod if needed. [b87d73f]
Comparison: tests/micropython/ringio_big.py: Print results at end of test. [merge of fa51543]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +8 +0.014% 
minimal x86:   +14 +0.007% 
   unix x64:   +24 +0.003% standard
      stm32:    +8 +0.002% PYBV10
      esp32:  +104 +0.006% ESP32_GENERIC[incl +16(data)]
     mimxrt:    +8 +0.002% TEENSY40
        rp2:    +8 +0.001% RPI_PICO_W
       samd:    +8 +0.003% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:   +16 +0.004% 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 2 times, most recently from aee37bb to 8920560 Compare August 1, 2025 04:05
@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch 3 times, most recently from 66db214 to 3993063 Compare August 10, 2025 02:13
@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch from ec94811 to f7dc897 Compare August 13, 2025 09:22
@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch 2 times, most recently from 941611d to 4d60e1c Compare August 16, 2025 14:53
@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch 2 times, most recently from 96642d5 to 87300a8 Compare August 26, 2025 07:17
@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch from 87300a8 to 35f3163 Compare September 8, 2025 03:01
@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch from 35f3163 to a82b761 Compare September 22, 2025 00:33
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>
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>
Signed-off-by: Damien George <damien@micropython.org>
Tested on ADAFRUIT_ITSYBITSY_M0_EXPRESS.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
On bare-metal lwIP targets, there's only enough buffer space for 4 groups.

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>
Signed-off-by: Damien George <damien@micropython.org>
The test runner will abort with error code 2 if:
- the target could not be detected (enter_raw_repl failed at the
  detection stage)
- unittest is not installed but is needed

Signed-off-by: Damien George <damien@micropython.org>
Now, if a test fails and crashes a board to the point it no longer responds
(but the serial connection is still alive and able to read/write), it only
takes a maximum of 30 + 5 * 4 = 50 seconds to detect that state and exit
the test run (previously it would be 30 + 10 seconds * number of remaining
tests = potentially large).

Can test this by adding the following to a test:

    import time, micropython
    micropython.kbd_intr(-1)
    while 1:
        time.sleep(1)

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
To reduce heap memory use.

Signed-off-by: Damien George <damien@micropython.org>
Not sure if this is actually better, may lead to more fragmentation.

Probably needs some tests.

See micropython#4087

Really need to retry alloc with smaller amount if it fails, but then
really we need a lazy malloc, per the TODO in py/misc.h.

Signed-off-by: Damien George <damien@micropython.org>
They don't have the `freq` argument.

Signed-off-by: Damien George <damien@micropython.org>
So it can be properly skipped.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the tests-improvements-for-octoprobe branch from e143b45 to fa51543 Compare January 13, 2026 00:41
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