]> granicus.if.org Git - graphviz/commitdiff
don't disable leak detection for ctest based tests
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 5 Jul 2021 10:24:02 +0000 (12:24 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 7 Jul 2021 04:53:27 +0000 (06:53 +0200)
The current test does not trigger any memory leaks and we want to
ensure that we don't introduce any new leaks and fix existing leaks as
new tests encounter them.

We still want leak detection disabled when running pytest since those
tests still trigger many memory leaks.

This is accomplished by moving the disabling of the leak detection
into the test template and performing it after ctest has been
executed, but before pytest executes.

This commit also makes the temporary disabling of ODR violation
bacause of lib/ortho to be selectively for ctest only.

.gitlab-ci.yml

index 5e828dc70829f3ad402a335e33d89ea2ed0d4809..013fd91e96a9c36f5939ebe2f2ee3c86196d46af 100644 (file)
@@ -239,6 +239,9 @@ portable-source:
         - pushd build
         - ctest --output-on-failure
         - popd
+        # Many of the tests run by pytest currently trigger ASan
+        # memory leak detections. Disable those for now.
+        - export ASAN_OPTIONS=detect_leaks=0
         - python3 -m pytest --verbose --junitxml=report.xml ci/tests.py tests rtest
     artifacts:
         reports:
@@ -826,9 +829,6 @@ ubuntu21.04-cmake-ASan-test-including-ctest:
         - export CFLAGS=" -g -fsanitize=address,undefined"
         - export CXXFLAGS=" -g -fsanitize=address,undefined"
         - export LDFLAGS=" -g -fsanitize=address,undefined"
-        # FIXME: remove the following when Graphviz can pass the test suite
-        # leak-free
-        - export ASAN_OPTIONS=detect_leaks=0
         - echo experimental > COLLECTION
     needs:
         - job: portable-source