]> git.saurik.com Git - apt.git/commitdiff
tests: use more 'native' instead of 'amd64' if possible
authorDavid Kalnischkies <david@kalnischkies.de>
Thu, 10 Sep 2015 19:10:17 +0000 (21:10 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 14 Sep 2015 13:22:18 +0000 (15:22 +0200)
The tests usually run on amd64 boxes, but once in a while I run it on a
(slow) armel box as well, which has its fair share of problems with some
tests, but at least the low hanging fruits can be dealt with: Do not
assume that amd64 is the native dpkg architecture – instead use whatever
dpkg thinks is native as architecture for the test.

Git-Dch: Ignore

test/integration/test-apt-move-and-forget-manual-sections
test/integration/test-apt-progress-fd-error
test/integration/test-apt-update-ims

index 845444f536f3975f89d106392f66450e5ccbc765..af9143dda224a89a1afdb88bdac38bdaaee8e2d4 100755 (executable)
@@ -4,14 +4,14 @@ set -e
 TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
-configarchitecture 'amd64'
+configarchitecture 'native'
 
 aptconfig dump --no-empty --format '%v%n' APT::Move-Autobit-Sections > move-autobit.sections
 testsuccess grep '^oldlibs$' move-autobit.sections
 
-buildsimplenativepackage 'libabc' 'amd64' '1' 'stable' '' '' 'libs'
-buildsimplenativepackage 'libabc' 'amd64' '2' 'unstable' 'Depends: libdef' '' 'oldlibs'
-buildsimplenativepackage 'libdef' 'amd64' '1' 'unstable' '' '' 'libs'
+buildsimplenativepackage 'libabc' 'native' '1' 'stable' '' '' 'libs'
+buildsimplenativepackage 'libabc' 'native' '2' 'unstable' 'Depends: libdef' '' 'oldlibs'
+buildsimplenativepackage 'libdef' 'native' '1' 'unstable' '' '' 'libs'
 setupaptarchive
 
 testmarkedauto
index 632300765529555df02e4bf3ac00f88169855a40..ccbb000c7fa237affb0a97c8281336c3b48712e0 100755 (executable)
@@ -5,23 +5,17 @@ TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 
 setupenvironment
-configarchitecture 'amd64' 'i386'
+configarchitecture 'native'
 
 mkdir -p usr/bin
 touch usr/bin/file-conflict
 
-buildsimplenativepackage 'foo1' 'amd64,i386' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
-buildsimplenativepackage 'foo2' 'amd64,i386' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
+buildsimplenativepackage 'foo1' 'native' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
+buildsimplenativepackage 'foo2' 'native' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
 
-setupaptarchive 
+setupaptarchive
 
 exec 3> apt-progress.log
 testfailure aptget install foo1 foo2 -y -o APT::Status-Fd=3
-msgtest "Ensure correct error message"
-if grep -q "aptarchive/pool/foo2_0.8.15_amd64.deb:36.3636:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log; then
-       msgpass
-else
-       cat apt-progress.log
-       msgfail
-fi
-
+msgtest 'Ensure correct error message'
+testsuccess --nomsg grep "aptarchive/pool/foo2_0.8.15_[^.]\+.deb:36.3636:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log
index ed89cd3429439482e775868e69f6811d821bc550..80ef28093bc1d9b71c559818bf303af48949808b 100755 (executable)
@@ -25,7 +25,7 @@ runtest() {
     $TEST aptget update
     if [ "$1" = 'failure' ]; then
        # accept the outdated Release file so we can check Hit behaviour
-       "test${2:-success}" aptget update -o Acquire::Min-ValidTime=99999999999
+       "test${2:-success}" aptget update -o Acquire::Min-ValidTime=9999999
     fi
     listcurrentlistsdirectory > listsdir.lst
     testsuccess grep '_Packages\(\.gz\)\?$' listsdir.lst