~mterry/duplicity/ship-tests

« back to all changes in this revision

Viewing changes to testing/run-auto-tests

  • Committer: Michael Terry
  • Date: 2011-11-03 12:44:19 UTC
  • Revision ID: michael.terry@canonical.com-20111103124419-tgs9prwb403h0qbi
make collectionstest auto

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# Copyright 2002 Ben Escoto <ben@emerose.org>
 
4
# Copyright 2007 Kenneth Loafman <kenneth@loafman.com>
 
5
# Copyright 2011 Canonical Ltd
 
6
#
 
7
# This file is part of duplicity.
 
8
#
 
9
# Duplicity is free software; you can redistribute it and/or modify it
 
10
# under the terms of the GNU General Public License as published by the
 
11
# Free Software Foundation; either version 2 of the License, or (at your
 
12
# option) any later version.
 
13
#
 
14
# Duplicity is distributed in the hope that it will be useful, but
 
15
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
# General Public License for more details.
 
18
#
 
19
# You should have received a copy of the GNU General Public License
 
20
# along with duplicity; if not, write to the Free Software Foundation,
 
21
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
22
 
 
23
# run against all supported python versions
 
24
for v in 2.4 2.5 2.6 2.7; do
 
25
    if [ ! -e /usr/bin/python$v ]; then
 
26
        echo "python$v not found on system"
 
27
        continue
 
28
    fi
 
29
 
 
30
    # Go to directory housing this script
 
31
    cd `dirname $0`
 
32
 
 
33
    echo "========== Compiling librsync for python$v =========="
 
34
    pushd ../duplicity
 
35
    python$v ./compilec.py
 
36
    popd
 
37
 
 
38
    for t in `ls auto/*.py`; do
 
39
        if [ "$t" = "auto/helper.py" ]; then
 
40
            continue
 
41
        fi
 
42
        echo "========== Running $t for python$v =========="
 
43
        pushd .
 
44
        if ! env PYTHONPATH=.. python$v -u $t -v 2>&1; then
 
45
          echo "Test failed"
 
46
          exit 1
 
47
        fi
 
48
        popd
 
49
        echo "========== Finished $t for python$v =========="
 
50
        echo
 
51
        echo
 
52
    done
 
53
done