X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Frunall.sh;h=5e1c0f537a8113a337237513e3977710b7a66760;hb=39f49fee93ce7099434946a186f90adb569c4ccd;hp=eadeeb912e6bc07df0fa18d990ed5c6a812ce094;hpb=b6ca8ef5adf433f7f0bbd4bb4858146ef25cd4fd;p=lttng-tools.git diff --git a/tests/runall.sh b/tests/runall.sh index eadeeb912..5e1c0f537 100755 --- a/tests/runall.sh +++ b/tests/runall.sh @@ -19,8 +19,11 @@ #### ADD TESTS HERE #### -test_suite=( test_sessions test_kernel_data_trace test_ust_data_trace - lttng/runall.sh ust-nevents/run ust-nprocesses/run ) +# 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 #### @@ -28,13 +31,41 @@ 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 + +# With session daemon start_sessiond -if [ $? -ne 0 ]; then +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_suite[@]}; +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