[ci] scripts: rewrite unittest to use expect#508
Open
zhangxp1998 wants to merge 1 commit intolittlekernel:masterfrom
Open
[ci] scripts: rewrite unittest to use expect#508zhangxp1998 wants to merge 1 commit intolittlekernel:masterfrom
zhangxp1998 wants to merge 1 commit intolittlekernel:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces the prior Python-based QEMU test harness with two Expect-based scripts: one focused on UEFI “Hello World” integration (with virtio-blk attached) and one focused on running LK unit tests in a “clean” QEMU environment (no virtio-blk), and updates GitHub Actions to install expect and run both scripts.
Changes:
- Added an Expect-driven unit test runner (
ut all) forqemu-virt-arm64-testwithout virtio devices. - Added an Expect-driven UEFI integration test that attaches a virtio-blk device and runs
uefi_load virtio0. - Updated Rust/Clang CI workflows to install
expectand invoke the two new scripts; removed the legacyscripts/unittest.py.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/unittest.sh | New Expect script that boots QEMU and runs ut all, asserting on the unittest success/failure banner. |
| scripts/unittest.py | Removed legacy Python harness that booted QEMU with virtio-blk and validated UEFI “Hello World”. |
| scripts/uefi_unittest.sh | New Expect script that boots QEMU with virtio-blk attached and validates UEFI “Hello World!” output. |
| .github/workflows/github-ci-rust.yml | Installs expect and runs both new test scripts for qemu-virt-arm64-test. |
| .github/workflows/github-ci-clang.yml | Installs expect and runs both new test scripts for qemu-virt-arm64-test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
02e2a6e to
01bfb17
Compare
Rewrite the python-based unittest script into two distinct expect scripts: one for testing UEFI integration and another for executing general unittests. This allows FAT tests to accurately evaluate hardware dependencies by keeping virtio block devices out of the general unittest environment. Updates GitHub CI configurations to depend on the 'expect' utility and invoke both shell scripts instead of python.
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.
Rewrite the python-based unittest script into two distinct expect scripts: one for testing UEFI integration and another for executing general unittests. This allows FAT tests to accurately evaluate hardware dependencies by keeping virtio block devices out of the general unittest environment. Updates GitHub CI configurations to depend on the 'expect' utility and invoke both shell scripts instead of python.