pioasm: Proposal to add tests and coverage report #2789
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!2789
Loading…
Reference in a new issue
No description provided.
Delete branch "gonzalolarralde/gonzalolarralde/add-pioasm-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello 👋
I’m working on a small PIO compiler as a side project and needed a validation suite to ensure output alignment across implementations. This PR adds a snapshot-style test suite for pioasm that exercises most of the functionality by running real pioasm invocations and comparing captured output. The large diff is mostly test data rather than harness code.
Goals:
Coverage:
Notes:
I used LLMs to help generate test cases and harness code, but reviewed them for coherence and relevance.
Please let me know if this doesn’t align with the maintainers’ testing direction. I’m happy to adjust the approach, and completely understand if the decision is not to merge this PR.
Thanks for taking the time to review this!
Maybe it's worth splitting that out to a separate PR, so that we can pull in the fix independently of your
piosamtest suite?@lurch thanks for the feedback! I just created #2854, if/when merged I will rollback the change here. I want to make sure the tests still pass.
This commit shows the process to update the tests after a change introduced in the compiler that is valid and accepted starts generating a new ouput.
In this case running the test harness
./run_tests.pyfailed most of the tests as a new syntax alias was added to extend support toconstexprwhen using cpp (#2651). The process to accept the new output of the test commands is to just review and commit the new test files with the changes applied, which is done automatically by running./run_tests.py --overwritethanks for this - as it is a big PR will consider for next release
@kilograham Completely reasonable! Also as this change doesn't include any runtime change it should be fine for any version where it makes sense.
If you think there's a way to make this more approachable, like breaking it up in multiple PRs, I can def. work on that if there's alignment with the overall direction.
Maybe a good start would be just putting up the harness for review, and then tests can be brought individually based on possible value.
In any case, no rush. It was just an experiment that I figured could be helpful.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.