Fix UST tests if lttng-ust is not available
[lttng-tools.git] / tests / runall.sh
index e7f83ed11e2a89e09bd7b2737a4b9d13d80776dd..08b3904838d1408e54a7c2474cc952be27349e9d 100755 (executable)
 
 #### ADD TESTS HERE ####
 
-for bin in test_sessions;
+test_suite=( test_sessions test_kernel_data_trace test_ust_data_trace
+                       lttng/runall.sh ust-nevents/run ust-nprocesses/run )
+
+#### END TESTS HERE ####
+
+TESTDIR=$(dirname $0)
+
+source $TESTDIR/utils.sh
+
+start_sessiond
+if [ $? -ne 0 ]; then
+       exit 1
+fi
+
+for bin in ${test_suite[@]};
 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
 
-#### END TESTS HERE ####
-
 echo ""
+stop_sessiond
 exit 0
This page took 0.023543 seconds and 4 git commands to generate.