1 # SPDX-License-Identifier: GPL-2.0-only
3 AM_CPPFLAGS += -I. -I$(top_srcdir)/include
5 COPYSCRIPTS = test_thread_stall test_tp_fail \
6 test_health.sh test_thread_ok
7 dist_noinst_SCRIPTS = $(COPYSCRIPTS)
10 # Do not build this test if shared libraries support was
11 # explicitly disabled.
13 EXTRA_DIST = health_stall.c health_fail.c \
14 health_check.c $(COPYSCRIPTS)
17 # In order to test the health check feature, the libhealth* libs
18 # must be built as .so to be able to LD_PRELOAD them.
19 FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
20 -rpath $(abs_builddir)
22 # Health thread stall ld_preloaded test lib
23 libhealthstall_la_SOURCES=health_stall.c
24 libhealthstall_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS)
25 libhealthstall_la_LIBADD = $(DL_LIBS)
27 # Health thread fail ld_preloaded test lib
28 libhealthtpfail_la_SOURCES=health_fail.c
29 libhealthtpfail_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS)
30 libhealthtpfail_la_LIBADD = $(DL_LIBS)
32 noinst_PROGRAMS = health_check
33 noinst_LTLIBRARIES = libhealthstall.la libhealthtpfail.la
35 health_check_SOURCES = health_check.c $(UTILS)
36 health_check_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
37 $(top_builddir)/src/common/libcommon.la \
40 EXTRA_DIST = $(COPYSCRIPTS)
45 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
46 for script in $(COPYSCRIPTS); do \
47 cp -f $(srcdir)/$$script $(builddir); \
52 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
53 for script in $(COPYSCRIPTS); do \
54 rm -f $(builddir)/$$script; \