-
Notifications
You must be signed in to change notification settings - Fork 22
/
openqa-schedule-mm-ping-test
executable file
·63 lines (55 loc) · 1.49 KB
/
openqa-schedule-mm-ping-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
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
set -eu -o pipefail
. "$(dirname "$0")"/_common
openqa_url=${openqa_url:-https://openqa.opensuse.org}
distri=${distri:-opensuse}
flavor=${flavor:-DVD}
arch=${arch:-x86_64}
version=${version:-Tumbleweed}
test_name=${test_name:-ping_client}
tmpfile=$(mktemp)
trap 'rm -f "$tmpfile"' EXIT
cat > "$tmpfile" << EOF
---
products:
mm-ping-test:
distri: $distri
flavor: $flavor
arch: $arch
version: $version
machines:
64bit:
backend: qemu
settings:
WORKER_CLASS: qemu_x86_64,tap
.common: &common
BOOT_HDD_IMAGE: '1'
DESKTOP: textmode
IS_MM_SERVER: '1'
NICTYPE: tap
EXPECTED_NM_CONNECTIVITY: '(limited|full)'
QEMU_DISABLE_SNAPSHOTS: '1'
YAML_SCHEDULE: schedule/functional/mm_ping.yaml
job_templates:
ping_server:
product: mm-ping-test
machine: 64bit
settings:
<<: *common
HOSTNAME: server
ping_client:
product: mm-ping-test
machine: 64bit
settings:
<<: *common
HOSTNAME: client
PARALLEL_WITH: ping_server
EOF
hdd=$(runcli openqa-cli api --host "$openqa_url" jobs version="$version" scope=relevant arch="$arch" flavor="$flavor" test="$test_name" latest=1 | runjq -r '.jobs | map(select(.result == "passed")) | max_by(.settings.BUILD) .settings.HDD_1')
time openqa-cli schedule \
--monitor \
--host "$openqa_url" \
--param-file SCENARIO_DEFINITIONS_YAML="$tmpfile" \
DISTRI="$distri" VERSION="$version" FLAVOR="$flavor" ARCH="$arch" \
BUILD="$(date -Im)" _GROUP_ID=0 \
HDD_1="$hdd"