-
Notifications
You must be signed in to change notification settings - Fork 10
Feature/kernel tests 2 #193
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
Draft
valentinbreiz
wants to merge
6
commits into
main
Choose a base branch
from
feature/Cosmos.Kernel.Tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
Implemented complete test runner framework for NativeAOT kernels with QEMU execution, binary protocol over UART, and GitHub Actions CI/CD integration. The system supports both x64 and ARM64 architectures with automated testing, result reporting, and artifact management. Test Runner Components: - Engine: QEMU host implementations (x64/ARM64) with configurable timeout - Framework: In-kernel test API (Assert, TestRunner.Start/Run/Finish) - Protocol: Binary UART messages (0x64-0x69) with Latin1 encoding - Output Handlers: Console (colored), XML (JUnit), multiplexing support Build System Fixes: - Added -DARCH_X64 and -DARCH_ARM64 to GCC compiler flags in Cosmos.Build.GCC.targets - Fixed architecture-specific code compilation (kmain.c now compiles correctly per arch) QEMU Configuration Fixes: - Added -boot d flag to boot from CD-ROM properly - Added -no-reboot flag to prevent boot loops after kernel halt - Both x64 and ARM64 hosts now boot and execute tests successfully VS Code Integration: - Added "dev" mode parameter to debug configurations for visual QEMU testing - Created test tasks for quick HelloWorld testing (x64/ARM64) - Debug configurations for both architectures with proper display settings CI/CD Workflow (.github/workflows/kernel-tests.yml): - Parallel x64/ARM64 testing matrix with Ubuntu + QEMU - Automated test result publishing to PR comments - JUnit XML report generation and artifact uploads - Test summary generation with pass/fail counts - Automatic failure comments with UART debug logs Example Test Kernel: - Cosmos.Kernel.Tests.HelloWorld with 3 passing assertions - Demonstrates test framework API usage - Works on both x64 and ARM64 architectures Documentation: - tests/README.md: Usage guide for developers - .taskmaster/docs/test-runner-prd.txt: Product requirements document - CLAUDE.md: Updated with test workflow and Task Master integration Tests performed: - x64: HelloWorld kernel passes 3/3 tests with QEMU - ARM64: HelloWorld kernel passes 3/3 tests with QEMU (requires UEFI firmware) - Both architectures produce correct UART output and JUnit XML results
4cd0947 to
49f8fb0
Compare
🧪 Cosmos Kernel Tests (x64)1 tests 1 ✅ 0s ⏱️ Results for commit 87052f1. ♻️ This comment has been updated with latest results. |
🧪 Cosmos Kernel Tests (arm64)0 tests 0 ✅ 0s ⏱️ Results for commit 87052f1. ♻️ This comment has been updated with latest results. |
1370336 to
87052f1
Compare
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.
No description provided.