Skip to content

Commit d58e477

Browse files
committed
fix: sudo kernel copy + safe grep check in qemu-test.yml
1 parent 4cc99d9 commit d58e477

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/qemu-test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,9 @@ jobs:
222222
run: |
223223
if [ "${{ matrix.arch }}" = "x86_64" ]; then
224224
KERN=$(find /boot -name "vmlinuz*" -type f 2>/dev/null | head -1)
225-
[ -n "$KERN" ] && cp "$KERN" build/vmlinuz
225+
[ -n "$KERN" ] && sudo cp "$KERN" build/vmlinuz || true
226226
fi
227+
continue-on-error: true
227228
- name: Boot QEMU
228229
timeout-minutes: 3
229230
run: |
@@ -261,10 +262,8 @@ jobs:
261262
go-version: "1.22"
262263
- run: go test -race -v -count=1 ./... 2>&1 | tee results.txt
263264
- run: |
264-
PASS=$(grep -c "^--- PASS" results.txt || echo 0)
265-
FAIL=$(grep -c "^--- FAIL" results.txt || echo 0)
266-
echo "✅ $PASS passed, $FAIL failed"
267-
[ "$FAIL" -eq 0 ] || exit 1
265+
FAIL_COUNT=$(grep -c '^--- FAIL' results.txt || true)
266+
if [ "$FAIL_COUNT" != "" ] && [ "$FAIL_COUNT" -gt 0 ]; then exit 1; fi
268267
269268
sanity-gate:
270269
name: Sanity Gate

0 commit comments

Comments
 (0)