Deprecate enable/disable-consumer
[lttng-tools.git] / tests / kernel / run-kernel-tests.sh
index 2881c426e38dae64500bf92b9f542154317e691f..6948e1fa29cca19920ae922fdde52c4ebe28a987 100755 (executable)
@@ -1,28 +1,34 @@
 #!/bin/bash
 
 SESSIOND_BIN="lttng-sessiond"
-TESTDIR=$(dirname $0)/..
+CURDIR=$(dirname $0)
+TESTDIR=$CURDIR/..
 
 source $TESTDIR/utils.sh
 
 tmpdir=`mktemp -d`
-tests=( kernel_event_basic kernel_all_events_basic )
+tests=( $CURDIR/kernel_event_basic $CURDIR/kernel_all_events_basic )
 exit_code=0
 
 function start_tests ()
 {
     for bin in ${tests[@]};
     do
-               start_sessiond
+               if [ ! -e $bin ]; then
+                       echo -e "$bin not found, passing"
+                       continue
+               fi
+
+               start_lttng_sessiond
 
         ./$bin $tmpdir
         # Test must return 0 to pass.
         if [ $? -ne 0 ]; then
             exit_code=1
-                       stop_sessiond
+                       stop_lttng_sessiond
             break
         fi
-               stop_sessiond
+               stop_lttng_sessiond
     done
 
        # Cleaning up
@@ -31,7 +37,7 @@ function start_tests ()
 
 function check_lttng_modules ()
 {
-       local out=`modprobe -l | grep lttng`
+       local out=`ls /lib/modules/$(uname -r)/extra | grep lttng`
        if [ -z "$out" ]; then
                echo "LTTng modules not detected. Aborting kernel tests!"
                echo ""
@@ -40,9 +46,10 @@ function check_lttng_modules ()
        fi
 }
 
-echo -e "\n---------------------"
-echo -e "Testing Kernel tracer"
-echo -e "---------------------"
+
+TEST_DESC="Testing Kernel tracer"
+
+print_test_banner "$TEST_DESC"
 
 # Detect lttng-modules installed
 check_lttng_modules
This page took 0.0247 seconds and 4 git commands to generate.