Skip to content

[ci] scripts: rewrite unittest to use expect#508

Open
zhangxp1998 wants to merge 1 commit intolittlekernel:masterfrom
zhangxp1998:dev
Open

[ci] scripts: rewrite unittest to use expect#508
zhangxp1998 wants to merge 1 commit intolittlekernel:masterfrom
zhangxp1998:dev

Conversation

@zhangxp1998
Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings May 6, 2026 22:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) for qemu-virt-arm64-test without 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 expect and invoke the two new scripts; removed the legacy scripts/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.

Comment thread scripts/unittest.exp
Comment thread scripts/unittest.sh Outdated
Comment thread scripts/unittest.exp
Comment thread scripts/uefi_unittest.exp
Comment thread scripts/uefi_unittest.sh Outdated
Comment thread scripts/uefi_unittest.exp
@zhangxp1998 zhangxp1998 force-pushed the dev branch 2 times, most recently from 02e2a6e to 01bfb17 Compare May 6, 2026 22:52
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants