Fix: replace 'modprobe -l' by lsmod in kernel test
[lttng-tools.git] / tests / kernel / run-kernel-tests.sh
index 2881c426e38dae64500bf92b9f542154317e691f..69f6f95c30ad14eeb263a78c901dacd37652a45d 100755 (executable)
@@ -1,18 +1,24 @@
 #!/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
+               if [ ! -e $bin ]; then
+                       echo -e "$bin not found, passing"
+                       continue
+               fi
+
                start_sessiond
 
         ./$bin $tmpdir
@@ -31,7 +37,7 @@ function start_tests ()
 
 function check_lttng_modules ()
 {
-       local out=`modprobe -l | grep lttng`
+       local out=`lsmod | grep lttng`
        if [ -z "$out" ]; then
                echo "LTTng modules not detected. Aborting kernel tests!"
                echo ""
This page took 0.025296 seconds and 5 git commands to generate.