diff --git a/.redhat-ci.Dockerfile b/.redhat-ci.Dockerfile index f1a41299..c78e5c4c 100644 --- a/.redhat-ci.Dockerfile +++ b/.redhat-ci.Dockerfile @@ -11,6 +11,8 @@ RUN dnf install -y \ parallel \ clang \ libubsan \ + libasan \ + libtsan \ gnome-desktop-testing \ redhat-rpm-config \ elfutils \ diff --git a/.redhat-ci.yml b/.redhat-ci.yml index 33e32995..5160b9c4 100644 --- a/.redhat-ci.yml +++ b/.redhat-ci.yml @@ -8,8 +8,13 @@ required: true container: image: projectatomic/ostree-tester +packages: + - libasan + env: - CFLAGS: '-fsanitize=undefined' + CFLAGS: '-fsanitize=undefined -fsanitize=address' + ASAN_OPTIONS: 'detect_leaks=0' # Right now we're not fully clean, but this gets us use-after-free etc + # TODO when we're doing leak checks: G_SLICE: "always-malloc" build: config-opts: > diff --git a/Makefile-tests.am b/Makefile-tests.am index 8c37a6e6..1f9cad48 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -281,18 +281,15 @@ tests/%-symlink-stamp: % Makefile # non-recursive Automake, so we change our code to canonically look # for tests/ which is just a symlink when installed. if ENABLE_INSTALLED_TESTS -install-test-data-file-path-hack: +install-installed-tests-extra: if test -L $(DESTDIR)$(installed_testdir)/tests; then \ rm $(DESTDIR)$(installed_testdir)/tests; \ fi ln -s . $(DESTDIR)$(installed_testdir)/tests -INSTALL_DATA_HOOKS += install-test-data-file-path-hack - -install-libtest: if BUILDOPT_ASAN sed -e 's,^BUILT_WITH_ASAN=.*,BUILT_WITH_ASAN=1,' < $(srcdir)/tests/libtest.sh > $(DESTDIR)$(installed_testdir)/tests/libtest.sh else install -m 0644 $(srcdir)/tests/libtest.sh $(DESTDIR)$(installed_testdir)/tests/libtest.sh endif -INSTALL_DATA_HOOKS += install-libtest +INSTALL_DATA_HOOKS += install-installed-tests-extra endif