-
Notifications
You must be signed in to change notification settings - Fork 152
/
.obs_test_status
executable file
·39 lines (35 loc) · 1.24 KB
/
.obs_test_status
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
#!/bin/bash
function kiwi_version {
python -c 'from kiwi.version import __version__; print(__version__)'
}
function kiwi_build_version {
echo -n "$1" | grep python[32]-kiwi- | head -n 1 | cut -f 3 -d -
}
kiwi_local_version=$(kiwi_version)
while read -r project arch; do
echo $project
while read -r result; do
test -z "${result}" && continue
opts=""
package=$(echo "${result}" | cut -f2 -d \")
multibuild=$(echo "${package}" | cut -f2 -d:)
if [ ! "${package}" = "${multibuild}" ];then
package=$(echo "${package}" | cut -f1 -d:)
opts="-M ${multibuild}"
fi
build_log=$(
osc rbuildlog --last ${opts} ${project} ${package} images ${arch}
)
kiwi_obs_version=$(kiwi_build_version "${build_log}")
if [ "$kiwi_obs_version" = "$kiwi_local_version" ];then
result="${result} kiwi=\"${kiwi_obs_version}\""
else
result="${result} kiwi=\"want: ${kiwi_local_version} "
result="${result} got: ${kiwi_obs_version}\""
fi
echo " ${result}"
done < <(
osc results "${project}" --xml | grep -v excluded |\
grep status | cut -f2 -d \< | cut -f1 -d \/
)
done < .obs_test