Skip to content

Commit

Permalink
.github/workflows/test.yml: Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Langowski <[email protected]>
  • Loading branch information
PLangowski committed Nov 20, 2024
1 parent c17084d commit 1a5aa00
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: CI on push release tag
name: Run DTS tests
on:
pull_request:
# branches:
Expand All @@ -10,9 +10,11 @@ jobs:
run-tests:
name: Run DTS tests
if: ${{ contains(join(needs.*.result, ','), 'success') }}
needs: build
needs: build-dts
runs-on:
labels: dts-builder
outputs:
qemu_pid: ${{ steps.run_qemu.outputs.qemu_pid }}
steps:
- name: Checkout OSFV repo
uses: actions/checkout@v4
Expand All @@ -24,15 +26,11 @@ jobs:
- name: Copy DTS binary
shell: bash
run: |
mkdir open-source-firmware-validation/scripts/ci/qemu-data
bmaptool copy \
--bmap build/tmp/deploy/images/genericx86-64/dts-base-image-genericx86-64.wic.bmap \
build/tmp/deploy/images/genericx86-64/dts-base-image-genericx86-64.wic.gz \
open-source-firmware-validation/scripts/ci/qemu-data/dts.img
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: 'pip'
python-version: '3.12'
- name: Install requirements
shell: bash
run: |
Expand All @@ -44,7 +42,9 @@ jobs:
shell: bash
id: run_qemu
run: |
HDD_PATH=./scripts/ci/qemu-data/dts.img ./scripts/ci/qemu-run.sh nographic os &
cd open-source-firmware-validation/scripts/ci
qemu-img create -f qcow2 qemu-data/hdd.qcow2 20G
HDD_PATH=qemu-data/dts.img ./qemu-run.sh nographic os &
pid=$!
echo "qemu_pid=$pid" >> "$GITHUB_OUTPUT"
- name: Create directory for logs
Expand All @@ -63,6 +63,7 @@ jobs:
DPP_PASSWORD: ${{ secrets.DPP_PASSWORD }}
LOG_DIR: ${{ steps.log_dirs.outputs.directory }}
run: |
source venv/bin/activate
robot -L TRACE -v config:qemu -v rte_ip:127.0.0.1 -v snipeit:no \
dts/dts-e2e.robot 2>&1 | tee $LOG_DIR/output.log | grep "| PASS |\|| FAIL |"
- name: Copy log
Expand All @@ -71,14 +72,19 @@ jobs:
LOG_DIR: ${{ steps.log_dirs.outputs.directory }}
run: |
cp log.html $LOG_DIR/log.html
- name: Cleanup
if: always()
cleanup:
name: Cleanup
if: always()
needs: run-tests
runs-on:
labels: dts-builder
steps:
- name: Cleanup after tests
shell: bash
run: |
deactivate
qemu_pid="${{ steps.run_qemu.outputs.qemu_pid }}"
qemu_pid="${{ needs.run-tests.outputs.qemu_pid }}"
if [ ! -z "$qemu_pid" ]; then
kill $qemu_pid
fi
cd ..
rm -rf open-source-firmware-validation meta-dts
rm -rf open-source-firmware-validation meta-dts build

0 comments on commit 1a5aa00

Please sign in to comment.