Tests: Use 127.0.0.1 instead of localhost to help pbuilder

This should make the test-suite work in pbuilder. It apparently also fixes an
ipp backend problem in the test-suite.

Origin: vendor
Patch-Name: tests-use-ipv4-lo-address.patch

Gbp-Pq: Name 0014-Tests-Use-127.0.0.1-instead-of-localhost-to-help-pbu.patch
This commit is contained in:
Didier Raboud 2016-08-09 18:11:21 +02:00 committed by openKylinBot
parent 03be3daee9
commit a6f316bc45
2 changed files with 6 additions and 6 deletions

View File

@ -52,8 +52,8 @@ echo ""
echo "Add Shared Printer Test" echo "Add Shared Printer Test"
echo "" echo ""
echo " lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m everywhere" 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://localhost:$IPP_PORT/printers/Test2 -m everywhere 2>&1 $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 if test $? != 0; then
echo " FAILED" echo " FAILED"
exit 1 exit 1

View File

@ -490,7 +490,7 @@ fi
cat >$BASE/cupsd.conf <<EOF cat >$BASE/cupsd.conf <<EOF
StrictConformance Yes StrictConformance Yes
Browsing Off Browsing Off
Listen localhost:$port Listen 127.0.0.1:$port
Listen $BASE/sock Listen $BASE/sock
MaxSubscriptions 3 MaxSubscriptions 3
MaxLogSize 0 MaxLogSize 0
@ -617,7 +617,7 @@ fi
# These get exported because they don't have side-effects... # These get exported because they don't have side-effects...
CUPS_DISABLE_APPLE_DEFAULT=yes; export CUPS_DISABLE_APPLE_DEFAULT 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_SERVERROOT=$BASE; export CUPS_SERVERROOT
CUPS_STATEDIR=$BASE; export CUPS_STATEDIR CUPS_STATEDIR=$BASE; export CUPS_STATEDIR
CUPS_DATADIR=$BASE/share; export CUPS_DATADIR 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 echo $ac_n "`date '+[%d/%b/%Y:%H:%M:%S %z]'` $ac_c" >>$strfile
if test $file = ../examples/ipp-2.1.test; then 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" options="-V 2.1 -d NOPRINT=1 -f testfile.ps"
else else
uri="ipp://localhost:$port/printers" uri="ipp://127.0.0.1:$port/printers"
options="" options=""
fi fi
$runcups $VALGRIND ../tools/ipptool -tI $options $uri $file >> $strfile $runcups $VALGRIND ../tools/ipptool -tI $options $uri $file >> $strfile