From e70b5abf4baa2a8780ed26d026a8aae1c241ebc4 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 29 Jul 2013 13:01:06 +0200 Subject: [PATCH] tests: Fix tlsproxy_add() for `make distcheck`. Running tlsproxy_add() twice with the same hostname failed with `make distcheck`. --- tests/common.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 & -- 2.43.2