Add XS and VX build and test support - #67
Open
xross wants to merge 1 commit into
Open
Conversation
xross
force-pushed
the
feature/vx
branch
3 times, most recently
from
August 7, 2026 13:24
698fd55 to
a809158
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates lib_xassert to build and run its examples/tests on both XS and VX targets by switching platform-specific trap/print/timer dependencies to lib_basix, adding portable C-based tests, and updating CI (Jenkins) to run architecture-specific build/test flows.
Changes:
- Replace XS-specific trap/timer usage with lib_basix APIs in the xassert public header and example code.
- Add new C test applications/expected outputs and gate XC-compatibility tests behind a CMake option for VX builds.
- Update Jenkins pipeline to build/test separately on XS and VX and use
runPytest()for reporting; make hardware target overrideable viaAPP_HW_TARGET.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/CMakeLists.txt | Adds C-test subdirectories and gates XC tests via XASSERT_BUILD_XC_TESTS. |
| tests/assert_c_test/src/main.c | New C assertion test app. |
| tests/assert_c_test/CMakeLists.txt | Registers new C assertion test app with overrideable target. |
| tests/assert_c_test.expect | Expected output for C assertion failure. |
| tests/assert_unit_c_test/src/main.c | New C “unit” assertion test with per-unit debug config. |
| tests/assert_unit_c_test/CMakeLists.txt | Registers new C unit assertion test app. |
| tests/assert_unit_c_test.expect | Expected output for unit assertion failure. |
| tests/fail_c_test/src/main.c | New C fail() test app. |
| tests/fail_c_test/CMakeLists.txt | Registers new C fail() test app. |
| tests/fail_c_test.expect | Expected output for fail(). |
| tests/unreachable_c_test/src/main.c | New C unreachable() test app. |
| tests/unreachable_c_test/CMakeLists.txt | Registers new C unreachable() test app. |
| tests/unreachable_c_test.expect | Expected output for unreachable(). |
| tests/timing_block_c_test/src/main.c | Updates timing test to use basix_delay_ticks(). |
| tests/timing_debug_c_test/src/main.c | Updates timing test to use basix_delay_ticks(). |
| tests/timing_loop_c_test/src/main.c | Replaces hwtimer usage with basix_delay_ticks(). |
| tests/assert_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/assert_test_unit/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/fail_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/unreachable_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/timing_block_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/timing_debug_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/timing_loop_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/timing_block_c_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/timing_debug_c_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| tests/timing_loop_c_test/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| examples/deps.cmake | Adds lib_basix as a common example dependency. |
| examples/app_assert/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| examples/app_fail/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| examples/app_timed_block/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| examples/app_timed_loop/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| examples/app_timing_loop_exception/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| examples/app_unreachable/CMakeLists.txt | Makes APP_HW_TARGET overrideable. |
| examples/app_timed_loop/src/fn_no_assert.c | Switches printing include to <basix/print.h>. |
| lib_xassert/lib_build_info.cmake | Declares lib_basix dependency at 0.1.0. |
| lib_xassert/api/xassert.h | Switches to lib_basix trap/print/time APIs and BASIX timer frequency. |
| Jenkinsfile | Splits XS/VX build+test stages and uses runPytest(). |
| README.rst | Documents XS/VX support and adds lib_basix as a dependency. |
| CHANGELOG.rst | Adds UNRELEASED entries describing the changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
124
to
+129
| # define fail_timing(tag, actual, limit, file, line) do { printstr("Timing failed for: "); \ | ||
| printf("%s", (const char *) tag); \ | ||
| fflush(stdout); \ | ||
| printstr("\nΔt = "); printint(actual); printstr(" ticks ("); printint((actual) * 10); printstr(" ns), "); \ | ||
| printstr("limit = "); printint(limit); printstr(" ticks ("); printint((limit) * 10); printstr(" ns) "); \ | ||
| xassert_timing_print_line(file, line); __builtin_trap();\ | ||
| xassert_timing_print_line(file, line); basix_trap();\ |
xalbertoisorna
approved these changes
Aug 7, 2026
xalbertoisorna
left a comment
Contributor
There was a problem hiding this comment.
I have not done a extensive review but all looks good one minor comment.
| @@ -0,0 +1,2 @@ | |||
| 0 | |||
| Unhandled exception: ECALL, data: 0x00000000 | |||
Contributor
There was a problem hiding this comment.
Ive observed xrun and xsim produce different outputs?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
runPytest()for test execution and reporting.Dependency
Depends on the corresponding lib_basix compatibility changes (released in v0.1.0)