summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-09-25 11:52:41 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-25 15:23:14 +0200
commit5f982b9d903b38bb5549479f0111d31e2695090c (patch)
tree037ab35124ca228d370cccde360a8709ba1651f6 /test/integration/framework
parentb0f4b486e6850c5f98520ccf19da71d0ed748ae4 (diff)
rewrite compressed indexes test to check with all compressors
Git-Dch: Ignore
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/integration/framework b/test/integration/framework
index ff010a5c4..7923e23d9 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -339,6 +339,36 @@ configcompression() {
done > ${TMPWORKINGDIRECTORY}/rootdir/etc/testcase-compressor.conf
}
+forcecompressor() {
+ COMPRESSOR="$1"
+ COMPRESSOR_CMD="$1"
+ case $COMPRESSOR in
+ gzip) COMPRESS='gz';;
+ bzip2) COMPRESS='bz2';;
+ lzma) COMPRESS='lzma';;
+ xz) COMPRESS='xz';;
+ *) msgdie "Compressor $COMPRESSOR is unknown to framework, so can't be forced by forcecompressor!";;
+ esac
+ local CONFFILE="${TMPWORKINGDIRECTORY}/rootdir/etc/apt/apt.conf.d/00force-compressor"
+ echo "Acquire::CompressionTypes::Order { \"${COMPRESS}\"; };
+Dir::Bin::uncompressed \"/does/not/exist\";
+Dir::Bin::gzip \"/does/not/exist\";
+Dir::Bin::bzip2 \"/does/not/exist\";
+Dir::Bin::lzma \"/does/not/exist\";
+Dir::Bin::xz \"/does/not/exist\";" > "$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
+ fi
+}
+
setupsimplenativepackage() {
local NAME="$1"
local ARCH="$2"