File: hash-tests.sh

package info (click to toggle)
btrfs-progs 6.2-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,244 kB
  • sloc: ansic: 114,376; sh: 9,576; python: 1,242; makefile: 820
file content (41 lines) | stat: -rwxr-xr-x 731 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
# Test all supported hash algorithms on all backends on the sample test vectors
# This requires all crypto backends available for full coverage.

make=make
opts="-j16 $@"
verdict=

die() {
	echo "ERROR: $@"
	exit 1
}

buildme() {
	make clean-all

	echo "BUILD WITH: $1"
	./autogen.sh && configure \
		--disable-documentation --disable-convert --disable-python \
		--with-crypto="$1" || die "configure not working with: $@"
	$make clean
	$make $opts hash-vectest
	if ./hash-vectest; then
		verdict="$verdict
$1: OK"
	fi
}

# main()
if ! [ -f configure.ac ]; then
	echo "Please run me from the top directory"
	exit 1
fi

buildme builtin
buildme libgcrypt
buildme libsodium
buildme libkcapi

echo "VERDICT:"
echo "$verdict"