diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-09-03 12:51:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-09-03 12:51:58 -0400 |
commit | ffb56863aa82ca55c8a98853a9258a04e6f927e0 (patch) | |
tree | dd9987f499f6c2a597c4993474f89753dfa1f6a2 | |
parent | e73206f68184a0d571a875044cf0a2cb6090f454 (diff) | |
download | tor-ffb56863aa82ca55c8a98853a9258a04e6f927e0.tar.gz tor-ffb56863aa82ca55c8a98853a9258a04e6f927e0.zip |
Make test_keygen.sh dump what the problem is on cmp failure
-rwxr-xr-x | src/test/test_keygen.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_keygen.sh b/src/test/test_keygen.sh index d6066ac50c..6e852a9a58 100755 --- a/src/test/test_keygen.sh +++ b/src/test/test_keygen.sh @@ -46,11 +46,12 @@ fi fi +dump() { xxd -p "$1" | tr -d '\n '; } die() { echo "$1" >&2 ; exit 5; } check_dir() { [ -d "$1" ] || die "$1 did not exist"; } check_file() { [ -e "$1" ] || die "$1 did not exist"; } check_no_file() { [ -e "$1" ] && die "$1 was not supposed to exist" || true; } -check_files_eq() { cmp "$1" "$2" || die "$1 and $2 did not match"; } +check_files_eq() { cmp "$1" "$2" || die "$1 and $2 did not match: `dump $1` vs `dump $2`"; } check_keys_eq() { check_files_eq "${SRC}/keys/${1}" "${ME}/keys/${1}"; } DATA_DIR=`mktemp -d -t tor_keygen_tests.XXXXXX` |