Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix distcheck #15

Merged
merged 4 commits into from
Nov 5, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ SUBDIRS += test/gtest
endif

EXTRA_DIST =
EXTRA_DIST += m4/gtest.m4
EXTRA_DIST += configure-devel
EXTRA_DIST += configure-release
EXTRA_DIST += config/m4/gtest.m4
EXTRA_DIST += config/m4/ucs.m4
EXTRA_DIST += config/m4/ib.m4
EXTRA_DIST += config/m4/sysdep.m4
EXTRA_DIST += contrib/configure-devel
EXTRA_DIST += contrib/configure-release
EXTRA_DIST += contrib/configure-prof

6 changes: 6 additions & 0 deletions config/m4/ib.m4
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,9 @@ AC_CHECK_HEADER([infiniband/verbs_exp.h],
#
AM_CONDITIONAL([HAVE_IB], [test "x$with_ib" != xno])
AM_CONDITIONAL([HAVE_TL_RC], [test "x$with_rc" != xno])

mlnx_valg_libdir=/usr/lib64/mlnx_ofed/valgrind
AS_IF([test -d "$mlnx_valg_libdir"],
[AC_MSG_NOTICE([Added $mlnx_valg_libdir to valgrind LD_LIBRARY_PATH])
valgrind_libpath="$mlnx_valg_libdir:$valgrind_libpath"])

7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ define([libucx_so_version], 2:1:0)
AC_INIT([ucx], [ucx_ver_major.ucx_ver_minor])

config_flags="$*"
valgrind_libpath=""

AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.10 foreign tar-ustar silent-rules subdir-objects])
Expand Down Expand Up @@ -157,6 +158,12 @@ AC_ARG_ENABLE([debug-data],
[AC_DEFINE([ENABLE_DEBUG_DATA], [0])])


#
# Path for valgrind-enabled libraries
#
AC_SUBST([VALGRIND_LIBPATH], [${valgrind_libpath}])


#
# Print which transports are built
#
Expand Down
73 changes: 73 additions & 0 deletions contrib/test_jenkins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/bin/bash -eExl

rc=0

if [ -z "$BUILD_NUMBER" ]; then
echo Running interactive
WORKSPACE=$PWD
BUILD_NUMBER=1
JOB_URL=$WORKSPACE
else
echo Running under jenkins
fi

rpm_topdir=$WORKSPACE/rpm-dist

make_opt="-j$(($(nproc) - 1))"

echo Starting on host: $(hostname)

echo "Autogen"
./autogen.sh

echo "Build release"
./contrib/configure-release && make $make_opt && make $make_opt distcheck

echo "Build gtest "
make clean && ./contrib/configure-devel && make $make_opt

echo "Starting gtest"

make -C test/gtest test

module load tools/valgrind-3.9.0
make -C test/gtest VALGRIND_EXTRA_ARGS="--xml=yes --xml-file=valgrind.xml" test_valgrind
module unload tools/valgrind-3.9.0


echo "Build with coverity"
module load tools/cov
cov_build_id="cov_build_${BUILD_NUMBER}"
cov_build="$WORKSPACE/$cov_build_id"
rm -rf $cov_build
make clean
cov-build --dir $cov_build make $make_opt all
nerrors=$(cov-analyze --dir $cov_build |grep "Defect occurrences found" | awk '{print $5}')
cov-format-errors --dir $cov_build
rc=$(($rc+$nerrors))

cov_url="$JOB_URL/ws/$cov_build_id/c/output/errors/index.html"
rm -f jenkins_sidelinks.txt
echo 1..1 > coverity.tap
if [ $nerrors -gt 0 ]; then
echo "not ok 1 Coverity Detected $nerrors failures # $cov_url" >> coverity.tap
else
echo ok 1 Coverity found no issues >> coverity.tap
fi
echo Coverity report: $cov_url
printf "%s\t%s\n" Coverity $cov_url >> jenkins_sidelinks.txt
module unload tools/cov

#(make distcheck && rm -rf $rpm_topdir && mkdir -p $rpm_topdir && cd $rpm_topdir && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)
#
#if [ -x /usr/bin/dpkg-buildpackage ]; then
# echo "Build on debian"
# dpkg-buildpackage -us -uc
#else
# echo "Build rpms"
# rpmbuild -bs --define '_sourcedir .' --define "_topdir $rpm_topdir" --nodeps mxm.spec
# fn=$(find $rpm_topdir -name "*.src.rpm" -print0)
# rpmbuild --define "_topdir $rpm_topdir" --rebuild $fn
#fi

exit $rc
2 changes: 1 addition & 1 deletion src/uct/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if HAVE_IB
noinst_HEADERS += \
ib/base/ib_context.h \
ib/base/ib_device.h \
ib/base/ib_iface.h
ib/base/ib_iface.h \
ib/base/ib_verbs.h

libuct_la_SOURCES += \
Expand Down
10 changes: 2 additions & 8 deletions test/gtest/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export UCS_HANDLE_ERRORS
GTEST_FILTER ?= *
export GTEST_FILTER

VALGRIND_EXTRA_ARGS = --xml=yes --xml-file=valgrind.xml
VALGRIND_EXTRA_ARGS =

VALGRIND_ARGS = \
--tool=memcheck \
Expand Down Expand Up @@ -73,10 +73,4 @@ list: gtest
$(abs_builddir)/gtest --gtest_list_tests --gtest_filter=$(GTEST_FILTER)

test_valgrind: uct gtest
. /usr/share/Modules/init/sh && \
module load dev/mofed_valgrind && \
valgrind $(VALGRIND_ARGS) $(abs_builddir)/gtest --gtest_filter=$(GTEST_FILTER)

test_jenkins_valgrind: uct gtest
valgrind $(VALGRIND_ARGS) $(VALGRIND_EXTRA_ARGS) $(abs_builddir)/gtest --gtest_filter=$(GTEST_FILTER)

env LD_LIBRARY_PATH="$(VALGRIND_LIBPATH):${LD_LIBRARY_PATH}" valgrind $(VALGRIND_ARGS) $(VALGRIND_EXTRA_ARGS) $(abs_builddir)/gtest --gtest_filter=$(GTEST_FILTER)