Fix tests when lttng-ust is disabled
authorDavid Goulet <dgoulet@efficios.com>
Mon, 2 Apr 2012 16:10:05 +0000 (12:10 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 2 Apr 2012 16:10:24 +0000 (12:10 -0400)
(close #200)

Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/tools/Makefile.am
tests/tools/runall.sh
tests/ust/Makefile.am
tests/ust/high-throughput/run
tests/ust/low-throughput/run
tests/ust/nevents/run
tests/ust/nprocesses/run

index d13868025336c34678e8d11a66384a00671b42b4..88e86f71ad91b715480c3b4f4c0f08dcbd57287a 100644 (file)
@@ -3,12 +3,11 @@ AM_LDFLAGS = -lurcu -lurcu-cds
 
 EXTRA_DIST = runall.sh
 
-noinst_PROGRAMS = test_sessions test_kernel_data_trace test_ust_data_trace
+noinst_PROGRAMS = test_sessions test_kernel_data_trace
 
 UTILS=utils.h
 SESSIONS=$(top_srcdir)/src/bin/lttng-sessiond/session.c
 KERN_DATA_TRACE=$(top_srcdir)/src/bin/lttng-sessiond/trace-kernel.c
-UST_DATA_TRACE=$(top_srcdir)/src/bin/lttng-sessiond/trace-ust.c
 COMMON=$(top_builddir)/src/common/libcommon.la
 HASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
 
@@ -19,6 +18,10 @@ test_sessions_LDADD = $(COMMON) $(HASHTABLE)
 # Kernel trace data unit tests
 test_kernel_data_trace_SOURCES = test_kernel_data_trace.c $(UTILS) $(KERN_DATA_TRACE)
 
+if HAVE_LIBLTTNG_UST_CTL
+noinst_PROGRAMS += test_ust_data_trace
+UST_DATA_TRACE=$(top_srcdir)/src/bin/lttng-sessiond/trace-ust.c
 # UST trace data unit tests
 test_ust_data_trace_SOURCES = test_ust_data_trace.c $(UTILS) $(UST_DATA_TRACE)
 test_ust_data_trace_LDADD = $(COMMON) $(HASHTABLE)
+endif
index 5fdbda62b4347726bfa3f6f980e8ec7ce6602b94..96c217cf591c7f4f817e8dcb1779dfda5d4147c4 100755 (executable)
@@ -9,6 +9,11 @@ function start_tests ()
 {
     for bin in ${tests[@]};
     do
+               if [ ! -e $bin ]; then
+                       echo -e "$bin not found, passing"
+                       continue
+               fi
+
         ./$bin
         # Test must return 0 to pass.
         if [ $? -ne 0 ]; then
index 300ebf15e10fb0623d00e483ea1691dab8bd3766..79f67cc06b73b54285fc95654dd02232c63d8805 100644 (file)
@@ -1,3 +1,4 @@
+if HAVE_LIBLTTNG_UST_CTL
 SUBDIRS = nevents nprocesses high-throughput
 
 AM_CFLAGS = -g -Wall -I../
@@ -14,3 +15,4 @@ LIBLTTNG=$(top_srcdir)/src/lib/lttng-ctl/lttng-ctl.c \
 ust_global_all_events_basic_SOURCES = ust_global_all_events_basic.c $(UTILS) $(LIBLTTNG)
 
 ust_global_event_basic_SOURCES = ust_global_event_basic.c $(UTILS) $(LIBLTTNG)
+endif
index bc30c8399935a4820416c308eb76ab920c5453c0..a97d2756664550795e38a25c6f87210a0725d5ae 100755 (executable)
@@ -28,7 +28,7 @@ echo -e "\n-------------------------------------------"
 echo -e "UST tracer - Testing high events throughput"
 echo -e "-------------------------------------------"
 
-if [ ! -e "$CURDIR/$BIN_NAME" ]; then
+if [ ! -x "$CURDIR/$BIN_NAME" ]; then
        echo -e "No UST nevents binary detected. Passing."
        exit 0
 fi
index 8beaf60a5413a4a3f3ae133bdba9f06065e772bf..3f2d1b72cfb8fe2b7f3ef1b1dfd53233e575e42b 100755 (executable)
@@ -27,7 +27,7 @@ echo -e "\n-------------------------------------------"
 echo -e "UST tracer - Testing low events throughput"
 echo -e "-------------------------------------------"
 
-if [ ! -e "$CURDIR/$BIN_NAME" ]; then
+if [ ! -x "$CURDIR/$BIN_NAME" ]; then
        echo -e "No UST nevents binary detected. Passing."
        exit 0
 fi
index 946e8b204015f8df79e11b5cbcdc91d3f98680f8..5f37450741b1ef4b7dbb359be4acd979a3d21023 100755 (executable)
@@ -25,7 +25,7 @@ echo -e "\n-----------------------------------"
 echo -e "UST tracer - Generate $NR_ITER events"
 echo -e "-------------------------------------"
 
-if [ ! -e "$CURDIR/gen-nevents" ]; then
+if [ ! -x "$CURDIR/gen-nevents" ]; then
        echo -e "No UST nevents binary detected. Passing."
        exit 0
 fi
index d2f6d555f0c196d2b87a57d10661c7f14f18ccd7..7513fe138c0b6a2bc8724a9e9670ea8ee413ef28 100755 (executable)
@@ -18,6 +18,7 @@
 CURDIR=$(dirname $0)/
 TESTDIR=$CURDIR/../..
 NR_ITER=100
+TEST_BIN_NAME="gen-events-time"
 
 source $TESTDIR/utils.sh
 
@@ -25,7 +26,7 @@ echo -e "\n-------------------------------------"
 echo -e "UST tracer - Generate $NR_ITER process"
 echo -e "---------------------------------------"
 
-if [ ! -e "$CURDIR/$TEST_BIN_NAME" ]; then
+if [ ! -x "$CURDIR/$TEST_BIN_NAME" ]; then
        echo -e "No UST $TEST_BIN_NAME binary detected. Passing."
        exit 0
 fi
This page took 0.028136 seconds and 4 git commands to generate.