-
Notifications
You must be signed in to change notification settings - Fork 22
/
trigger-pflash-test
executable file
·50 lines (43 loc) · 1.61 KB
/
trigger-pflash-test
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
#!/bin/bash
# Trigger test to generate pflash vars image
#
# Can be configured by variables.
# shellcheck source=/dev/null
. "$(dirname "$0")"/_common
dry_run="${dry_run:-"0"}"
target_host="${target_host:-"openqa.opensuse.org"}"
target_host_proto="${target_host_proto:-"https"}"
tw_openqa_host="${tw_openqa_host:-"https://openqa.opensuse.org"}"
tw_group_id="${tw_group_id:-"1"}"
openqa_cli="${openqa_cli:-"openqa-cli"}"
arch="${arch:-"x86_64"}"
machine="${machine:-"64bit"}"
client_prefix=${client_prefix:-}
OPENQA_API_KEY=${OPENQA_API_KEY:-}
OPENQA_API_SECRET=${OPENQA_API_SECRET:-}
CLI_ARGS=()
TRIGGERED_BY=${TRIGGERED_BY:$0}
if [[ -n "$GITHUB_SERVER_URL" ]]; then
TRIGGERED_BY="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/blob/$GITHUB_REF_NAME/$0"
fi
if [[ -n "$TRIGGERED_BY" ]]; then
CLI_ARGS+=("TRIGGERED_BY=$TRIGGERED_BY")
fi
set -xeuo pipefail
main() {
local image
[[ "$dry_run" = 1 ]] && client_prefix="echo"
image=$(find_latest_published_tumbleweed_image "$tw_group_id" "$arch" "$machine" iso)
${client_prefix} "${openqa_cli}" \
api --host "${target_host_proto}://${target_host}" -X POST jobs \
--apikey "$OPENQA_API_KEY" --apisecret "$OPENQA_API_SECRET" \
TEST=ovmf-resolution@"$arch" QEMUVGA=qxl UEFI=1 \
UEFI_PFLASH_CODE=/usr/share/qemu/ovmf-x86_64-ms-code.bin \
UEFI_PFLASH_VARS=/usr/share/qemu/ovmf-x86_64-ms-vars.bin \
PUBLISH_PFLASH_VARS=ovmf-x86_64-ms-vars-800x600.qcow2 \
DISTRI=openSUSE VERSION=Tumbleweed FLAVOR=NET ARCH="${arch}" \
SCHEDULE=tests/boot/tianocore_set_resolution \
ISO="$image" \
"${CLI_ARGS[@]}"
}
main