From f09e9c9543ff4304b7b062539e0cd28710c77918 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 1 Mar 2023 18:42:47 +0100 Subject: [PATCH] btrfs-progs: tests: add more targets to build test Add config for crypto backends (they could fail for the static targets due to missing static libraries). Reiserfs is not tested and it slowly disappears from distros. Signed-off-by: David Sterba --- tests/build-tests.sh | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) 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