Skip to content

Commit f09e9c9

Browse files
committed
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 <dsterba@suse.com>
1 parent 6984ee8 commit f09e9c9

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

tests/build-tests.sh

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
#!/bin/sh
2+
# Usage: $0 [--ccache] [make options]
3+
#
24
# Test various compilation options:
35
# - native arch
46
# - dynamic, static
57
# - various configure options
68
#
7-
# Arguments: anything will be passed to 'make', eg. define CC, D, V
9+
# Arguments:
10+
# - (first arugment) --ccache - enable ccache for build which can speed up
11+
# rebuilding same files if the options do not affect them, the ccache will
12+
# be created in the toplevel git directory
13+
# - anything else will be passed to 'make', eg. define CC, D, V
814
#
915
# Requirements for full coverage:
1016
# - static version of all libs
1117

12-
make=make
13-
opts="-j16 $@"
14-
15-
conf=
16-
target=
17-
1818
die() {
1919
echo "ERROR: $@"
2020
exit 1
@@ -70,7 +70,22 @@ if ! [ -f configure.ac ]; then
7070
exit 1
7171
fi
7272

73+
if [ "$1" = "--ccache" ]; then
74+
shift
75+
ccache=true
76+
export CCACHE_DIR=`pwd`/.ccache
77+
mkdir -p -- "$CCACHE_DIR"
78+
PATH="/usr/lib64/ccache:$PATH"
79+
echo "Enable ccache at CCACHE_DIR=$CCACHE_DIR"
80+
ccache -s
81+
fi
82+
83+
make=make
84+
jobs=16
85+
opts="-j${jobs} $@"
7386
verdict=
87+
target=
88+
7489
conf=
7590
build_make_targets
7691

@@ -95,10 +110,16 @@ build_make_targets
95110
conf='--with-convert=ext2'
96111
build_make_targets
97112

98-
conf='--with-convert=ext2,reiserfs'
113+
conf='--enable-zstd'
99114
build_make_targets
100115

101-
conf='--enable-zstd'
116+
conf='--with-crypto=libgcrypt'
117+
build_make_targets
118+
119+
conf='--with-crypto=libsodium'
120+
build_make_targets
121+
122+
conf='--with-crypto=libkcapi'
102123
build_make_targets
103124

104125
# debugging builds, just the default targets

0 commit comments

Comments
 (0)