Permalink
Browse files

working out test suite issues

  • Loading branch information...
1 parent 74f3378 commit dd7fb902e18e1e960d75f0c27251a149d85597b4 @buzztroll buzztroll committed May 20, 2011
Showing with 14 additions and 11 deletions.
  1. +1 −1 lantorrent/etc/lantorrent.inet.in
  2. +4 −0 lantorrent/install.sh
  3. +5 −3 lantorrent/tests/make_lt_server.sh
  4. +4 −7 lantorrent/tests/test.sh
@@ -7,5 +7,5 @@ service @SERVICENAME@
user = @WHO@
wait = no
port = @PORT@
- server = @SERVER@
+ server = @LANTORRENT_HOME@/bin/lt-daemon.sh
@priteau
priteau Jun 12, 2011 Member

This change makes the xinetd generation incorrect: setup-vmm.py expends the SERVER variable to $LANTORRENT_HOME/bin/ltserver.

}
@@ -30,3 +30,7 @@ sed "s^@PGMNAME@^$ltdaemon^" etc/exe.in > $LANTORRENT_HOME/bin/lt-daemon.sh
chmod 755 $LANTORRENT_HOME/bin/lt-request.sh
chmod 755 $LANTORRENT_HOME/bin/lt-daemon.sh
+
+cp -r tests $LANTORRENT_HOME
+cp etc/xinetd.conf.in $LANTORRENT_HOME/tests
+cp etc/lantorrent.inet.in $LANTORRENT_HOME/tests
@@ -36,16 +36,18 @@ do
echo "s/@PORT@/$PORT/"
echo "s/@SERVICENAME@/$SERVNAME/"
echo "s^@LANTORRENT_HOME@^$LANTORRENT_HOME^"
- sed -e "s/@WHO@/$who/" -e "s/@PORT@/$PORT/" -e "s/@SERVICENAME@/$SERVNAME/" -e "s^@LANTORRENT_HOME@^$LANTORRENT_HOME^" $LANTORRENT_HOME/etc/lantorrent.inet.in | tee $LANTORRENT_HOME/tests/xinetd.d/$SERVNAME
+ sed -e "s/@WHO@/$who/" -e "s/@PORT@/$PORT/" -e "s/@SERVICENAME@/$SERVNAME/" -e "s^@LANTORRENT_HOME@^$LANTORRENT_HOME^" -e "s^@SERVER@^$LANTORRENT_HOME/bin/lt-daemon.sh^" $LANTORRENT_HOME/tests/lantorrent.inet.in | tee $LANTORRENT_HOME/tests/xinetd.d/$SERVNAME
done
echo "export LANTORRENT_TEST_PORTS=$ports_str" > $LANTORRENT_HOME/tests/ports_env.sh
ls -l $LANTORRENT_HOME/tests/xinetd.d/
echo "s^@LANTORRENT_HOME@^$LANTORRENT_HOME^"
-sed "s^@LANTORRENT_HOME@^$LANTORRENT_HOME^" $LANTORRENT_HOME/etc/xinetd.conf.in | tee $LANTORRENT_HOME/tests/xinetd.conf
+sed "s^@LANTORRENT_HOME@^$LANTORRENT_HOME^" $LANTORRENT_HOME/tests/xinetd.conf.in | tee $LANTORRENT_HOME/tests/xinetd.conf
pidfile=$2
-exec xinetd -f $LANTORRENT_HOME/tests/xinetd.conf -pidfile $pidfile
+cmd="xinetd -f $LANTORRENT_HOME/tests/xinetd.conf -pidfile $pidfile -filelog x.log -dontfork"
+echo $cmd
+$cmd &
@@ -4,23 +4,20 @@ if [ "X$LANTORRENT_HOME" == "X" ]; then
echo "Please set the env LANTORRENT_HOME"
exit 1
fi
-if [ "X$NIMBUS_HOME" == "X" ]; then
- echo "Please set the env NIMBUS_HOME"
- exit 1
-fi
cd $LANTORRENT_HOME
# most users will not have xinetd in their path even if it is installed
export PATH=/usr/sbin/:$PATH
pidfile=`mktemp`
-$LANTORRENT_HOME/bin/make_lt_server.sh 4 $pidfile
+$LANTORRENT_HOME/tests/make_lt_server.sh 4 $pidfile
xinet_pid=`cat $pidfile`
echo "xinet on $xinet_pid"
-ltdaemon &
+$LANTORRENT_HOME/bin/lt-daemon.sh &
ltd_pid=$!
trap "kill $xinet_pid $ltd_pid; sleep 10; kill -9 $xinet_pid $ltd_pid" EXIT
source $LANTORRENT_HOME/tests/ports_env.sh
-nosetests tests/*_test.py
+nosetests tests/xfer_test.py tests/simple_test.py
+

0 comments on commit dd7fb90

Please sign in to comment.