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

make: Remove splint tests #374

Merged
merged 1 commit into from
Dec 11, 2019
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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ addons:
apt:
packages:
- check
- splint
# for ipc.test:test_ipc_dispatch_*_deadlock_provoke
- libglib2.0-dev # natively present, but doesn't hurt
# for "make rpm"
Expand Down
6 changes: 0 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ AC_PROG_MAKE_SET
AC_CHECK_PROGS([PKGCONFIG], [pkg-config])
AC_CHECK_PROGS([DOXYGEN], [doxygen])
AM_CONDITIONAL(HAVE_DOXYGEN, test -n "${DOXYGEN}")
AC_CHECK_PROGS([SPLINT], [splint])
AM_CONDITIONAL(HAVE_SPLINT, test -n "${SPLINT}")
AM_COND_IF([HAVE_SPLINT],
[AC_CHECK_PROGS([DPKG_ARCHITECTURE], [dpkg-architecture])
AM_CONDITIONAL([HAVE_DPKG_ARCHITECTURE], test -n "${DPKG_ARCHITECTURE}")],
[AM_CONDITIONAL([HAVE_DPKG_ARCHITECTURE], [false])])
AC_CHECK_TOOLS([NM], [eu-nm nm], [:])
AC_CHECK_TOOLS([READELF], [eu-readelf readelf], [:])
AM_PATH_PYTHON([2.6],, [:])
Expand Down
43 changes: 0 additions & 43 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -108,46 +108,3 @@ qblog_script.ld: %.ld: %.ld.in
pkgconfigexecdir = $(libdir)/pkgconfig
pkgconfigexec_DATA = libqb.pc

if HAVE_SPLINT
check_SCRIPTS = run_splint.sh
TESTS = $(check_SCRIPTS)
# This is a hack because Ubuntu (Debian fixed in #675025) doesn't set the arch path
# in splint (https://bugs.launchpad.net/ubuntu/+source/splint/+bug/1786658)
if HAVE_DPKG_ARCHITECTURE
DEB_INCLUDES = -I/usr/include/$$($(DPKG_ARCHITECTURE) -qDEB_HOST_GNU_TYPE)
else
DEB_INCLUDES =
endif

ALL_LINT_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(DEB_INCLUDES) \
$(libqb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CPPFLAGS) \
$(LINT_FLAGS)
# expected for the time being (but SHOULD be fixed eventually):
# ipc_setup.c: (in function qb_ipcc_us_setup_connect)
# ipc_setup.c:479:2: Return value (type int32_t) ignored: qb_ipc_us_ready(...
# ipc_setup.c:494:2: Return value (type int32_t) ignored: qb_ipc_auth_cred...
# splint is stupid:
# log_format.c:397:22: Arrow access field of non-struct or union pointer (struct
# log_format.c:408:22: Arrow access field of non-struct or union pointer (struct
# log_format.c:415:13: Arrow access field of non-struct or union pointer (struct

SPLINT_SUMMARY_EXP = " 5 code warnings"

run_splint.sh: $(top_srcdir)/configure.ac
@echo '$(SPLINT) $(ALL_LINT_FLAGS) \' > $@-t
@echo ' $(addprefix $(top_srcdir)/lib/, $(source_to_lint)) \' >> $@-t
@echo ' 2>&1 | tee $@-o' >> $@-t
@echo 'tail -n1 $@-o | grep -qF $(SPLINT_SUMMARY_EXP)' >> $@-t
@echo 'ret=$$?' >> $@-t
@echo 'rm -f $@-o' >> $@-t
@echo 'test $$ret = 0 || echo "EXPECTED:$(SPLINT_SUMMARY_EXP)"' >> $@-t
@echo 'exit $$ret' >> $@-t
@chmod +x $@-t
$(AM_V_GEN)mv $@-t $@

dist-clean-local:
rm -f run_splint.sh

clean-local:
rm -f run_splint.sh
endif