-
-
Notifications
You must be signed in to change notification settings - Fork 24
74 lines (63 loc) · 2.69 KB
/
Copy pathtest.yml
File metadata and controls
74 lines (63 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: q35 testing workflow
on:
workflow_call:
inputs:
artifact_name:
type: string
jobs:
test_in_qemu:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout OSFV repository and submodules
uses: actions/checkout@v4
with:
repository: 'Dasharo/open-source-firmware-validation'
ref: 'develop'
submodules: 'recursive'
fetch-depth: 0
- name: Download workflow artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}
- name: Set up required tools
run: |
sudo apt-get update
sudo apt-get install qemu-system-x86-64 swtpm git-annex
# Pulling secure-boot/sb_test_data.img fails, carry on anyway
- name: Set up osfv-test-data
run: |
pushd osfv-test-data
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git annex pull || true
./setup.sh
popd
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
# OSFV scripts/ci/qemu-run.sh expects QEMU_FW_FILE="./qemu_q35.rom"
# VirtIO disks will be mounted dynamically later with esp-scanning.robot,
# no need to create and attach one here with `os` instead of `firmware`
- name: Start QEMU in background
run: |
mv coreboot.rom qemu_q35.rom
./scripts/ci/qemu-run.sh nographic firmware &
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Start custom-boot-menu-key.robot, test case CBK001.001 and CBK002.001
run: |
robot -b command_log_CBK001.001.txt -v fw_file:qemu_q35.rom -v snipeit:no -L TRACE -v config:qemu -v rte_ip:127.0.0.1 -t "CBK001.001*" dasharo-compatibility/custom-boot-menu-key.robot
robot -b command_log_CBK002.001.txt -v fw_file:qemu_q35.rom -v snipeit:no -L TRACE -v config:qemu -v rte_ip:127.0.0.1 -t "CBK002.001*" dasharo-compatibility/custom-boot-menu-key.robot
- name: Start esp-scanning.robot
run: |
robot -d ./logs/$(date +%Y.%m.%d_%H.%M.%S)/self-tests -v fw_file:qemu_q35.rom -v snipeit:no -L TRACE -v config:qemu -v rte_ip:127.0.0.1 dasharo-compatibility/esp-scanning.robot