aboutsummaryrefslogtreecommitdiff
path: root/testsuite/run-regression.sh
blob: 41cd97fa2f5f12132f21bd94742101bdffd40766 (plain)
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
#!/bin/bash
# requires /var/cache/pbuilder/base-sarge.tgz


log_success () {
    CODE=$?
    if [ $CODE = 0 ]; then
	echo "[OK]   $1" >> ${RESULTFILE}
    else
	echo "[FAIL] $1" >> ${RESULTFILE}
    fi
}

RESULTFILE="run-regression.log"
: > ${RESULTFILE}
RESULTFILE=$(readlink -f ${RESULTFILE})

# prepare files.
(
    mkdir regression/work && \
    cd regression/work && \
    apt-get source dsh
)

(
    cd regression && \
	for A in $(ls -1 *.sh | sort -n); do 
	    OUTPUT_LOGNAME=log/$A.log bash $A 
	    log_success $A
    done
)

sudo rm -rf regression/work/
echo '### RESULT: ###'
cat "${RESULTFILE}"