From: Simon Ruderich Date: Mon, 29 Jul 2013 11:01:06 +0000 (+0200) Subject: tests: Fix tlsproxy_add() for `make distcheck`. X-Git-Url: https://ruderich.org/simon/gitweb/?p=tlsproxy%2Ftlsproxy.git;a=commitdiff_plain;h=e70b5abf4baa2a8780ed26d026a8aae1c241ebc4 tests: Fix tlsproxy_add() for `make distcheck`. Running tlsproxy_add() twice with the same hostname failed with `make distcheck`. --- diff --git a/tests/common.sh b/tests/common.sh index 36dda8e..ff45745 100644 --- a/tests/common.sh +++ b/tests/common.sh @@ -48,7 +48,11 @@ tlsproxy_setup() { "$srcdir/../src/tlsproxy-setup" >/dev/null 2>&1 } tlsproxy_add() { - "$srcdir/../src/tlsproxy-add" "$1" "$srcdir/$2" >/dev/null 2>&1 + # `make distcheck` marks the source PEM-file as read-only which is copied + # over when using `cp`. This causes a check failure when tlsproxy_add() is + # called again with the same hostname. Instead use redirection which + # doesn't use `cp`. + "$srcdir/../src/tlsproxy-add" "$1" < "$srcdir/$2" >/dev/null 2>&1 } tlsproxy() { ../src/tlsproxy -d2 "$@" >tlsproxy-log 2>&1 &