File: release-testing

package info (click to toggle)
xen-tools 4.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 1,476 kB
  • sloc: perl: 4,942; sh: 1,690; makefile: 268
file content (50 lines) | stat: -rwxr-xr-x 1,376 bytes parent folder | download | duplicates (3)
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

set -e

exec 2>&1
exec > >( tee xen-tools-release-testing-$(date -Iseconds).log )

if [ -z "$DISTRIBUTIONS" ]; then
    DISTRIBUTIONS=$(awk '!/^#|^$|dont-test/ {print $1}' /etc/xen-tools/distributions.conf)
fi

echo Deleting old release-testing artefacts
for dist in $DISTRIBUTIONS; do
    echo "*** Removing potential xen-tools-release-testing-$dist..."
    xen-delete-image --verbose --hostname "xen-tools-release-testing-$dist"
done

echo Syncing...
sync
seconds=10
printf "Sleeping for %i seconds to avoid LVM race conditions: " $seconds
for i in $(seq 1 $seconds); do sleep 1; printf "%i " $i; done; printf '\n';

SUCCEEDED=''
FAILED=''

# From now on we just want to log failures, not abort.
set +e

for dist in $DISTRIBUTIONS; do
    echo "*** Creating xen-tools-release-testing-$dist..."
    xen-create-image --verbose --hostname "xen-tools-release-testing-$dist" --dist $dist --force "$@"

    if [ "$?" -eq '0' ]; then
        SUCCEEDED="$dist $SUCCEEDED"
    else
        FAILED="$dist $FAILED"
    fi
done

echo ''
echo '======================================================================'
if [ -z "$FAILED" ]; then
    echo '*** All tests succeeded! ***'
elif [ -z "$SUCCEEDED" ]; then
    echo '*** All tests failed! ***'
else
    echo "*** These distributions succeeded: $SUCCEEDED ***"
    echo "*** These distributions failed: $FAILED ***"
fi