forked from rghe/perfarce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-all
executable file
·48 lines (39 loc) · 1.09 KB
/
test-all
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
#!/bin/sh
set -e
export HGDIR=$(dirname $PWD)/mercurial
if [ ! -d "$HGDIR" ] ; then
echo "Directory $HGDIR should have the Mercurial repository code"
echo "Clone Mercurial from by running:"
echo " hg clone https://www.mercurial-scm.org/repo/hg $HGDIR"
exit 1
fi
mkdir -p logs
HGRCPATH=$PWD/logs/.hgrc
export HGRCPATH
cat <<EOF >$HGRCPATH
[extensions]
perfarce=$PWD/perfarce.py
EOF
OLDPATH=$PATH
STAT=
# No longer compatible with versions of Mercurial prior to 4.5
for R in 4.5 4.5.1 4.5.2 4.5.3 4.6 4.6.1 4.6.2 4.7 4.7.1 4.7.2 4.8 4.8.1 4.8.2 4.9 4.9.1 \
5.0 5.0.1 5.0.2 5.1 5.1.1 5.1.2 5.2 5.2.1 5.2.2 5.3 5.3.1 5.3.2 5.4 5.4.1 5.4.2 5.5 5.5.1 ; do
echo Building Mercurial $R
( cd $HGDIR ; hg up --clean $R ; make clean ; make local ) >logs/$R 2>&1
PATH=$HGDIR:$PATH
if hg help perfarce | grep "pull from Perforce" ; then
echo Running
if ./test-push-perforce "$@" >>logs/$R 2>&1 ; then
RES=OK
else
RES="FAIL,RC=$?"
fi
else
RES=NOLOAD
fi
echo "$R:$RES"
STAT="$STAT $R:$RES"
PATH=$OLDPATH
done
echo Results: $STAT