From 2e6a03f64e7643a9bcca11ed2301e4ac2ac6ef7b Mon Sep 17 00:00:00 2001 From: David Goulet Date: Fri, 6 Apr 2012 15:27:03 -0400 Subject: [PATCH] Fix: kernel test scripts Signed-off-by: David Goulet --- tests/kernel/run-kernel-tests.sh | 10 ++++++++-- tests/utils.sh | 4 +--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/kernel/run-kernel-tests.sh b/tests/kernel/run-kernel-tests.sh index 2881c426e..f77c43758 100755 --- a/tests/kernel/run-kernel-tests.sh +++ b/tests/kernel/run-kernel-tests.sh @@ -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 diff --git a/tests/utils.sh b/tests/utils.sh index 8a0640bd0..2d8b46a83 100644 --- a/tests/utils.sh +++ b/tests/utils.sh @@ -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" -- 2.34.1