Fix: kernel test scripts
authorDavid Goulet <dgoulet@efficios.com>
Fri, 6 Apr 2012 19:27:03 +0000 (15:27 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 6 Apr 2012 19:27:03 +0000 (15:27 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/kernel/run-kernel-tests.sh
tests/utils.sh

index 2881c426e38dae64500bf92b9f542154317e691f..f77c43758091d7cf683f08f0250febc8d0def7f0 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
index 8a0640bd0e2f391f61654a530180005c83dc7c01..2d8b46a834b72f6e393cdb89406602f098ff5ad2 100644 (file)
@@ -24,8 +24,6 @@ KERNEL_MAJOR_VERSION=2
 KERNEL_MINOR_VERSION=6
 KERNEL_PATCHLEVEL_VERSION=27
 
-alias realpath='readlink -f'
-
 function validate_kernel_version ()
 {
        kern_version=($(uname -r | awk -F. '{ printf("%d.%d.%d\n",$1,$2,$3); }' | tr '.' '\n'))
@@ -51,7 +49,7 @@ function spawn_sessiond ()
                return 2
        fi
 
-       DIR=$(realpath $TESTDIR)
+       DIR=$(readlink -f $TESTDIR)
 
        if [ -z $(pidof lt-$SESSIOND_BIN) ]; then
                $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --daemonize --quiet --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
This page took 0.028167 seconds and 4 git commands to generate.