Skip to content

Commit

Permalink
Dump proxy log if OpenDNSSEC tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Nov 30, 2021
1 parent 70778d2 commit 28878d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testdata/ci-opendnssec-tests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pkcs11-testing --module ./libpkcs11proxy.so --slot "$SLOT_ID" --pin 1234 --test-

echo "===== test-all slot 0 (diff) ====="

diff -I '^Modulus: [0-9A-F]\+$' test-all-default.txt test-all-pkcs11proxy.txt
diff -I '^Modulus: [0-9A-F]\+$' test-all-default.txt test-all-pkcs11proxy.txt || testdata/dump-proxy-log-fail.bash

echo "===== init slot 1 ====="

Expand All @@ -35,4 +35,4 @@ pkcs11-testing --module ./libpkcs11proxy.so --slot "$SLOT_ID" --pin 1234 --test-

echo "===== test-stability slot 1 (diff) ====="

diff test-stability-default.txt test-stability-pkcs11proxy.txt
diff test-stability-default.txt test-stability-pkcs11proxy.txt || testdata/dump-proxy-log-fail.bash
12 changes: 12 additions & 0 deletions testdata/dump-proxy-log-fail.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -euo pipefail
shopt -s nullglob globstar

echo ""
echo "!!!!! Test failed, dumping proxy log... !!!!!"
echo ""

cat "$HOME/pkcs11mod.log"

exit 1

0 comments on commit 28878d8

Please sign in to comment.