summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-10-08 10:47:09 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-10-08 10:47:09 +0200
commit2e8e5aaca4e51737e5a3a56c140d6817251bf0f7 (patch)
tree1b1224e9b55d4e7f0002feeba51711912d8fb314 /test/integration/framework
parentd667daf3e6ba5bfc7feb8a5ed0a0bd2d1febde4d (diff)
parent536fdb8823fdec24c26d984317b8162237c427c3 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: configure.ac debian/changelog
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"