Keep output being visible
[anna.git] / example / diameter / launcher / deployments / adml / start.sh
index d2b371e..ab428af 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# $1: args type could be 'ft' (function test) or 'st' (system test). By default: ft
+# $1: args type could be 'ft' (function test) or 'st' (system test), or 'help' to get the command line help. By default: ft
 function pgrep_live {
   pids=$(pgrep "$1");
   [ "$pids" ] || return;
@@ -11,11 +11,14 @@ ARGS=args.$1
 STARTED=`pgrep_live ADML`
 [ -n "$STARTED"  ] && { echo "Already started !"; echo "PID $STARTED" ; exit 1 ; }
 0> launcher.trace
+0> ADML.output
 for file in `ls *.launcher.log 2>/dev/null`; do 0> $file; done
 mkdir -p counters test-reports
 rm -f counters/* test-reports/* *.csv
 export LD_LIBRARY_PATH=$PWD/dynlibs
-eval ./ADML `grep -v ^# $ARGS` &
-echo $! > .pid
+args=$(eval echo $(grep -v ^# $ARGS))
+#ulimit -c unlimited
+./ADML ${args} | tee -a ADML.output &
+pgrep_live ADML > .pid
 echo "Done !"