Travis CI: Add test run with ElectricFence
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 2 Aug 2019 05:40:37 +0000 (07:40 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 2 Aug 2019 06:57:57 +0000 (08:57 +0200)
.travis.yml

index 80ed923537e30af0dc6d08b9fb824edf849cfeac..fc52a21c84a5780b2a7ff2c9454be8a4a497e012 100644 (file)
@@ -5,6 +5,7 @@ addons:
     packages:
       - debhelper
       - devscripts
+      - electric-fence
       - fakeroot
       - libc-ares-dev
       - libevent-dev
@@ -25,6 +26,7 @@ env:
     - configure_args='--with-pam'
     - configure_args='--with-openssl'
     - configure_args='--without-openssl'
+    - configure_args='--with-openssl --with-pam' use_efence=yes
 script: |
   set -e
   PATH=/usr/lib/postgresql/9.5/bin:$PATH
@@ -33,10 +35,16 @@ script: |
   ./configure --prefix=$HOME/install --enable-cassert --enable-werror --without-cares $configure_args
   make
   make -C test
-  (cd test/ && ./test.sh)
-  if echo x"$configure_args" | grep -q with-openssl; then
-    (cd test/ssl/ && ./test.sh)
-  fi
+  (
+    if [ x"$use_efence" = x"yes" ]; then
+      export LD_PRELOAD=/usr/lib/libefence.so
+      export EF_ALLOW_MALLOC_0=1
+    fi
+    (cd test/ && ./test.sh)
+    if echo x"$configure_args" | grep -q with-openssl; then
+      (cd test/ssl/ && ./test.sh)
+    fi
+  )
   make install
   make dist
   tar -x -f pgbouncer-*.tar.gz