-SUBDIRS = . ust-nevents ust-nprocesses
+SUBDIRS = .
AM_CFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/libkernelctl \
-I$(top_srcdir)/liblttngctl -g -Wall -lurcu -lurcu-cds
-EXTRA_DIST = runall.sh lttng/runall.sh lttng/run-kernel-tests.sh lttng/run-ust-tests.sh
+EXTRA_DIST = runall.sh lttng/runall.sh lttng/run-kernel-tests.sh
-noinst_PROGRAMS = test_sessions test_kernel_data_trace test_ust_data_trace \
- kernel_all_events_basic kernel_event_basic \
- ust_global_event_basic ust_global_all_events_basic
+noinst_PROGRAMS = test_sessions test_kernel_data_trace \
+ kernel_all_events_basic kernel_event_basic
UTILS=utils.h
SESSIONS=$(top_srcdir)/lttng-sessiond/session.c
KERN_DATA_TRACE=$(top_srcdir)/lttng-sessiond/trace-kernel.c
-UST_DATA_TRACE=$(top_srcdir)/lttng-sessiond/trace-ust.c
LIBLTTNG=$(top_srcdir)/liblttngctl/lttngctl.c \
$(top_srcdir)/liblttng-sessiond-comm/lttng-sessiond-comm.c
test_kernel_data_trace_SOURCES = test_kernel_data_trace.c $(UTILS) $(KERN_DATA_TRACE)
-test_ust_data_trace_SOURCES = test_ust_data_trace.c $(UTILS) $(UST_DATA_TRACE)
-test_ust_data_trace_LDADD = $(top_builddir)/common/libcommon.la \
- $(top_builddir)/liblttng-ht/liblttng-ht.la
kernel_all_events_basic_SOURCES = lttng/kernel_all_events_basic.c $(UTILS) $(LIBLTTNG)
kernel_event_basic_SOURCES = lttng/kernel_event_basic.c $(UTILS) $(LIBLTTNG)
+if HAVE_LIBLTTNG_UST_CTL
+SUBDIRS += ust-nevents ust-nprocesses
+EXTRA_DIST += lttng/run-ust-tests.sh
+noinst_PROGRAMS += ust_global_event_basic ust_global_all_events_basic test_ust_data_trace
+
+UST_DATA_TRACE=$(top_srcdir)/lttng-sessiond/trace-ust.c
+
+test_ust_data_trace_SOURCES = test_ust_data_trace.c $(UTILS) $(UST_DATA_TRACE)
+test_ust_data_trace_LDADD = $(top_builddir)/common/libcommon.la \
+ $(top_builddir)/liblttng-ht/liblttng-ht.la
+
ust_global_all_events_basic_SOURCES = lttng/ust_global_all_events_basic.c $(UTILS) $(LIBLTTNG)
ust_global_event_basic_SOURCES = lttng/ust_global_event_basic.c $(UTILS) $(LIBLTTNG)
+endif # HAVE_LIBLTTNG_UST_CTL
check-am:
./runall.sh
{
for bin in ${tests[@]};
do
+ if [ ! -e $bin ]; then
+ echo -e "$bin not found, passing"
+ continue
+ fi
+
./$bin $tmpdir
# Test must return 0 to pass.
if [ $? -ne 0 ]; then
for bin in ${test_suite[@]};
do
+ if [ ! -e $bin ]; then
+ echo -e "$bin not found, passing"
+ continue
+ fi
+
./$bin
# Test must return 0 to pass.
if [ $? -ne 0 ]; then
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-TESTDIR=$(dirname $0)/..
+CURDIR=$(dirname $0)/
+TESTDIR=$CURDIR/..
NR_ITER=100
SESSION_NAME="ust-nevents"
EVENT_NAME="ust_gen_nevents:tptest"
-TRACE_PATH=$(mktemp -d)
source $TESTDIR/utils.sh
echo -e "UST tracer - Generate $NR_ITER events"
echo -e "-------------------------------------"
+if [ ! -e "$CURDIR/gen-nevents" ]; then
+ echo -e "No UST nevents binary detected. Passing."
+ exit 0
+fi
+
+TRACE_PATH=$(mktemp -d)
+
# MUST set TESTDIR before calling those functions
create_lttng_session $SESSION_NAME $TRACE_PATH
start_tracing $SESSION_NAME
# Start test
-./$(dirname $0)/gen-nevents $NR_ITER
+./$CURDIR/gen-nevents $NR_ITER
stop_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-TESTDIR=$(dirname $0)/..
+CURDIR=$(dirname $0)/
+TESTDIR=$CURDIR/..
NR_ITER=100
TEST_BIN_NAME="gen-events-time"
SESSION_NAME="ust-nprocesses"
EVENT_NAME="ust_gen_event:tptest"
-TRACE_PATH=$(mktemp -d)
TEST_WAIT_SEC=3
source $TESTDIR/utils.sh
echo -e "UST tracer - Generate $NR_ITER process"
echo -e "---------------------------------------"
+if [ ! -e "$CURDIR/$TEST_BIN_NAME" ]; then
+ echo -e "No UST $TEST_BIN_NAME binary detected. Passing."
+ exit 0
+fi
+
# MUST set TESTDIR before calling those functions
# Start test for 1000 seconds
for i in `seq 1 $NR_ITER`
do
- ./$(dirname $0)/$TEST_BIN_NAME 1000 >/dev/null 2>&1 &
+ ./$CURDIR/$TEST_BIN_NAME 1000 >/dev/null 2>&1 &
done
echo -n "Validating registered apps: "
echo -e "\e[1;32mOK\e[0m"
fi
+TRACE_PATH=$(mktemp -d)
+
create_lttng_session $SESSION_NAME $TRACE_PATH
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME