z: add test, verify commands and Nanvix OS download step#52
Merged
Conversation
25fcb55 to
a1d4fe2
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the ./z build utility with post-install validation: it can now download required Nanvix OS runtime artifacts, verify that an installed cross-toolchain has the expected files, and run a basic end-to-end C compile (and optionally execute the result under nanvixd when KVM is available). CI is updated to run the new verification and smoke test steps after the stage-1 install.
Changes:
- Extend
download_stepsto fetch Nanvix OS release artifacts (libposix.a,user.ld,nanvixdbinaries) viagh release download. - Add
./z verify(artifact presence checks) and./z test(compile smoke test + optional KVM integration run). - Update GitHub Actions workflow to enable KVM and run
verify/testafter installation.
Show a summary per file
| File | Description |
|---|---|
z |
Adds Nanvix OS download logic plus new test/verify commands and supporting functions. |
.nanvix/tests/hello.c |
Adds a minimal C program used by the smoke/integration tests. |
.github/workflows/ci.yml |
Exports GH_TOKEN, enables KVM permissions, and runs ./z verify and ./z test post-install. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 4
35712e9 to
b837f32
Compare
Extend the build utility with end-to-end testing and verification
capabilities for the Nanvix cross-toolchain.
download_steps now fetches the Nanvix OS multi-process release
(libposix.a, user.ld, and nanvixd binaries) via `gh release download`
when not already present in the install location.
New commands:
- `./z test`: runs a smoke test that cross-compiles .nanvix/tests/hello.c
with the installed ${TARGET}-gcc, then (if KVM is available) executes
the resulting ELF on nanvixd.elf and asserts "value = 42" in the output.
- `./z verify`: checks that all expected toolchain artifacts (compiler
binaries, libraries, Nanvix OS files) are present after installation.
CI pipeline updated to enable KVM, run verify, and run the smoke test
after the stage-1 build completes.
6793377 to
f3c17dd
Compare
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.
Extend the build utility with end-to-end testing and verification capabilities for the Nanvix cross-toolchain.
Changes
download_stepsnow fetches the Nanvix OS multi-process release (libposix.a,user.ld, and nanvixd binaries) viagh release downloadwhen not already present in the install location.New commands:
./z test— runs a smoke test that cross-compiles.nanvix/tests/hello.cwith the installed${TARGET}-gcc, then (if KVM is available) executes the resulting ELF onnanvixd.elfand assertsvalue = 42in the output../z verify— checks that all expected toolchain artifacts (compiler binaries, libraries, Nanvix OS files) are present after installation.CI pipeline updated to enable KVM, run
verify, and run the smoke test after the stage-1 build completes.Files
z— new functions:test_smoke_c,test_integration_c,test_steps,verify_steps; extendeddownload_steps.nanvix/tests/hello.c— minimal C test program.github/workflows/ci.yml— added verify and test steps with KVM enablement