mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-27 14:22:31 +02:00

Unlike the original ima-evm-utils ima_hash.test and sign_verify.test selftests, kernel tests may fail for any number of reasons (e.g. kernel config, permissions, missing applications, test infrastructure). For these tests, the full test log is needed to analyze the failure. Create a phony target in tests/Makefile.am named "check-logs". Based on test name, output different amounts of the test log. Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
27 lines
590 B
Makefile
27 lines
590 B
Makefile
check_SCRIPTS =
|
|
TESTS = $(check_SCRIPTS)
|
|
|
|
check_SCRIPTS += ima_hash.test sign_verify.test boot_aggregate.test \
|
|
fsverity.test portable_signatures.test
|
|
|
|
.PHONY: check_logs
|
|
check_logs:
|
|
@for log in $(TEST_LOGS); do \
|
|
echo -e "\n***" $$log "***" ; \
|
|
case $$log in \
|
|
ima_hash.log | sign_verify.log ) \
|
|
tail -3 $$log ; \
|
|
grep "skipped" $$log && grep "skipped" $$log | wc -l ;; \
|
|
*) \
|
|
cat $$log ;; \
|
|
esac ; \
|
|
done
|
|
|
|
clean-local:
|
|
-rm -f *.txt *.out *.sig *.sig2
|
|
|
|
distclean: distclean-keys
|
|
.PHONY: distclean-keys
|
|
distclean-keys:
|
|
./gen-keys.sh clean
|