summaryrefslogtreecommitdiff
path: root/debian/patches/tests-make-lpstat-call-reproducible.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/tests-make-lpstat-call-reproducible.patch')
-rw-r--r--debian/patches/tests-make-lpstat-call-reproducible.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/tests-make-lpstat-call-reproducible.patch b/debian/patches/tests-make-lpstat-call-reproducible.patch
new file mode 100644
index 000000000..0492ff066
--- /dev/null
+++ b/debian/patches/tests-make-lpstat-call-reproducible.patch
@@ -0,0 +1,43 @@
+From 9a4a23d0159426e0acace73125058f1bb6049a1c Mon Sep 17 00:00:00 2001
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:22 +0200
+Subject: Force LC_ALL=C environment variable when grepping the output of
+ lpstat.
+
+ Permits testing in non-"C" environments.
+Origin: vendor
+Last-Update: 2016-07-11
+Patch-Name: tests-make-lpstat-call-reproducible.patch
+---
+ test/run-stp-tests.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
+index 9fb9dc629..e4bd006a9 100755
+--- a/test/run-stp-tests.sh
++++ b/test/run-stp-tests.sh
+@@ -725,7 +725,7 @@ fi
+ IPP_PORT=$port; export IPP_PORT
+
+ while true; do
+- running=`../systemv/lpstat -r 2>/dev/null`
++ running=`LC_ALL=C ../systemv/lpstat -r 2>/dev/null`
+ if test "x$running" = "xscheduler is running"; then
+ break
+ fi
+@@ -838,13 +838,13 @@ kill -HUP $cupsd
+ while true; do
+ sleep 10
+
+- running=`../systemv/lpstat -r 2>/dev/null`
++ running=`LC_ALL=C ../systemv/lpstat -r 2>/dev/null`
+ if test "x$running" = "xscheduler is running"; then
+ break
+ fi
+ done
+
+-description="`../systemv/lpstat -l -p Test1 | grep Description | sed -e '1,$s/^[^:]*: //g'`"
++description="`LC_ALL=C ../systemv/lpstat -l -p Test1 | grep Description | sed -e '1,$s/^[^:]*: //g'`"
+ if test "x$description" != "xTest Printer 1"; then
+ echo "Failed, printer-info for Test1 is '$description', expected 'Test Printer 1'." >>$strfile
+ echo "FAIL (got '$description', expected 'Test Printer 1')"