diff --git a/tests/build-tests.sh b/tests/build-tests.sh index e8eb71d6..5ee958c6 100755 --- a/tests/build-tests.sh +++ b/tests/build-tests.sh @@ -1,20 +1,20 @@ #!/bin/sh +# Usage: $0 [--ccache] [make options] +# # Test various compilation options: # - native arch # - dynamic, static # - various configure options # -# Arguments: anything will be passed to 'make', eg. define CC, D, V +# Arguments: +# - (first arugment) --ccache - enable ccache for build which can speed up +# rebuilding same files if the options do not affect them, the ccache will +# be created in the toplevel git directory +# - anything else will be passed to 'make', eg. define CC, D, V # # Requirements for full coverage: # - static version of all libs -make=make -opts="-j16 $@" - -conf= -target= - die() { echo "ERROR: $@" exit 1 @@ -70,7 +70,22 @@ if ! [ -f configure.ac ]; then exit 1 fi +if [ "$1" = "--ccache" ]; then + shift + ccache=true + export CCACHE_DIR=`pwd`/.ccache + mkdir -p -- "$CCACHE_DIR" + PATH="/usr/lib64/ccache:$PATH" + echo "Enable ccache at CCACHE_DIR=$CCACHE_DIR" + ccache -s +fi + +make=make +jobs=16 +opts="-j${jobs} $@" verdict= +target= + conf= build_make_targets @@ -95,10 +110,16 @@ build_make_targets conf='--with-convert=ext2' build_make_targets -conf='--with-convert=ext2,reiserfs' +conf='--enable-zstd' build_make_targets -conf='--enable-zstd' +conf='--with-crypto=libgcrypt' +build_make_targets + +conf='--with-crypto=libsodium' +build_make_targets + +conf='--with-crypto=libkcapi' build_make_targets # debugging builds, just the default targets