Skip to content

Commit

Permalink
Test virtual nic
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed Jun 29, 2024
1 parent 3ba2c1f commit e0586e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ jobs:
sudo -E bash -c set
sudo add-apt-repository ppa:canonical-server/server-backports
sudo apt-get update
sudo apt-get install --yes gnupg xz-utils expect systemd-container qemu-user-static qemu-utils qemu-system-arm libfdt-dev
sudo apt-get install --yes gnupg xz-utils expect systemd-container qemu-user-static qemu-utils qemu-system-arm bridge-utils libfdt-dev
sudo brctl addbr br0
sudo brctl addif br0 eth0
sudo ifup br0
echo "imagegz=alpine-rpi-3.20.1-armhf.img.gz" >> $GITHUB_OUTPUT
echo "image=alpine-rpi-3.20.1-armhf.img" >> $GITHUB_OUTPUT
- name: Cache Alpine 32bit image
Expand Down
4 changes: 3 additions & 1 deletion tests/run.exp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set timeout -1
set loginUser "pi"
set loginPassword "raspberry"

spawn qemu-system-aarch64 -machine "raspi3b" -cpu arm1176 -m 1G -drive "format=raw,file=raspios.img" -dtb "./custom.dtb" -kernel "./tests/kernel/kernel8.img" -append "loglevel=0 quiet console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 fsck.repair=yes rootwait init=/bin/bash" -nographic -serial mon:stdio
spawn qemu-system-aarch64 -machine "raspi3b" -cpu arm1176 -m 1G -drive "format=raw,file=raspios.img" -dtb "./custom.dtb" -kernel "./tests/kernel/kernel8.img" -append "loglevel=0 quiet console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 fsck.repair=yes rootwait init=/bin/bash" -net nic,model=virtio -net bridge,br=br0 -nographic -serial mon:stdio

# Setup user
expect "root@(none):/# "
Expand Down Expand Up @@ -41,6 +41,8 @@ expect {

# Run tests
expect "pi@raspberrypi:~$ "
send "ping -c2 8.8.8.8\r"
expect "pi@raspberrypi:~$ "
send "/opt/zram/tests/test-zram-devices.bash\r"
expect {
-re "Test failed:.*$" {
Expand Down

0 comments on commit e0586e0

Please sign in to comment.