Skip to content

Commit

Permalink
Enable C++ library assertions for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
saper committed Jan 1, 2022
1 parent d155341 commit 8e74a16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ before_install:
- sudo apt-get install build-essential autoconf automake libtool libcppunit-dev libsqlite3-dev sqlite3 libbotan-2-dev libssl-dev p11-kit
script: sh testing/travis/travis.sh
env:
- CPP_LIBRARY_ASSERTIONS=yes CRYPTO=openssl OBJSTORE=file
- CRYPTO=openssl OBJSTORE=file
- CRYPTO=openssl OBJSTORE=sqlite
- CRYPTO=botan OBJSTORE=file
Expand Down
8 changes: 7 additions & 1 deletion testing/travis/travis.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/bin/sh

CONF_CPP_LIBRARY_ASSERTIONS=""
CONF_CRYPTO=""
CONF_OBJSTORE=""

case $CPP_LIBRARY_ASSERTIONS in
yes)
CONF_CPP_LIBRARY_ASSERTIONS="$CONF_CPP_LIBRARY_ASSERTIONS -D_LIBCPP_DEBUG_LEVEL=1 -D_GLIBCXX_ASSERTIONS=1"
esac

case $CRYPTO in
botan)
CONF_CRYPTO="$CONF_CRYPTO --with-crypto-backend=botan --with-botan=/usr"
Expand Down Expand Up @@ -31,5 +37,5 @@ sqlite)
esac

sh autogen.sh && \
./configure $CONF_CRYPTO $CONF_OBJSTORE && \
env CXXFLAGS="${CXXFLAGS} ${CONF_CPP_LIBRARY_ASSERTIONS}" ./configure $CONF_CRYPTO $CONF_OBJSTORE && \
make all check

0 comments on commit 8e74a16

Please sign in to comment.