diff options
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/framework | 11 | ||||
-rwxr-xr-x | test/integration/test-apt-bug-718329-support-data.tar | 34 | ||||
-rwxr-xr-x | test/integration/test-apt-cli-list | 6 | ||||
-rwxr-xr-x | test/integration/test-apt-cli-search | 6 | ||||
-rwxr-xr-x | test/integration/test-apt-cli-show | 6 | ||||
-rwxr-xr-x | test/integration/test-apt-cli-upgrade | 7 | ||||
-rwxr-xr-x | test/integration/test-apt-get-source | 2 | ||||
-rwxr-xr-x | test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted | 2 | ||||
-rwxr-xr-x | test/integration/test-sourceslist-arch-plusminus-options | 2 | ||||
-rwxr-xr-x | test/integration/test-ubuntu-bug-346386-apt-get-update-paywall | 2 |
10 files changed, 71 insertions, 7 deletions
diff --git a/test/integration/framework b/test/integration/framework index 08d796a10..99214ef73 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -377,6 +377,7 @@ buildsimplenativepackage() { local SECTION="${7:-others}" local PRIORITY="${8:-optional}" local FILE_TREE="$9" + local COMPRESS_TYPE="${10:-gzip}" local DISTSECTION if [ "$SECTION" = "$(echo "$SECTION" | cut -d'/' -f 2)" ]; then DISTSECTION="main" @@ -442,7 +443,7 @@ Package: $NAME" >> ${BUILDDIR}/debian/control local LOG="${BUILDDIR}/../${NAME}_${VERSION}_${arch}.dpkg-deb.log" # ensure the right permissions as dpkg-deb ensists chmod 755 ${BUILDDIR}/debian/tmp/DEBIAN - if ! dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. >$LOG 2>&1; then + if ! dpkg-deb -Z${COMPRESS_TYPE} --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. >$LOG 2>&1; then cat $LOG false fi @@ -934,6 +935,10 @@ changetocdrom() { downloadfile() { PROTO="$(echo "$1" | cut -d':' -f 1)" + if [ ! -x "${METHODSDIR}/${PROTO}" ]; then + msgwarn "can not find ${METHODSDIR}/${PROTO}" + return 1 + fi local DOWNLOG="${TMPWORKINGDIRECTORY}/download.log" rm -f "$DOWNLOG" touch "$DOWNLOG" @@ -947,7 +952,7 @@ URI: $1 Filename: ${2} " # simple worker keeping stdin open until we are done (201) or error (400) - # and requesting new URIs on try-agains/redirects inbetween + # and requesting new URIs on try-agains/redirects in-between { tail -n 999 -f "$DOWNLOG" & echo "TAILPID: $!"; } | while read f1 f2; do if [ "$f1" = 'TAILPID:' ]; then TAILPID="$f2" @@ -962,7 +967,7 @@ Filename: ${2} break fi done - } | LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/methods/${PROTO} 2>&1 | tee "$DOWNLOG" + } | LD_LIBRARY_PATH=${BUILDDIRECTORY} ${METHODSDIR}/${PROTO} 2>&1 | tee "$DOWNLOG" rm "$DOWNLOG" # only if the file exists the download was successful if [ -e "$2" ]; then diff --git a/test/integration/test-apt-bug-718329-support-data.tar b/test/integration/test-apt-bug-718329-support-data.tar new file mode 100755 index 000000000..5cfb31917 --- /dev/null +++ b/test/integration/test-apt-bug-718329-support-data.tar @@ -0,0 +1,34 @@ +#!/bin/sh +set -e + +test_process_package_with_compression() { + COMPRESSOR="$1" + DATA_TAR="$2" + + msgtest "Testing apt-ftparchive with compression type: $COMPRESSOR" + + buildsimplenativepackage 'pkg' 'all' '1.0' '' '' 'some descr' '' '' '' "$COMPRESSOR" + testequal "debian-binary +control.tar.gz +$DATA_TAR" ar t incoming/pkg_1.0_all.deb + + testequal "Package: pkg" echo "$(aptftparchive packages incoming/|grep ^Package)" + + testequal "usr/bin/pkg-all pkg +usr/share/doc/pkg/FEATURES pkg +usr/share/doc/pkg/changelog pkg +usr/share/doc/pkg/copyright pkg" aptftparchive contents incoming/ + + rm -rf incoming/* +} + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +test_process_package_with_compression "gzip" "data.tar.gz" +test_process_package_with_compression "none" "data.tar" +test_process_package_with_compression "xz" "data.tar.xz" + + + diff --git a/test/integration/test-apt-cli-list b/test/integration/test-apt-cli-list index 47507aeb8..47cfb624a 100755 --- a/test/integration/test-apt-cli-list +++ b/test/integration/test-apt-cli-list @@ -7,6 +7,12 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture "i386" +if [ ! -x ${BUILDDIRECTORY}/apt ]; then + msgmsg "No ${BUILDDIRECTORY}/apt" + msgskip + exit 0 +fi + insertpackage 'unstable' 'foo' 'all' '1.0' insertinstalledpackage 'bar' 'i386' '1.0' diff --git a/test/integration/test-apt-cli-search b/test/integration/test-apt-cli-search index 979aff880..84650b366 100755 --- a/test/integration/test-apt-cli-search +++ b/test/integration/test-apt-cli-search @@ -7,6 +7,12 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture "i386" +if [ ! -x ${BUILDDIRECTORY}/apt ]; then + msgmsg "No ${BUILDDIRECTORY}/apt" + msgskip + exit 0 +fi + DESCR='Some description that has a unusual word xxyyzz and aabbcc' DESCR2='Some other description with the unusual aabbcc only' insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR" diff --git a/test/integration/test-apt-cli-show b/test/integration/test-apt-cli-show index 91cc9a3c0..4c8e134d6 100755 --- a/test/integration/test-apt-cli-show +++ b/test/integration/test-apt-cli-show @@ -7,6 +7,12 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture "i386" +if [ ! -x ${BUILDDIRECTORY}/apt ]; then + msgmsg "No ${BUILDDIRECTORY}/apt" + msgskip + exit 0 +fi + DESCR='Some description That has multiple lines' insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR" diff --git a/test/integration/test-apt-cli-upgrade b/test/integration/test-apt-cli-upgrade index 21ce69413..b6ee2270b 100755 --- a/test/integration/test-apt-cli-upgrade +++ b/test/integration/test-apt-cli-upgrade @@ -7,6 +7,13 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture "i386" +if [ ! -x ${BUILDDIRECTORY}/apt ]; then + msgmsg "No ${BUILDDIRECTORY}/apt" + msgskip + exit 0 +fi + + insertpackage 'unstable' 'foo' 'all' '2.0' 'Depends: foo-new-dependency' insertpackage 'unstable' 'foo-new-dependency' 'all' '2.0' insertinstalledpackage 'foo' 'all' '1.0' diff --git a/test/integration/test-apt-get-source b/test/integration/test-apt-get-source index 083e26db1..33bd980d0 100755 --- a/test/integration/test-apt-get-source +++ b/test/integration/test-apt-get-source @@ -65,7 +65,7 @@ Need to get 0 B of source archives. 'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo=1.0 # select by release with no binary package (Bug#731102) but ensure to get -# higest version +# highest version testequal "$HEADER Selected version '0.1' (wheezy) for foo Need to get 0 B of source archives. diff --git a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted index 633c197c0..f93510fd7 100755 --- a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted +++ b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted @@ -11,7 +11,7 @@ buildsimplenativepackage 'cool' 'i386' '1.0' 'unstable' setupaptarchive --no-update testfileexists() { - msgtest 'Test for existance of file' "$1" + msgtest 'Test for existence of file' "$1" test -e "$1" && msgpass || msgfail rm -f "$1" } diff --git a/test/integration/test-sourceslist-arch-plusminus-options b/test/integration/test-sourceslist-arch-plusminus-options index 0d4d7448f..0091964e6 100755 --- a/test/integration/test-sourceslist-arch-plusminus-options +++ b/test/integration/test-sourceslist-arch-plusminus-options @@ -76,7 +76,7 @@ echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > testbinaries 'substract from a arch-set' 'i386' echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'useless substract from a arch-set' 'i386' +testbinaries 'useless subtract from a arch-set' 'i386' echo 'deb [arch=mips,i386 arch+=armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list testbinaries 'addition to a arch-set' 'i386' 'mips' 'armhf' diff --git a/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall b/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall index 1576c396c..7112d2b45 100755 --- a/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall +++ b/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall @@ -22,7 +22,7 @@ Config-Item: Acquire::http::DependOnSTDIN=0 600 Acquire URI URI: http://localhost:8080/holygrail Filename: knights-talking -' | http >/dev/null 2>&1 && msgpass || msgfail +' | ${METHODSDIR}/http >/dev/null 2>&1 && msgpass || msgfail testfileequal knights-talking 'ni ni ni' ensure_n_canary_strings_in_dir() { |