File: runtest.sh

package info (click to toggle)
python-orbit 0.3.1-12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,492 kB
  • ctags: 801
  • sloc: sh: 9,444; ansic: 5,642; python: 1,141; makefile: 126
file content (41 lines) | stat: -rwxr-xr-x 715 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
export PYTHONPATH=../src/:$PYTHONPATH
export IDLPATH=.:$IDLPATH

DEBUG=

# simple hack to get it to run inside gdb
if [ x$1 == x-d ]; then
    shift

    gdb python << __EOF__ &
r test-server.py 
where
__EOF__
SERVERPID=$!
sleep 1s

    gdb python << __EOF__
r Test.py
where
__EOF__
else
    if [ x$1 == x-gdb ]; then
        shift
        python test-server.py  &
        sleep 1s
        file=$RANDOM

        echo "run -c 'import os, signal, CORBA; os.kill ( os.getpid(), signal.SIGINT ); import Test' $*" >> /tmp/$file

        gdb python -x /tmp/$file
        rm -f /tmp/$file
    else
        python test-server.py &
        sleep 1s
        python Test.py $*
    fi
fi
kill `cat pid`
rm ior
rm pid