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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#!/bin/bash
#
# Copyright 2002 Ben Escoto <ben@emerose.org>
# Copyright 2007 Kenneth Loafman <kenneth@loafman.com>
# Copyright 2011 Canonical Ltd
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# Duplicity is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with duplicity; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Go to directory housing this script
cd $(dirname $0)
THISDIR=$(pwd)
export TZ=US/Central
export LANG=
# up for 'duplicity' module and here for 'helper.py'
export PYTHONPATH="$(dirname $THISDIR):$THISDIR/helpers"
export GNUPGHOME="$THISDIR/gnupg"
export PATH="$(dirname $THISDIR)/bin:$PATH"
TOP_TESTS=$*
if [ -z "$TOP_TESTS" ]; then
TOP_TESTS="all"
fi
if [ "$TOP_TESTS" = "all" ]; then
TOP_TESTS="tests" # don't include manual tests unless they were asked for
fi
# Expand arguments if directories
TESTS=
for t in $TOP_TESTS; do
if [ -d "$t" ]; then
TESTS="$TESTS $(ls $t/*.py)"
else
TESTS="$TESTS $t"
fi
done
# run against all supported python versions
for v in 2.4 2.5 2.6 2.7; do
type python$v >& /dev/null
if [ $? == 1 ]; then
echo "python$v not found on system"
continue
fi
echo "========== Compiling librsync for python$v =========="
pushd ../duplicity
python$v ./compilec.py
popd
for t in $TESTS; do
echo "========== Running $t for python$v =========="
pushd .
if ! python$v -u $t -v 2>&1; then
echo "Test failed"
exit 1
fi
popd
echo "========== Finished $t for python$v =========="
echo
echo
done
done
|