From 179a0560a6b57119e5e9b72ce295c283d12a7b5d 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 8ebe9f1..46277af 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 2304cf7..65cd986 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: