Skip to content

Commit

Permalink
Fix log uploads in GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed Dec 5, 2024
1 parent 3325c13 commit 75e7ec8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: logs.tar.gz
path: logs.tar.gz
2 changes: 1 addition & 1 deletion tests/image.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [[ $1 == "setup" ]]; then
imageFile "umount" "$3"
elif [[ $1 == "copy-logs" ]]; then
imageFile "mount" "$2"
cp tests/fs/opt/zram/logs.tar.gz .
cp tests/fs/opt/zram/logs.tar.gz logs.tar.gz
imageFile "umount" "$2"
fi

Expand Down
4 changes: 3 additions & 1 deletion tests/run.exp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ expect {
exp_continue
}
"pi@raspberrypi:~$ " {
send "sudo /opt/zram/uninstall.bash\r"
send "touch /var/log/test.txt\r"
}
}
expect "pi@raspberrypi:~$ "
send "sudo /opt/zram/uninstall.bash\r"
expect "pi@raspberrypi:~$ "
send "/opt/zram/tests/test-zram-devices.bash removal\r"
expect {
-re "Test failed:.*$" {
Expand Down
1 change: 1 addition & 0 deletions uninstall.bash
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fi
rm -f /etc/logrotate.d/zram-config
rm -f /etc/ztab
rm -rf /usr/local/lib/zram-config
cat /usr/local/share/zram-config/log/zram-config.log
rm -rf /usr/local/share/zram-config
rm -f /var/log/zram-config

Expand Down

0 comments on commit 75e7ec8

Please sign in to comment.