Skip to content

Commit 152bc89

Browse files
authored
Merge branch 'arceos-hypervisor:next2' into next2
2 parents 3cc11b7 + e10cd52 commit 152bc89

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/qemu-aarch64.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ args = [
66
"virt,virtualization=on,gic-version=3",
77
"-smp",
88
"4",
9+
"-device",
10+
"virtio-blk-device,drive=disk0",
11+
"-drive",
12+
"id=disk0,if=none,format=raw,file=${ROOTFS_DIR}/rootfs.img",
913
"-append",
1014
"root=/dev/vda rw init=/init",
1115
"-m",
1216
"8g",
1317
]
1418
fail_regex = []
15-
success_regex = ["Hello, world!"]
19+
success_regex = []
1620
to_bin = true
1721
uefi = false

.github/workflows/test-qemu.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,18 @@ jobs:
4747
img_name="qemu-${{ matrix.arch }}"
4848
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/axvisor/'"$img"'/'"$img_name"'"|' "$config"
4949
echo "Updated kernel_path in $config"
50+
51+
# Check if rootfs.img exists and export ROOTFS_DIR if it does
52+
if [ -f "/tmp/axvisor/$img/rootfs.img" ]; then
53+
ROOTFS_DIR="/tmp/axvisor/$img"
54+
echo "ROOTFS_DIR=$ROOTFS_DIR" >> $GITHUB_ENV
55+
echo "Found rootfs.img at /tmp/axvisor/$img/, exported ROOTFS_DIR=$ROOTFS_DIR"
56+
fi
5057
done
5158
5259
- name: Run tests
5360
run: |
61+
export ROOTFS_DIR="${{ env.ROOTFS_DIR }}"
5462
export RUST_LOG=debug
5563
cargo xtask qemu \
5664
--build-config configs/board/qemu-${{ matrix.arch }}.toml \

0 commit comments

Comments
 (0)