Skip to content
Snippets Groups Projects
Commit d18d1ef7 authored by dkg's avatar dkg
Browse files

make the test suite a little more robust and verbose

parent e3910fe8
No related branches found
No related tags found
No related merge requests found
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Thu, 30 Aug 2018 09:24:25 -0400
Subject: display what goes wrong with the daemons at the end of the test
suite
---
testsuite | 1 +
1 file changed, 1 insertion(+)
diff --git a/testsuite b/testsuite
index b654557..fb7bded 100755
--- a/testsuite
+++ b/testsuite
@@ -49,6 +49,7 @@ section() {
cleanup () {
section "cleaning up"
+ tail "$d/"*.err
/usr/sbin/nginx -c "$d/nginx.conf" -p "$d" -s stop 2> "$d/nginx-stop.err" || true
kill %2 || true
kill %1 || true
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Thu, 30 Aug 2018 09:25:13 -0400
Subject: testsuite: choose a random loopback IP address to work on
---
testsuite | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testsuite b/testsuite
index fb7bded..69fa0d6 100755
--- a/testsuite
+++ b/testsuite
@@ -17,7 +17,7 @@
# if it already exists, it will not be cleaned up.
# - TESTIP: the IP address to use for testing.
# the user needs to be able to open listening sockets, and to connect to them
-# by default, 127.7.8.9
+# by default, choose a random IP in 127.0.0.0/8
# Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
# 2018-08-29
@@ -38,7 +38,7 @@ if [ -z "$WORKDIR" ]; then
else
d="$WORKDIR"
fi
-ip="${TESTIP:-127.7.8.9}"
+ip="${TESTIP:-127.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).$(( $RANDOM % 256 ))}"
printf "hddemux test\n------------\n binary: %s\n workdir: %s\n IP addr: %s\n" "$hddemux" "$d" "$ip"
0001-display-what-goes-wrong-with-the-daemons-at-the-end-.patch
0002-testsuite-choose-a-random-loopback-IP-address-to-wor.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment