Skip to content

Commit 57ffb96

Browse files
Upload test screenshot as artifacts (#7)
* Save test screenshot to /tmp/<test-name>.ppm * Create zip of test screenshots * Update test screenshots as zip on release * tests/lib.sh typo fixed.
1 parent 009dfe7 commit 57ffb96

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,24 @@ jobs:
3939
prerelease: false
4040
commitish: ${{ github.sha }}
4141

42-
- name: Upload Release Asset
42+
- name: Upload Release Image
4343
uses: actions/upload-release-asset@v1
44-
id: upload-release-asset
44+
id: upload-release-image
4545
env:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747
with:
4848
upload_url: ${{ steps.create_release.outputs.upload_url }}
4949
asset_path: build/image.vmdk
5050
asset_name: image.vmdk
5151
asset_content_type: application/x-vmdk
52+
53+
- name: Upload Release Test Screenshots
54+
uses: actions/upload-release-asset@v1
55+
id: upload-release-test-screenshots
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
with:
59+
upload_url: ${{ steps.create_release.outputs.upload_url }}
60+
asset_path: /tmp/test_screenshots.zip
61+
asset_name: test_screenshots.zip
62+
asset_content_type: application/zip

tests/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SRC_DIR="src/"
44
SRC_TEST_DIR="src_test/"
55
BUILD_TEST_DIR="build_test"
66
MONITOR_PORT=55555
7-
QEMU_SCREENSHOT="/tmp/qemu.ppm"
7+
QEMU_SCREENSHOT="/tmp/$(basename $0 .sh).ppm"
88

99

1010
##########################################

tests/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ timeout 2m bash tests/bootloader_stage2_test.sh
77
timeout 2m bash tests/kernel_core_entry_test.sh
88

99
# Done
10-
echo "All tests passed!"
10+
echo "All tests passed!"
11+
zip /tmp/test_screenshots.zip /tmp/*_test.ppm

0 commit comments

Comments
 (0)