From ffbef42e76e89db2a8e0d9aa9ba7b27dc6bc954e Mon Sep 17 00:00:00 2001 From: Kevin Vigor Date: Mon, 19 Dec 2016 13:30:24 -0800 Subject: Add TESTER_CFLAGS config option; use to fix proves tests in FB environment Summary: When building tests using build_tester in FB environment, we need to pass additional library flags. Plumb up to the --with-fbextras option. Test Plan: prove -f --timer ./tests/basic/gfapi/anonymous_fd.t Reviewers: Subscribers: Tasks: Blame Revision: Change-Id: Ibd04851234f9367d6a3192ba2d4440ce3fa4a45b Signed-off-by: Kevin Vigor Reviewed-on: http://review.gluster.org/16204 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Shreyas Siravara --- configure.ac | 4 ++++ tests/env.rc.in | 3 +++ tests/include.rc | 1 + 3 files changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 5a04035fe6f..a8104056fbb 100644 --- a/configure.ac +++ b/configure.ac @@ -922,11 +922,14 @@ AC_SUBST(GF_DISTRIBUTION) GF_HOST_OS="" GF_LDFLAGS="-rdynamic" +TESTER_CFLAGS="" + dnl include tirpc for FB builds if test "x$BUILD_FBEXTRAS" = "xyes"; then TIRPC_CFLAGS="-I/usr/include/tirpc" GF_LDFLAGS="-lfbtirpc $GF_LDFLAGS" GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS -DIPV6_DEFAULT" + TESTER_CFLAGS="$TESTER_CFLAGS -lfbtirpc" fi dnl check for gcc -Werror=format-security @@ -1328,6 +1331,7 @@ AM_CONDITIONAL([GF_INSTALL_GLUSTERD_WORKDIR], test ! -d ${GLUSTERD_WORKDIR} && t AC_SUBST(GLUSTERD_VOLFILE) AC_SUBST(GLUSTERFS_LIBEXECDIR) AC_SUBST(GLUSTERFSD_MISCDIR) +AC_SUBST(TESTER_CFLAGS) dnl pkg-config versioning dnl diff --git a/tests/env.rc.in b/tests/env.rc.in index 82971c4a8de..87befc3711d 100644 --- a/tests/env.rc.in +++ b/tests/env.rc.in @@ -28,3 +28,6 @@ export PYTHON PYTHONPATH=@BUILD_PYTHON_SITE_PACKAGES@:$PYTHON_PATH export PYTHONPATH + +TESTER_CFLAGS="@TESTER_CFLAGS@" +export TESTER_CFLAGS diff --git a/tests/include.rc b/tests/include.rc index 0c5d2989106..e13bbacc392 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -610,6 +610,7 @@ function build_tester () then cflags="$cflags $(pkg-config glusterfs-api --cflags-only-I --libs-only-L)" fi + cflags="$cflags ${TESTER_CFLAGS}" $CC -g -o $(dirname $cfile)/$execname $cfile $cflags } -- cgit