Skip to content

Commit a22a3e1

Browse files
authored
TEST/APPS: Skip build when generating packages (#10818)
1 parent 08e9520 commit a22a3e1

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ AS_IF([test "x$with_docs_only" = xyes],
221221
AM_CONDITIONAL([ENABLE_EXPERIMENTAL_API], [false])
222222
AM_CONDITIONAL([INSTALL_DEVEL_HEADERS], [false])
223223
AM_CONDITIONAL([HAVE_EXAMPLES], [false])
224+
AM_CONDITIONAL([HAVE_TEST_APPS], [false])
224225
AM_CONDITIONAL([HAVE_AARCH64_THUNDERX2], [false])
225226
AM_CONDITIONAL([HAVE_AARCH64_THUNDERX1], [false])
226227
AM_CONDITIONAL([HAVE_AARCH64_HI1620], [false])
@@ -335,6 +336,16 @@ AS_IF([test "x$with_docs_only" = xyes],
335336
[],
336337
[enable_examples=no])
337338
AM_CONDITIONAL([HAVE_EXAMPLES], [test "x$enable_examples" = "xyes"])
339+
340+
#
341+
# Enable test apps build
342+
#
343+
AC_ARG_ENABLE([test-apps],
344+
AS_HELP_STRING([--enable-test-apps],
345+
[Enable test apps build, default: NO]),
346+
[],
347+
[enable_test_apps=no])
348+
AM_CONDITIONAL([HAVE_TEST_APPS], [test "x$enable_test_apps" = "xyes"])
338349
]) # Docs only
339350

340351
#

contrib/configure-devel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ basedir=$(cd $(dirname $0) && pwd)
1414
$basedir/../configure \
1515
--enable-gtest \
1616
--enable-examples \
17+
--enable-test-apps \
1718
--with-valgrind \
1819
--enable-profiling \
1920
--enable-frame-pointer \

test/apps/Makefile.am

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SUBDIRS = profiling
1010

1111
SUBDIRS += iodemo
1212

13+
if HAVE_TEST_APPS
1314
noinst_PROGRAMS = \
1415
test_ucp_dlopen \
1516
test_ucp_config \
@@ -20,23 +21,23 @@ noinst_PROGRAMS = \
2021
test_memtrack_limit \
2122
test_hooks
2223

23-
objdir = $(shell sed -n -e 's/^objdir=\(.*\)$$/\1/p' $(LIBTOOL))
24+
objdir_apps = $(shell sed -n -e 's/^objdir=\(.*\)$$/\1/p' $(LIBTOOL))
2425

2526
test_hooks_SOURCES = test_hooks.c
2627
test_hooks_CPPFLAGS = $(BASE_CPPFLAGS) \
27-
-DLIB_PATH=$(abs_top_builddir)/src/ucs/$(objdir)/libucs.so
28+
-DLIB_PATH=$(abs_top_builddir)/src/ucs/$(objdir_apps)/libucs.so
2829
test_hooks_CFLAGS = $(BASE_CFLAGS)
2930
test_hooks_LDADD = -ldl
3031

3132
test_ucs_dlopen_SOURCES = test_ucs_dlopen.c
3233
test_ucs_dlopen_CPPFLAGS = $(BASE_CPPFLAGS) \
33-
-DLIB_PATH=$(abs_top_builddir)/src/ucs/$(objdir)/libucs.so
34+
-DLIB_PATH=$(abs_top_builddir)/src/ucs/$(objdir_apps)/libucs.so
3435
test_ucs_dlopen_CFLAGS = $(BASE_CFLAGS)
3536
test_ucs_dlopen_LDADD = -ldl
3637

3738
test_ucp_dlopen_SOURCES = test_ucp_dlopen.c
3839
test_ucp_dlopen_CPPFLAGS = $(BASE_CPPFLAGS) \
39-
-DLIB_PATH=$(abs_top_builddir)/src/ucp/$(objdir)/libucp.so
40+
-DLIB_PATH=$(abs_top_builddir)/src/ucp/$(objdir_apps)/libucp.so
4041
test_ucp_dlopen_CFLAGS = $(BASE_CFLAGS)
4142
test_ucp_dlopen_LDADD = -ldl
4243

@@ -57,8 +58,8 @@ test_link_map_LDADD = -ldl $(top_builddir)/src/ucp/libucp.la
5758

5859
test_dlopen_cfg_print_SOURCES = test_dlopen_cfg_print.c
5960
test_dlopen_cfg_print_CPPFLAGS = $(BASE_CPPFLAGS) -g \
60-
-DUCS_LIB_PATH=$(abs_top_builddir)/src/ucs/$(objdir)/libucs.so \
61-
-DUCT_LIB_PATH=$(abs_top_builddir)/src/uct/$(objdir)/libuct.so
61+
-DUCS_LIB_PATH=$(abs_top_builddir)/src/ucs/$(objdir_apps)/libucs.so \
62+
-DUCT_LIB_PATH=$(abs_top_builddir)/src/uct/$(objdir_apps)/libuct.so
6263
test_dlopen_cfg_print_CFLAGS = $(BASE_CFLAGS)
6364
test_dlopen_cfg_print_LDADD = -ldl
6465

@@ -124,3 +125,5 @@ test_tcmalloc_CFLAGS = $(BASE_CFLAGS)
124125
test_tcmalloc_LDADD = -ldl $(TCMALLOC_LIB) \
125126
$(top_builddir)/src/ucp/libucp.la
126127
endif
128+
129+
endif

0 commit comments

Comments
 (0)