language: c
-dist: xenial
+dist: bionic
sudo: required
addons:
apt:
- sources:
- - ubuntu-toolchain-r-test
packages: &default_deps
- - python3-dbg
+ - python3
- cython3
- flex
- help2man
- autopoint
- texinfo
- - valgrind
- - g++-5
# env:
# global:
matrix:
include:
- - os: linux
- env:
- - COMPILER=gcc-5
- - PYTHON=/usr/bin/python3-dbg
- - CYTHON=/usr/bin/cython3
- - DISTCHECK_CONFIGURE_FLAGS="PYTHON=/usr/bin/python3-dbg CYTHON=/usr/bin/cython3"
- os: osx
osx_image: xcode9.2
env:
- PYTHON=/usr/local/bin/python3
- compiler: gcc
env:
- - COMPILER=gcc-6
- PYTHON=/usr/bin/python3-dbg
- CYTHON=/usr/bin/cython3
- - DISTCHECK_CONFIGURE_FLAGS="PYTHON=/usr/bin/python3-dbg CYTHON=/usr/bin/cython3"
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - *default_deps
- - [g++-6]
+ - CONFIGURE_ARGS=(--enable-package-suffix "CFLAGS=\"-g3 -fsanitize=address -fsanitize=undefined\"" "LDFLAGS=\"-fsanitize=address -fsanitize=undefined\"" "PY_LOG_ENV=\"LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/7/libasan.so PYTHONMALLOC=malloc\"")
+ - DISTCHECK_CONFIGURE_FLAGS="PYTHON=/usr/bin/python3 CYTHON=/usr/bin/cython3"
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
script:
- ./bootstrap
- - ./configure --enable-silent-rules CC=$COMPILER $DISTCHECK_CONFIGURE_FLAGS
+ - ./configure --enable-silent-rules "${CONFIGURE_ARGS[@]}" $DISTCHECK_CONFIGURE_FLAGS
- make && make distcheck
make install
#+END_SRC
-* Testing with Valgrind
-
-Currently, Valgrind does not play nice with CPython, even with a fairly extensive suppressions file. It works on Ubuntu with the debug build of Python, from the package ~python3-dbg~. Having installed this, configure with the option ~PYTHON=/usr/bin/python3-dbg~ (the full path is required).
-
-To ensure that Valgrind is used for testing releases too, the above setting can be added to ~DISTCHECK_CONFIGURE_FLAGS~.
-
* Making a release
To make a release, you'll need [[https://github.com/rrthomas/woger][woger]] and [[https://github.com/aktau/github-release][github-release]], suitably configured. Having tested and pushed all the changes, update the version number in =configure.ac= and write the =NEWS= entry and push those too.
-# bootstrap.conf (Recode) version 2019-05-20
+# bootstrap.conf (Recode) version 2019-09-11
# This file is part of Recode.
#
sys_wait
unistd
utime
- valgrind-tests
vasprintf
vprintf-posix
xalloc
fi
AC_SUBST([ISYSTEM])
+# Extra settings for running tests, e.g. LD_PRELOAD for ASAN
+AC_SUBST([TESTS_ENVIRONMENT_EXTRA])
+
AC_CONFIG_HEADERS([config.h])
AC_HEADER_STDC
AM_ICONV
clean-local:
rm -f *@pyextext@
+# TESTS_ENVIRONMENT_EXTRA can be set at configure time
check-local: Recode@pyextext@
- if test -n "$(VALGRIND)"; then export VALGRIND='$(VALGRIND) --suppressions=$(srcdir)/valgrind-python.supp'; fi; \
export LD_LIBRARY_PATH=$(top_builddir)/src/@objdir@; \
export DYLD_LIBRARY_PATH=$(top_builddir)/src/@objdir@; \
+ export LSAN_OPTIONS=suppressions=$(srcdir)/asan-suppressions.txt; \
RECODE=$(top_builddir)/src/recode$(EXEEXT) PYTHONPATH=.:$(srcdir) \
- $$VALGRIND $(PYTHON) $(srcdir)/pytest $(LIMIT) $(srcdir)/t*.py
+ $(TESTS_ENVIRONMENT_EXTRA) $(PYTHON) $(srcdir)/pytest $(LIMIT) $(srcdir)/t*.py
Recode@pyextext@: Recode.c setup.py
rm -f *@pyextext@
--- /dev/null
+leak:/bin/bash