diff options
author | Eric Biggers <ebiggers@google.com> | 2021-12-23 12:59:35 -0600 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2021-12-23 12:59:35 -0600 |
commit | 84854db9b6c0b306ebabc683739c681aaeae6dd2 (patch) | |
tree | 51bf84b4361f6cd9ec7de98cb3de537e558e203f | |
parent | f4e213f13da4436e720246d9f93e007b0e20aff8 (diff) | |
download | fsverity-utils-84854db9b6c0b306ebabc683739c681aaeae6dd2.tar.gz |
Support automatically building BoringSSL for testing
Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 15 | ||||
-rwxr-xr-x | scripts/run-tests.sh | 8 |
3 files changed, 22 insertions, 3 deletions
@@ -6,6 +6,8 @@ *.so *.so.* /.build-config +/boringssl +/boringssl.tar.gz /fsverity /fsverity.sig /run-tests.log @@ -213,6 +213,21 @@ EXTRA_TARGETS += $(MAN_PAGES) ############################################################################## +# Support for downloading and building BoringSSL. The purpose of this is to +# allow testing builds of fsverity-utils that link to BoringSSL instead of +# OpenSSL, without having to use a system that uses BoringSSL natively. + +boringssl: + rm -rf boringssl boringssl.tar.gz + curl -s -o boringssl.tar.gz \ + https://boringssl.googlesource.com/boringssl/+archive/refs/heads/master.tar.gz + mkdir boringssl + tar xf boringssl.tar.gz -C boringssl + cmake -B boringssl/build boringssl + $(MAKE) -C boringssl/build $(MAKEFLAGS) + +############################################################################## + SPECIAL_TARGETS := all test_programs check install install-man uninstall \ help clean diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index db73d01..e2a4e38 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -214,9 +214,11 @@ TEST_FUNCS+=(valgrind_test) boringssl_test() { log "Build and test using BoringSSL instead of OpenSSL" - BSSL=$HOME/src/boringssl - $MAKE CFLAGS="-O2 -Werror" LDFLAGS="-L$BSSL/build/crypto" \ - CPPFLAGS="-I$BSSL/include" LDLIBS="-lcrypto -lpthread" check + log "-> Building BoringSSL" + $MAKE boringssl + log "-> Building fsverity-utils linked to BoringSSL" + $MAKE CFLAGS="-O2 -Werror" LDFLAGS="-Lboringssl/build/crypto" \ + CPPFLAGS="-Iboringssl/include" LDLIBS="-lcrypto -lpthread" check } TEST_FUNCS+=(boringssl_test) |