Skip to content

Basic custom #[no_std] test runner #26

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

Merged
merged 31 commits into from
Apr 22, 2025

Conversation

RyanKoech
Copy link
Contributor

@RyanKoech RyanKoech commented Apr 8, 2025

EDIT - See original below

Set up basic custom runner powered by makefiles. Use make test

image

ORIGINAL - from when PR was a Draft PR WIP

Global search the code for 'RYANS_NOTES' to see notes i've written.

There's issues running tests.
cargo test produces the error below:

error: unwinding panics are not supported without std

  = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
  = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem

warning: `hexium_os` (bin "hexium_os" test) generated 1 warning
error: could not compile `hexium_os` (bin "hexium_os" test) due to 1 previous error; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
error[E0152]: duplicate lang item in crate `core` (which `std` depends on): `sized`

I fixed this by using the command cargo test --target x86_64-unknown-none
Then I got the error below where I'm stuck at.

error[E0463]: can't find crate for `test`

error: `#[panic_handler]` function required, but not found

@RyanKoech
Copy link
Contributor Author

So the commit 9e060bb has fixed the build issue, and everything seems to be building fine.

A new error is being experienced however

    Finished `test` profile [unoptimized + debuginfo] target(s) in 33.88s
     Running unittests src/lib.rs (target/x86_64-unknown-none/debug/deps/hexium_os-ff3ea686c9bc2f62)
error: test failed, to rerun pass `--lib`

Caused by:
  process didn't exit successfully: `/../Hexium/kernel/target/x86_64-unknown-none/debug/deps/hexium_os-ff3ea686c9bc2f62` (signal: 11, SIGSEGV: invalid memory reference)

@ViktorPopp ViktorPopp added enhancement New feature or request good first issue Good for newcomers labels Apr 10, 2025
@ViktorPopp ViktorPopp added this to the v0.1.0.0 🚀 milestone Apr 10, 2025
@ViktorPopp ViktorPopp linked an issue Apr 10, 2025 that may be closed by this pull request
@ViktorPopp ViktorPopp moved this to In progress in 🧪 Build Pipeline Apr 10, 2025
@RyanKoech RyanKoech changed the title Basic custom test runner Basic custom #[no_std] test runner Apr 17, 2025
@RyanKoech
Copy link
Contributor Author

closes #2

@RyanKoech
Copy link
Contributor Author

RyanKoech commented Apr 17, 2025

Note: That a timeout has not been implemented into the tests yet, so this could lead to indefinite running tests. Could have its issue ticket set up for later.

@HexiumOS/core-developers

@RyanKoech
Copy link
Contributor Author

RyanKoech commented Apr 18, 2025

Note: That a timeout has not been implemented into the tests yet, so this could lead to indefinite running tests. Could have its issue ticket set up for later.

So we've decided we'll create a new issue for this.

Edit: Issue #29

@RyanKoech
Copy link
Contributor Author

Furthermore, we've also decided we'll leave out the executor code out for now, to be reintroduced in the future. An issue will be put up for this.

Issues #30

@RyanKoech
Copy link
Contributor Author

Another issue will also be created for testing println output. Issue #31

@RyanKoech
Copy link
Contributor Author

RyanKoech commented Apr 18, 2025

Another issue to complete the test/writer.rs tests for testing println out put has also been created. Issue #31

@RyanKoech RyanKoech marked this pull request as ready for review April 18, 2025 14:00
@RyanKoech
Copy link
Contributor Author

@HexiumOS/core-developers PR is ready for review

@ViktorPopp ViktorPopp moved this from In progress to In review in 🧪 Build Pipeline Apr 20, 2025
@ViktorPopp ViktorPopp self-requested a review April 21, 2025 12:14
@ViktorPopp ViktorPopp merged commit dd595b0 into HexiumOS:dev Apr 22, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In review to Done in 🧪 Build Pipeline Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Custom #[no_std] testing framework
2 participants