Permalink
Browse files

adding the test wrapper

  • Loading branch information...
1 parent b4361df commit a854da20edd584c8d7b689a31f135ce0b47c3dee BuzzTroll committed Sep 2, 2010
Showing with 21 additions and 0 deletions.
  1. +21 −0 lantorrent/bin/test.sh
View
21 lantorrent/bin/test.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+dir=`dirname $0`
+cd $dir/..
+pypath=`pwd`
+if [ "X${PYTHONPATH}" == "X" ]; then
+ export PYTHONPATH=$pypath
+else
+ export PYTHONPATH=$pypath:${PYTHONPATH}
+fi
+# so that we pick up the ini file
+export LANTORRENT_HOME=$pypath
+
+pidfile=`mktemp`
+$LANTORRENT_HOME/bin/make_lt_server.sh 4 $pidfile
+xinet_pid=`cat $pidfile`
+echo "xinet on $xinet_pid"
+
+trap "kill $xinet_pid; sleep 10; kill -9 $xinet_pid" EXIT
+source $LANTORRENT_HOME/tests/ports_env.sh
+nosetests tests/*_test.py

0 comments on commit a854da2

Please sign in to comment.