ci: hand root-owned test results to the runner; install progress every 30 s
The harness runs as root in its container, so test-runs and the serial logs QEMU writes there belong to root. The runner's user could then neither record the pull request number beside them nor read install-serial.log into the artifact (EACCES at zip time), which failed the job after a passing install and boot. A chown -R step after the container step, run even on failure, fixes both. The install loop now prints a line every 30 s and still screenshots every 2 min.
This commit is contained in:
1 parent
89a34f7885
commit
fe133bd419
2 files changed
+12
-6
No files matched your search
@@ -57,6 +57,14 @@ jobs:
|
||||
./test/integration release/*.iso boot --no-preview --memory 8192 --timeout 1800
|
||||
'
|
||||
|
||||
# The harness ran as root in its container: test-runs and what QEMU
|
||||
# wrote there (the serial logs) belong to root until this step.
|
||||
- name: Hand the results to the runner's user
|
||||
if: always()
|
||||
run: |
|
||||
mkdir -p test-runs
|
||||
sudo chown -R "$(id -u):$(id -g)" test-runs
|
||||
|
||||
- name: Report times
|
||||
if: always()
|
||||
run: |
|
||||
@@ -89,11 +97,7 @@ jobs:
|
||||
# it needs the PR number, which a workflow_run event omits for forks.
|
||||
- name: Record the pull request
|
||||
if: always() && github.event_name == 'pull_request'
|
||||
run: |
|
||||
# The harness ran as root in its container and created test-runs.
|
||||
mkdir -p test-runs
|
||||
sudo chown "$(id -u):$(id -g)" test-runs
|
||||
echo "${{ github.event.pull_request.number }}" > test-runs/pr-number
|
||||
run: echo "${{ github.event.pull_request.number }}" > test-runs/pr-number
|
||||
|
||||
- name: Upload test artifacts
|
||||
if: always()
|
||||
|
||||
@@ -569,11 +569,13 @@ install_phase() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# A line every 30 s so a slow runner never looks hung; a screenshot of
|
||||
# the installer's dashboard every 2 min, which is enough to see progress.
|
||||
if ((waited % 120 == 0)); then
|
||||
printf -v progress_name 'success-install-progress-%04ds' "$waited"
|
||||
capture_console "$progress_name"
|
||||
echo " ... installing (${waited}s)"
|
||||
fi
|
||||
((waited % 30 == 0)) && echo " ... installing (${waited}s)"
|
||||
|
||||
sleep 10
|
||||
((waited += 10))
|
||||
|
||||
Reference in new issue
Block a user