66 lines
2.3 KiB
Diff
66 lines
2.3 KiB
Diff
From 4aa30f1beafc1fed844a0f335e196400adeb1840 Mon Sep 17 00:00:00 2001
|
|
From: Mariusz Tkaczyk <mtkaczyk@kernel.org>
|
|
Date: Fri, 11 Apr 2025 14:36:12 +0200
|
|
Subject: [PATCH 41/74] tests: support second runner
|
|
|
|
Second runner has different VM name. Honor that when coping
|
|
and removing logs.
|
|
|
|
Signed-off-by: Mariusz Tkaczyk <mtkaczyk@kernel.org>
|
|
---
|
|
.github/workflows/tests.yml | 22 +++++++++++++++++++---
|
|
1 file changed, 19 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
|
|
index ddba632dc13c..a07e320b03c4 100644
|
|
--- a/.github/workflows/tests.yml
|
|
+++ b/.github/workflows/tests.yml
|
|
@@ -42,6 +42,10 @@ jobs:
|
|
vagrant ssh -c "sudo timedatectl set-timezone UTC && \
|
|
sudo systemctl restart chronyd && sudo chronyc -a makestep && sleep 1 && uname -r"
|
|
echo "FYI vagrant time command finished with exit code: $?"
|
|
+
|
|
+ - name: Export RUNNER_NAME
|
|
+ run: echo "RUNNER_NAME=$RUNNER_NAME" >> $GITHUB_ENV
|
|
+
|
|
- name: 'Run tests'
|
|
id: testing
|
|
continue-on-error: true
|
|
@@ -55,18 +59,30 @@ jobs:
|
|
cd ..
|
|
vagrant ssh -c "sudo mkdir -p /home/vagrant/host/logs && sudo mv /var/tmp/*.log /home/vagrant/host/logs"
|
|
|
|
- - name: "Save artifacts"
|
|
- if: ${{ steps.testing.outcome == 'failure' }}
|
|
+ - name: "Save artifacts inspur5"
|
|
+ if: ${{ steps.testing.outcome == 'failure' && env.RUNNER_NAME == 'inspur5' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "Logs from failed tests"
|
|
path: /home/ci/actions-runner/_work/mdadm/logs/*.log
|
|
|
|
+ - name: "Save artifacts inspur5-2"
|
|
+ if: ${{ steps.testing.outcome == 'failure' && env.RUNNER_NAME == 'inspur5-2'}}
|
|
+ uses: actions/upload-artifact@v4
|
|
+ with:
|
|
+ name: "Logs from failed tests"
|
|
+ path: /home/ci/actions-runner-2/_work/mdadm/logs/*.log
|
|
+
|
|
- name: "Clean logs"
|
|
if: ${{ steps.testing.outcome == 'failure' }}
|
|
run: |
|
|
cd ..
|
|
- sudo rm -rf /home/ci/actions-runner/_work/mdadm/logs/*.log
|
|
+
|
|
+ if [ "$RUNNER_NAME" == "inspur5" ]; then
|
|
+ sudo rm /home/ci/actions-runner/_work/mdadm/logs/*.log
|
|
+ else
|
|
+ sudo rm /home/ci/actions-runner-2/_work/mdadm/logs/*.log
|
|
+ fi
|
|
|
|
- name: "Set failed"
|
|
if: ${{ steps.testing.outcome == 'failure' }}
|
|
--
|
|
2.50.1
|
|
|