From 36dd37f7d8f146b47e20fee036d58621a44b862b Mon Sep 17 00:00:00 2001 From: Ethan Dye Date: Sat, 1 Jun 2024 19:48:10 -0600 Subject: [PATCH] Use custom action runner Signed-off-by: Ethan Dye --- .github/workflows/test-action.yml | 11 ++++++++--- tests/image.bash | 2 +- tests/run.exp | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 8abb63d..d579160 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -37,11 +37,16 @@ jobs: path: ${{ steps.setup.outputs.image }} key: ${{ steps.setup.outputs.image }} - name: Build image - run: sudo -E ./tests/image.bash "setup" "${{ steps.setup.outputs.imagexz }}" "${{ steps.setup.outputs.image }}" - shell: bash - - name: Run tests run: | + sudo -E ./tests/image.bash "setup" "${{ steps.setup.outputs.imagexz }}" "${{ steps.setup.outputs.image }}" cp "${{ steps.setup.outputs.image }}" raspios.img + shell: bash + - name: Run tests + uses: pguyot/arm-runner-action@v2 + base_image: file://raspios.img + cpu: cortex-a7 + cpu_info: cpuinfo/raspberrypi_3b + commands: | sudo expect ./tests/run.exp shell: bash - name: Copy logs diff --git a/tests/image.bash b/tests/image.bash index 920cccd..b868be5 100755 --- a/tests/image.bash +++ b/tests/image.bash @@ -25,7 +25,7 @@ if [[ $1 == "setup" ]]; then gpg -q --trust-model always --verify "${2}.sig" "$2" xz "$2" -d fi - qemu-img resize -f raw "$3" 8G + qemu-img resize -f raw "$3" 4G echo ", +" | sfdisk -N 2 "$3" imageFile "mount" "$3" rsync -avr --exclude="*.img" --exclude="*.sig" --exclude="tests/fs" --exclude="tests/dtb" --exclude="tests/kernel" ./ tests/fs/opt/zram diff --git a/tests/run.exp b/tests/run.exp index 2b18696..d84ebef 100755 --- a/tests/run.exp +++ b/tests/run.exp @@ -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 "./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 # Setup user expect "root@(none):/# "