~ubuntu-branches/ubuntu/utopic/exabgp/utopic

« back to all changes in this revision

Viewing changes to QA/bin/unittest

  • Committer: Package Import Robot
  • Author(s): Henry-Nicolas Tourneur
  • Date: 2014-03-08 19:07:00 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140308190700-xjbibpg1g6001c9x
Tags: 3.3.1-1
* New upstream release
* Bump python minimal required version (2.7)
* Closes: #726066 Debian packaging improvements proposed by Vincent Bernat
* Closes: #703774 not existent rundir (/var/run/exabgp) after reboot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
dirname=`dirname $0`
4
 
 
5
 
case $dirname in
6
 
        /*)
7
 
                cd $dirname/../.. > /dev/null
8
 
                path=`pwd`
9
 
                cd - > /dev/null
10
 
        ;;
11
 
        *)
12
 
                cd `pwd`/$dirname/../.. > /dev/null
13
 
                path=`pwd`
14
 
                cd - > /dev/null
15
 
        ;;
16
 
esac
17
 
 
18
 
export PYTHONPATH=$path/lib
19
 
 
20
 
if [ "$INTERPRETER" != "" ]
21
 
then
22
 
        INTERPRETER=`which $INTERPRETER`
23
 
fi
24
 
 
25
 
PYPY=`which pypy 2>/dev/null`
26
 
PYTHON27=`which python2.7 2>/dev/null`
27
 
PYTHON26=`which python2.6 2>/dev/null`
28
 
PYTHON25=`which python2.5 2>/dev/null`
29
 
PYTHON24=`which python2.4 2>/dev/null`
30
 
PYTHON2=`which python2 2>/dev/null`
31
 
PYTHON=`which python 2>/dev/null`
32
 
 
33
 
if [ -f "$PYPY" ]
34
 
then
35
 
        INTERPRETER=$PYPY
36
 
elif [ -f "$PYTHON27" ]
37
 
then
38
 
        INTERPRETER=$PYTHON27
39
 
elif [ -f "$PYTHON26" ]
40
 
then
41
 
        INTERPRETER=$PYTHON26
42
 
elif [ -f "$PYTHON25" ]
43
 
then
44
 
        INTERPRETER=$PYTHON25
45
 
elif [ -f "$PYTHON24" ]
46
 
then
47
 
        INTERPRETER=$PYTHON24
48
 
elif [ -f "$PYTHON2" ]
49
 
then
50
 
        INTERPRETER=$PYTHON2
51
 
elif [ -f "$PYTHON" ]
52
 
then
53
 
        INTERPRETER=$PYTHON
54
 
else
55
 
        INTERPRETER=python
56
 
fi
57
 
 
58
 
exec $INTERPRETER -m exabgp.debug $*