From 0c72b7cd413bfead89128816b04d6691610a2eb3 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 27 Jul 2022 14:22:54 -0700 Subject: [PATCH] ci: run meson test with the address sanitizer enabled Set the ASAN_OPTION so that the exitcode is not 1, this avoids asan returning the exitcode that the tests already expect from a normal pkgconf error --- .github/workflows/test.yml | 24 ++++++++++++++++++++++++ .woodpecker.yml | 15 +++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af278fd..d129a4a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,6 +60,30 @@ jobs: run: | meson test -v -C _build + debian-meson-asan: + runs-on: ubuntu-latest + container: + image: debian:testing + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Update system and add dependencies + run: | + apt-get update + apt-get install -y kyua atf-sh build-essential meson + + - name: Build + run: | + meson _build -Db_sanitize=address + meson compile -C _build + + - name: Run tests + run: | + meson test -v -C _build + env: + ASAN_OPTIONS: "exitcode=7" + debian-autotools: runs-on: ubuntu-latest container: diff --git a/.woodpecker.yml b/.woodpecker.yml index ea2f687..63551e1 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -12,6 +12,21 @@ pipeline: IMAGE: debian BUILD: meson + debian-meson-asan: + image: debian:testing + environment: + - ASAN_OPTIONS="exitcode=7" + commands: + - apt-get update + - apt-get install -y kyua atf-sh build-essential meson + - meson _build -Db_sanitize=address + - meson compile -C _build + - meson test -v -C _build + when: + matrix: + IMAGE: debian + BUILD: meson + debian-autotools: image: debian:testing commands: