X-Git-Url: http://git.hcoop.net/ntk/apt.git/blobdiff_plain/89d88ac3ef3f82fdfeac6d8d231deddeeb0f02e9..f920cbe8527ce523974da2563ca1165790c1d40e:/test/integration/test-bug-618288-multiarch-same-lockstep diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep dissimilarity index 62% index 7333054c..536124c2 100755 --- a/test/integration/test-bug-618288-multiarch-same-lockstep +++ b/test/integration/test-bug-618288-multiarch-same-lockstep @@ -1,45 +1,38 @@ -#!/bin/sh -set -e - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework -setupenvironment -configarchitecture 'amd64' 'i386' - -insertinstalledpackage 'libsame' 'i386,amd64' '1' 'Multi-Arch: same' 'required' -insertinstalledpackage 'apt' 'i386' '1' 'Depends: libsame (= 1) -Essential: yes' 'required' -insertinstalledpackage 'apt2' 'amd64' '1' 'Depends: libsame (= 1) -Essential: yes' 'required' -buildsimplenativepackage 'libsame' 'i386,amd64' '2' 'unstable' 'Multi-Arch: same' '' 'required' -buildsimplenativepackage 'apt' 'i386' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' -buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' - -setupaptarchive - -# order in switch libsame:{amd64,i386} are unpacked is irrelevant, as both are installed - but we need to do it together -testequalor2 'Reading package lists... -Building dependency tree... -The following packages will be upgraded: - apt:i386 apt2 libsame libsame:i386 -4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. -Inst libsame:i386 [1] (2 unstable [i386]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:amd64 apt:i386 ] -Inst libsame [1] (2 unstable [amd64]) [apt2:amd64 apt:i386 ] -Conf libsame:i386 (2 unstable [i386]) [apt2:amd64 apt:i386 ] -Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ] -Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ] -Conf apt2 (2 unstable [amd64]) [apt:i386 ] -Inst apt:i386 [1] (2 unstable [i386]) -Conf apt:i386 (2 unstable [i386])' 'Reading package lists... -Building dependency tree... -The following packages will be upgraded: - apt:i386 apt2 libsame libsame:i386 -4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. -Inst libsame [1] (2 unstable [amd64]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:i386 apt2:amd64 ] -Inst libsame:i386 [1] (2 unstable [i386]) [apt2:amd64 apt:i386 ] -Conf libsame:i386 (2 unstable [i386]) [apt2:amd64 apt:i386 ] -Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ] -Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ] -Conf apt2 (2 unstable [amd64]) [apt:i386 ] -Inst apt:i386 [1] (2 unstable [i386]) -Conf apt:i386 (2 unstable [i386])' aptget dist-upgrade -s +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertinstalledpackage 'libsame' 'i386,amd64' '1' 'Multi-Arch: same' 'required' +insertinstalledpackage 'apt' 'i386' '1' 'Depends: libsame (= 1) +Essential: yes' 'required' +insertinstalledpackage 'apt2' 'amd64' '1' 'Depends: libsame (= 1) +Essential: yes' 'required' +buildsimplenativepackage 'libsame' 'i386,amd64' '2' 'unstable' 'Multi-Arch: same' '' 'required' +buildsimplenativepackage 'apt' 'i386' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' +buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' + +setupaptarchive +testsuccess aptget dist-upgrade -s -o Debug::pkgPackageManager=1 + +# order in switch libsame:{amd64,i386} are unpacked is irrelevant, as both are installed - but we need to do it together +OUTPUT=rootdir/tmp/testsuccess.output +LS_U_AMD="$(grep -o -n '^Inst libsame ' $OUTPUT | cut -d: -f1)" +LS_U_INT="$(grep -o -n '^Inst libsame:i386 ' $OUTPUT | cut -d: -f1)" +LS_C_AMD="$(grep -o -n '^Conf libsame ' $OUTPUT | cut -d: -f1)" +LS_C_INT="$(grep -o -n '^Conf libsame:i386 ' $OUTPUT | cut -d: -f1)" + +msgtest 'Test if' 'libsame:amd64 unpack before configure' +test "$LS_U_AMD" -lt "$LS_C_AMD" && msgpass || msgfail + +msgtest 'Test if' 'libsame:i386 unpack before configure' +test "$LS_U_INT" -lt "$LS_C_INT" && msgpass || msgfail + +msgtest 'Test if' 'libsame:amd64 unpack is before libsame:i386 configure' +test "$LS_U_AMD" -lt "$LS_C_INT" && msgpass || msgfail + +msgtest 'Test if' 'libsame:i386 unpack is before libsame:amd64 configure' +test "$LS_U_INT" -lt "$LS_C_AMD" && msgpass || msgfail