Cleanup list command printout for loglevel
[lttng-tools.git] / tests / runall.sh
index e7f83ed11e2a89e09bd7b2737a4b9d13d80776dd..5e1c0f537a8113a337237513e3977710b7a66760 100755 (executable)
 
 #### ADD TESTS HERE ####
 
-for bin in test_sessions;
+# A spawned session daemon is needed for those tests
+test_with_sessiond=( lttng/runall.sh ust-nevents/run ust-nprocesses/run )
+
+# No session daemon needed
+test_no_sessiond=( test_sessions test_kernel_data_trace test_ust_data_trace )
+
+#### END TESTS HERE ####
+
+TESTDIR=$(dirname $0)
+
+source $TESTDIR/utils.sh
+
+## NO Session daemon ##
+for bin in ${test_no_sessiond[@]};
 do
+       if [ ! -e $bin ]; then
+               echo -e "$bin not found, passing"
+               continue
+       fi
+
        ./$bin
+       # Test must return 0 to pass.
+       if [ $? -ne 0 ]; then
+               echo -e '\e[1;31mFAIL\e[0m'
+               echo ""
+               exit 1
+       fi
 done
 
-#### END TESTS HERE ####
+# With session daemon
+start_sessiond
+out=$?
+if [ $out -eq 2 ]; then
+       # Kernel version is not compatible.
+       exit 0
+elif [ $out -ne 0 ]; then
+       echo "NOT bad $?"
+       exit 1
+fi
+
+for bin in ${test_with_sessiond[@]};
+do
+       if [ ! -e $bin ]; then
+               echo -e "$bin not found, passing"
+               continue
+       fi
+
+       ./$bin
+       # Test must return 0 to pass.
+       if [ $? -ne 0 ]; then
+               echo -e '\e[1;31mFAIL\e[0m'
+               echo ""
+               stop_sessiond
+               exit 1
+       fi
+done
 
 echo ""
+stop_sessiond
 exit 0
This page took 0.024664 seconds and 4 git commands to generate.