[apache2] 01/03: duplicate-module-load test: use $ADTTMP

Stefan Fritsch sf at moszumanska.debian.org
Mon Mar 28 19:50:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository apache2.

commit 0ac69aece54211e2b16faeed9a8e12854740a477
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sun Mar 27 22:49:01 2016 +0200

    duplicate-module-load test: use $ADTTMP
---
 debian/tests/duplicate-module-load | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/debian/tests/duplicate-module-load b/debian/tests/duplicate-module-load
index 41ca45e..3d28471 100644
--- a/debian/tests/duplicate-module-load
+++ b/debian/tests/duplicate-module-load
@@ -1,5 +1,5 @@
 #!/bin/sh
-set -ex
+set -exu
 
 # Check to make sure that module loads haven't been duplicated.
 # Since this is potential minefield that could cause chaos, and a fix is
@@ -9,20 +9,18 @@ set -ex
 #   https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1251939
 #   https://issues.apache.org/bugzilla/show_bug.cgi?id=55787
 
-TEMPFILE0=$(mktemp)
-TEMPFILE1=$(mktemp)
-TEMPFILE2=$(mktemp)
+cd $ADTTMP
 
-apache2ctl -l -M > $TEMPFILE0
-sort $TEMPFILE0 > $TEMPFILE1
-if ! grep core.c $TEMPFILE1 ; then
+apache2ctl -l -M > unsorted
+sort unsorted > sorted
+if ! grep core.c sorted ; then
 	echo "core.c not found in apach2ctl output. apache2ctl broken?"
 	exit 1
 fi
 
-uniq < $TEMPFILE1 > $TEMPFILE2
+uniq < sorted > dedup
 
-if ! diff -u $TEMPFILE1 $TEMPFILE2 ; then
+if ! diff -u sorted dedup ; then
 	echo Duplicate module loads found
 	exit 1
 fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list