summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-01-08 00:35:39 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-01-08 15:40:01 +0100
commitabec2980ef1ff051be14c26097a76b6429b3b7bc (patch)
treeb858e69681076ad12875577749ee0b8d0b1decb8 /test/integration
parent0179cfa83cf0042235eda41db7f35c420781c63e (diff)
support '-' and no parameter for stdin in apt-helper cat-file
This way it works more similar to the compressor binaries, which we can relief in this way from their job in the test framework avoiding the need of adding e.g. liblz4-tool to the test dependencies.
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/framework24
1 files changed, 5 insertions, 19 deletions
diff --git a/test/integration/framework b/test/integration/framework
index c97500ffd..430ee552d 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -520,13 +520,13 @@ EOF
testsuccess --nomsg gcc -Wall -fPIC -shared -o noopchroot.so noopchroot.c -ldl
}
configcompression() {
+ local CMD='apthelper cat-file -C'
while [ -n "$1" ]; do
case "$1" in
'.') printf ".\t.\tcat\n";;
- 'gz') printf "gzip\tgz\tgzip\n";;
- 'bz2') printf "bzip2\tbz2\tbzip2\n";;
- 'lzma') printf "lzma\tlzma\txz --format=lzma\n";;
- *) printf "$1\t$1\t$1\n";;
+ 'gz') printf "gzip\tgz\t$CMD $1\n";;
+ 'bz2') printf "bzip2\tbz2\t$CMD $1\n";;
+ *) printf "$1\t$1\t$CMD $1\n";;
esac
shift
done > "${TMPWORKINGDIRECTORY}/rootdir/etc/testcase-compressor.conf"
@@ -550,7 +550,7 @@ confighashes() {
forcecompressor() {
COMPRESSOR="$1"
COMPRESS="$1"
- COMPRESSOR_CMD="$1"
+ COMPRESSOR_CMD="apthelper cat-file -C $1"
case $COMPRESSOR in
gzip) COMPRESS='gz';;
bzip2) COMPRESS='bz2';;
@@ -558,20 +558,6 @@ forcecompressor() {
local CONFFILE="${TMPWORKINGDIRECTORY}/rootdir/etc/apt/apt.conf.d/00force-compressor"
echo "Acquire::CompressionTypes::Order { \"${COMPRESS}\"; };
Dir::Bin::uncompressed \"/does/not/exist\";" > "$CONFFILE"
- for COMP in $(aptconfig dump APT::Compressor --format '%t %v%n' | sed -n 's#^Name \([^.].\+\)$#\1#p'); do
- echo "Dir::Bin::${COMP} \"/does/not/exist\";"
- done >> "$CONFFILE"
- if [ -e "/bin/${COMPRESSOR}" ]; then
- echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> "$CONFFILE"
- elif [ -e "/usr/bin/${COMPRESSOR}" ]; then
- echo "Dir::Bin::${COMPRESSOR} \"/usr/bin/${COMPRESSOR}\";" >> "$CONFFILE"
- elif [ "${COMPRESSOR}" = 'lzma' ]; then
- echo 'Dir::Bin::xz "/usr/bin/xz";' >> "$CONFFILE"
- COMPRESSOR_CMD='xz --format=lzma'
- else
- msgtest 'Test for availability of compressor' "${COMPRESSOR}"
- msgfail "${COMPRESSOR} not available"
- fi
}
setupsimplenativepackage() {