X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=benchmark%2Frunall.sh;h=eaf4980b8540e41e76f2360f69297610685a4221;hb=3c6bae613ee55f949693dc8ca43141d3024d7d96;hp=51e9f4d53997d13fa04869486becc6060c41ea79;hpb=b25a886891f7172c0abb189ac71bf2bf9b40ec76;p=lttng-tools.git diff --git a/benchmark/runall.sh b/benchmark/runall.sh index 51e9f4d53..eaf4980b8 100755 --- a/benchmark/runall.sh +++ b/benchmark/runall.sh @@ -17,38 +17,33 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -SESSIOND_BIN="ltt-sessiond" +#### ADD TESTS HERE #### + +test_suite=( "run-boot-time.sh" "run-sessions.sh" ) + +#### END TESTS HERE #### + RESULTS_PATH="/tmp/lttng-bench-results.txt" BASEDIR=`dirname $0` if [ -e $RESULTS_PATH ]; then - mv $RESULTS_PATH $RESULTS_PATH.`date +%s` -fi - -echo -n "Starting session daemon... " -$BASEDIR/../ltt-sessiond/$SESSIOND_BIN --daemonize --quiet -if [ $? -ne 0 ]; then - echo -e '\e[1;31mFAILED\e[0m' - exit 1 -else - echo -e "\e[1;32mOK\e[0m" + mv -v $RESULTS_PATH $RESULTS_PATH.`date +%s` fi -PID_SESSIOND=`pidof lt-$SESSIOND_BIN` - -# Wait for the benchmark to run -echo -n "Waiting." -sleep 1 -echo -n "." -sleep 1 -echo -n "." -sleep 1 - -kill $PID_SESSIOND - -echo -e "\nResults will be available shortly in $RESULTS_PATH" echo "" -tail -F $RESULTS_PATH --pid $PID_SESSIOND 2>/dev/null +for bin in ${test_suite[@]}; +do + $BASEDIR/$bin + # Test must return 0 to pass. + if [ $? -ne 0 ]; then + echo -e '\e[1;31mFAIL\e[0m' + echo "" + exit 1 + fi + echo "" +done + +mv -v $RESULTS_PATH results-`date +%d%m%Y.%H%M%S`.txt exit 0