summaryrefslogtreecommitdiff
path: root/debian/patches/tests-use-ipv4-lo-address.patch
blob: df593407f494aaf2d5170c9e8227675555f9c505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 8dbb3c94c9c3c71fc3c9e9814873b1fb5e381290 Mon Sep 17 00:00:00 2001
From: Didier Raboud <odyx@debian.org>
Date: Tue, 9 Aug 2016 18:11:21 +0200
Subject: Use 127.0.0.1 instead of localhost in the test-suite. This should

 make the test-suite work in pbuilder. It apparently also fixes an ipp backend
 problem in the test-suite.
Origin: vendor
Last-Update: 2016-08-05

Patch-Name: tests-use-ipv4-lo-address.patch
---
 test/5.1-lpadmin.sh   | 4 ++--
 test/run-stp-tests.sh | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/5.1-lpadmin.sh b/test/5.1-lpadmin.sh
index 7efc39892..08b8c508f 100644
--- a/test/5.1-lpadmin.sh
+++ b/test/5.1-lpadmin.sh
@@ -52,8 +52,8 @@ echo ""
 
 echo "Add Shared Printer Test"
 echo ""
-echo "    lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m everywhere"
-$runcups $VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m everywhere 2>&1
+echo "    lpadmin -p Test3 -E -v ipp://127.0.0.1:$IPP_PORT/printers/Test2 -m everywhere"
+$runcups $VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://127.0.0.1:$IPP_PORT/printers/Test2 -m everywhere 2>&1
 if test $? != 0; then
 	echo "    FAILED"
 	exit 1
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index 0bb955749..6d6aaef9c 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -490,7 +490,7 @@ fi
 cat >$BASE/cupsd.conf <<EOF
 StrictConformance Yes
 Browsing Off
-Listen localhost:$port
+Listen 127.0.0.1:$port
 Listen $BASE/sock
 MaxSubscriptions 3
 MaxLogSize 0
@@ -617,7 +617,7 @@ fi
 
 # These get exported because they don't have side-effects...
 CUPS_DISABLE_APPLE_DEFAULT=yes; export CUPS_DISABLE_APPLE_DEFAULT
-CUPS_SERVER=localhost:$port; export CUPS_SERVER
+CUPS_SERVER=127.0.0.1:$port; export CUPS_SERVER
 CUPS_SERVERROOT=$BASE; export CUPS_SERVERROOT
 CUPS_STATEDIR=$BASE; export CUPS_STATEDIR
 CUPS_DATADIR=$BASE/share; export CUPS_DATADIR
@@ -743,10 +743,10 @@ for file in 4*.test ../examples/ipp-2.1.test; do
         echo $ac_n "`date '+[%d/%b/%Y:%H:%M:%S %z]'` $ac_c" >>$strfile
 
 	if test $file = ../examples/ipp-2.1.test; then
-		uri="ipp://localhost:$port/printers/Test1"
+		uri="ipp://127.0.0.1:$port/printers/Test1"
 		options="-V 2.1 -d NOPRINT=1 -f testfile.ps"
 	else
-		uri="ipp://localhost:$port/printers"
+		uri="ipp://127.0.0.1:$port/printers"
 		options=""
 	fi
 	$runcups $VALGRIND ../tools/ipptool -tI $options $uri $file >> $strfile