File: jenkins-wrap.sh

package info (click to toggle)
wesnoth-1.14 1:1.14.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 817,348 kB
  • sloc: cpp: 228,458; java: 29,664; python: 22,615; lisp: 7,550; sh: 3,325; xml: 1,767; perl: 1,501; ansic: 1,083; makefile: 264; php: 98; sed: 44
file content (25 lines) | stat: -rwxr-xr-x 472 bytes parent folder | download | duplicates (9)
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
#!/bin/sh
COUNTER=9

export PATH="/usr/local/bin:$PATH"

run_test() {
    xvfb-run -e xvfb-err "$@"
}

run_test "$@"
ERRORCODE=$?
while [ $COUNTER -gt 0 -a $ERRORCODE -eq 1 ];do
    if [ -s xvfb-err ]; then
        echo "xvfb output:"
        cat xvfb-err
        rm xvfb-err
    fi
    echo "\n\'xvfb-run $@' returned 1, which could mean that xvfb failed. Retrying..."
    run_test "$@"
    ERRORCODE=$?
    COUNTER=$(($COUNTER - 1))
done

rm -f xvfb-err
exit $ERRORCODE