From 8a92023cf3297fecd0c9073ed313dc1ad0ed0bcd Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 24 Apr 2023 12:28:31 +0200 Subject: [PATCH] Enable Asan tests in CI For now memory leaks are ignored. --- .gitlab-ci.yml | 7 +++++++ nix/rt.nix | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5002cca..93dbfbc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,13 @@ build:rt-tests: script: - nix build -L --tarball-ttl 0 --file nix/rt.nix bsc.ovni-rt +build:asan: + stage: build + tags: + - nix + script: + - nix build -L --tarball-ttl 0 --file nix/rt.nix bsc.ovni-asan + build:no-mpi: stage: build tags: diff --git a/nix/rt.nix b/nix/rt.nix index d5e2780..c58073b 100644 --- a/nix/rt.nix +++ b/nix/rt.nix @@ -161,6 +161,14 @@ let cmakeFlags = old.cmakeFlags ++ [ "-DUSE_MPI=OFF" ]; }); + ovni-asan = last.ovni-rt.overrideAttrs (old: { + cmakeFlags = old.cmakeFlags ++ [ "-DCMAKE_BUILD_TYPE=Asan" ]; + # Ignore leaks in tests for now, only check memory errors + preCheck = old.preCheck + '' + export ASAN_OPTIONS=detect_leaks=0 + ''; + }); + }); in