aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-06-05 16:51:47 -0700
committerEric Biggers <ebiggers@google.com>2020-06-05 16:51:47 -0700
commitf8072c6f4968b6983e2f1d165a7d486eb4a284a5 (patch)
treee7f075b3feecde73dc2f29575d894f10fcb53596
parentd38875c097f6912e0b1057e63b21756a2562e340 (diff)
downloadfsverity-utils-f8072c6f4968b6983e2f1d165a7d486eb4a284a5.tar.gz
Makefile: improve the 'check' target
- Support $(TEST_WRAPPER_PROG), for valgrind. - Run a few 'fsverity' commands that don't require kernel support. Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r--.gitignore1
-rw-r--r--Makefile14
2 files changed, 12 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index d3109a8..7ad2b2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
*.so.*
/.build-config
/fsverity
+/fsverity.sig
/test_*
cscope.*
ncscope.*
diff --git a/Makefile b/Makefile
index 78180dd..ca80050 100644
--- a/Makefile
+++ b/Makefile
@@ -144,10 +144,18 @@ all:$(DEFAULT_TARGETS)
test_programs:$(TEST_PROGRAMS)
-check:test_programs
+check:fsverity test_programs
for prog in $(TEST_PROGRAMS); do \
- ./$$prog || exit 1; \
+ $(TEST_WRAPPER_PROG) ./$$prog || exit 1; \
done
+ ./fsverity --help > /dev/null
+ ./fsverity --version > /dev/null
+ ./fsverity sign fsverity fsverity.sig \
+ --key=testdata/key.pem --cert=testdata/cert.pem > /dev/null
+ ./fsverity sign fsverity fsverity.sig --hash=sha512 --block-size=512 \
+ --salt=12345678 \
+ --key=testdata/key.pem --cert=testdata/cert.pem > /dev/null
+ rm -f fsverity.sig
@echo "All tests passed!"
install:all
@@ -174,7 +182,7 @@ help:
clean:
rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) \
- lib/*.o programs/*.o .build-config
+ lib/*.o programs/*.o .build-config fsverity.sig
FORCE: