Skip to content
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

Update GitHub Actions Testing Suite #110

Merged
merged 6 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ 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
echo "::set-output name=imagexz::$(basename "$(curl "https://downloads.raspberrypi.org/raspios_lite_armhf_latest" -s -L -I -o /dev/null -w '%{url_effective}')")"
echo "::set-output name=image::$(echo "$(basename "$(curl "https://downloads.raspberrypi.org/raspios_lite_armhf_latest" -s -L -I -o /dev/null -w '%{url_effective}')")" | sed -e 's/.xz//')"
sudo apt-get install --yes gnupg xz-utils expect systemd-container qemu-user-static qemu-utils qemu-system-arm libfdt-dev
echo "imagexz=$(basename "$(curl "https://downloads.raspberrypi.org/raspios_lite_armhf_latest" -s -L -I -o /dev/null -w '%{url_effective}')")" >> $GITHUB_OUTPUT
echo "image=$(echo "$(basename "$(curl "https://downloads.raspberrypi.org/raspios_lite_armhf_latest" -s -L -I -o /dev/null -w '%{url_effective}')")" | sed -e 's/.xz//')" >> $GITHUB_OUTPUT
- name: Cache Raspberry Pi OS 32bit image
uses: actions/cache@v4
with:
Expand Down
7 changes: 6 additions & 1 deletion tests/image.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ if [[ $1 == "setup" ]]; then
systemd-nspawn --directory="tests/fs" /opt/zram/tests/install-packages.bash
echo "set enable-bracketed-paste off" >> tests/fs/etc/inputrc # Prevents weird character output
cp tests/fs/boot/kernel* tests/kernel
cp tests/fs/boot/*.dtb tests/dtb
# Compile a customized DTB
git clone https://github.com/raspberrypi/utils.git
cmake utils/dtmerge
make
sudo make install
dtmerge tests/fs/boot/bcm2710-rpi-3-b-plus.dtb custom.dtb tests/fs/boot/overlays/disable-bt.dtbo uart0=on
imageFile "umount" "$3"
elif [[ $1 == "copy-logs" ]]; then
imageFile "mount" "$2"
Expand Down
3 changes: 0 additions & 3 deletions tests/install-packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

export DEBIAN_FRONTEND="noninteractive"

apt-get --quiet update
apt-get --quiet upgrade --yes
apt-get --quiet install --fix-broken --yes
apt-get --quiet install --yes gcc make libc6-dev
apt-get --quiet autoremove --yes
systemctl mask rpi-eeprom-update.service hciuart.service systemd-logind.service
Expand Down
2 changes: 1 addition & 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 "./tests/dtb/bcm2710-rpi-3-b.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" -nographic -serial mon:stdio

# Setup user
expect "root@(none):/# "
Expand Down