@@ -108,6 +108,7 @@ before_install:
sudo make install
popd
fi
+ - export PKG_CONFIG_PATH="$HOME/cunit-install/$CROSS_ARCH/lib/pkgconfig:${PKG_CONFIG_PATH}"
- find $HOME/cunit-install
install:
@@ -154,7 +155,7 @@ script:
--enable-user-guides
--with-dpdk-path=`pwd`/dpdk/${TARGET}
--with-netmap-path=`pwd`/netmap
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH $CONF
+ $CONF
--enable-debug=full
--enable-helper-linux
- make -j $(nproc)
@@ -165,10 +166,10 @@ script:
- echo "Checking linking and run from install..."
- pushd $HOME
- echo "Dynamic link.."
- - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig pkg-config --cflags --libs libodp-linux`
+ - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux`
- LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst
- echo "Static link.."
- - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig pkg-config --cflags --libs libodp-linux --static` -static
+ - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux --static` -static
- ./odp_hello_inst
- ccache -s
@@ -184,7 +185,6 @@ jobs:
--enable-debug=full
--disable-test-cpp
--enable-helper-linux
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH
- make -j $(nproc)
- stage: test
compiler: "\"clang-3.8 --target=aarch64-linux-gnu\""
@@ -196,7 +196,6 @@ jobs:
--enable-debug=full
--disable-test-cpp
--enable-helper-linux
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH
- make -j $(nproc)
- stage: test
compiler: arm-linux-gnueabihf-gcc
@@ -208,7 +207,6 @@ jobs:
--enable-debug=full
--disable-test-cpp
--enable-helper-linux
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH
- make -j $(nproc)
- stage: test
compiler: "\"clang-3.8 --target=arm-linux-gnueabihf\""
@@ -220,7 +218,6 @@ jobs:
--enable-debug=full
--disable-test-cpp
--enable-helper-linux
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH
- make -j $(nproc)
- stage: test
compiler: powerpc-linux-gnu-gcc
@@ -232,7 +229,6 @@ jobs:
--enable-debug=full
--disable-test-cpp
--enable-helper-linux
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH
- make -j $(nproc)
- stage: test
compiler: "\"clang-3.8 --target=powerpc-linux-gnu\""
@@ -244,7 +240,6 @@ jobs:
--enable-debug=full
--disable-test-cpp
--enable-helper-linux
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH
- make -j $(nproc)
- stage: test
env: TEST=coverage
@@ -256,7 +251,6 @@ jobs:
--with-dpdk-path=`pwd`/dpdk/${TARGET}
--with-netmap-path=`pwd`/netmap CFLAGS="-O0
-coverage"
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH
CXXFLAGS="-O0 -coverage" LDFLAGS="--coverage"
--enable-debug=full
--enable-helper-linux
@@ -269,8 +263,7 @@ jobs:
- ./bootstrap
- ./configure --prefix=$HOME/odp-install
--enable-user-guides
- --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH
- - sudo PATH="$PATH" LD_LIBRARY_PATH="$HOME/cunit-install/$CROSS_ARCH/lib:$LD_LIBRARY_PATH" make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-cunit-path=$HOME/cunit-install/$CROSS_ARCH"
+ - sudo PATH="$PATH" LD_LIBRARY_PATH="$HOME/cunit-install/$CROSS_ARCH/lib:$LD_LIBRARY_PATH" make distcheck
- stage: test
env: TEST=doxygen
compiler: gcc
@@ -16,7 +16,7 @@ INCFLAGS = \
-I$(top_builddir)/include
AM_CFLAGS += $(INCFLAGS)
-AM_CPPFLAGS += $(CUNIT_CPPFLAGS)
+AM_CFLAGS += $(CUNIT_CFLAGS)
AM_CXXFLAGS = $(INCFLAGS)
AM_LDFLAGS += -L$(LIB)
@@ -8,43 +8,11 @@ AC_ARG_ENABLE([test_vald],
AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ])
##########################################################################
-# Set optional CUnit path
-##########################################################################
-cunit_support=$test_vald
-AC_ARG_WITH([cunit-path],
-AC_HELP_STRING([--with-cunit-path=DIR],
- [path to CUnit libs and headers (if not present at default path)]),
- [CUNIT_PATH=$withval
- CUNIT_CPPFLAGS="-I$CUNIT_PATH/include"
- CUNIT_LIBS="-L$CUNIT_PATH/lib"
- cunit_support=yes],[])
-
-##########################################################################
-# Save and set temporary compilation flags
-##########################################################################
-OLD_LIBS=$LIBS
-OLD_CPPFLAGS=$CPPFLAGS
-LIBS="$CUNIT_LIBS $LIBS"
-CPPFLAGS="$CUNIT_CPPFLAGS $CPPFLAGS"
-
-##########################################################################
# Check for CUnit availability
##########################################################################
-if test x$cunit_support = xyes
-then
- AC_CHECK_LIB([cunit],[CU_get_error], [CUNIT_LIBS="$CUNIT_LIBS -lcunit"],
- [AC_MSG_ERROR([CUnit libraries required])])
- AC_CHECK_HEADERS([CUnit/Basic.h], [],
- [AC_MSG_FAILURE(["can't find cunit headers"])])
-else
- cunit_support=no
-fi
+cunit_support=$test_vald
+AS_IF([test "x$cunit_support" = "xyes"],
+ [PKG_CHECK_MODULES([CUNIT], [cunit])])
-AC_SUBST([CUNIT_CPPFLAGS])
+AC_SUBST([CUNIT_CFLAGS])
AC_SUBST([CUNIT_LIBS])
-
-##########################################################################
-# Restore old saved variables
-##########################################################################
-LIBS=$OLD_LIBS
-CPPFLAGS=$OLD_CPPFLAGS
@@ -6,7 +6,7 @@ AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common
AM_LDFLAGS += -static
AM_LDFLAGS += $(DPDK_PMDS)
-AM_CPPFLAGS += $(CUNIT_CPPFLAGS)
+AM_CFLAGS += $(CUNIT_PFLAGS)
LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la
LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la
@@ -4,7 +4,7 @@
AM_LDFLAGS += -static
-AM_CPPFLAGS += $(CUNIT_CPPFLAGS)
+AM_CFLAGS += $(CUNIT_CFLAGS)
LIBCUNIT_COMMON = $(top_builddir)/test/common_plat/common/libcunit_common.la
LIB = $(top_builddir)/lib