X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/561a3557e7fa6c4ed693c3bb486d189a468a8080..2906182db398419a9c59a928b7ae73cf7c7aa307:/test/integration/framework diff --git a/test/integration/framework b/test/integration/framework index d5b68da84..9a114ae69 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -190,7 +190,7 @@ aptmark() { runapt apt-mark "$@"; } aptsortpkgs() { runapt apt-sortpkgs "$@"; } apt() { runapt apt "$@"; } apthelper() { runapt "${APTHELPERBINDIR}/apt-helper" "$@"; } -aptwebserver() { runapt "${APTWEBSERVERBINDIR}/aptwebserver" "$@"; } +aptwebserver() { runapt "${APTTESTHELPERSBINDIR}/aptwebserver" "$@"; } aptitude() { runapt aptitude "$@"; } aptextracttemplates() { runapt apt-extracttemplates "$@"; } aptinternalsolver() { runapt "${APTINTERNALSOLVER}" "$@"; } @@ -331,7 +331,7 @@ setupenvironment() { LIBRARYPATH="${APT_INTEGRATION_TESTS_LIBRARY_PATH:-"${BUILDDIRECTORY}/../apt-pkg"}" METHODSDIR="${APT_INTEGRATION_TESTS_METHODS_DIR:-"${BUILDDIRECTORY}/../methods"}" APTHELPERBINDIR="${APT_INTEGRATION_TESTS_LIBEXEC_DIR:-"${BUILDDIRECTORY}"}" - APTWEBSERVERBINDIR="${APT_INTEGRATION_TESTS_WEBSERVER_BIN_DIR:-"${BUILDDIRECTORY}/../test/interactive-helper"}" + APTTESTHELPERSBINDIR="${APT_INTEGRATION_TESTS_HELPERS_BIN_DIR:-"${BUILDDIRECTORY}/../test/interactive-helper"}" APTFTPARCHIVEBINDIR="${APT_INTEGRATION_TESTS_FTPARCHIVE_BIN_DIR:-"${BUILDDIRECTORY}/../ftparchive"}" APTINTERNALSOLVER="${APT_INTEGRATION_TESTS_INTERNAL_SOLVER:-"${BUILDDIRECTORY}/solvers/apt"}" APTDUMPSOLVER="${APT_INTEGRATION_TESTS_DUMP_SOLVER:-"${BUILDDIRECTORY}/solvers/dump"}" @@ -1053,6 +1053,12 @@ getreleaseversionfromsuite() { true; } getlabelfromsuite() { true; } getoriginfromsuite() { true; } getarchitecturesfromreleasefile() { echo "all $(getarchitectures)"; } +getnotautomaticfromsuite() { + case "$1" in + experimental|experimental2) echo "yes";; + esac +} +getbutautomaticupgradesfromsuite() { true; } aptftparchiverelease() { aptftparchive -qq release "$@" | sed -e '/0 Release$/ d' # remove the self reference @@ -1071,6 +1077,8 @@ generatereleasefiles() { local VERSION="$(getreleaseversionfromsuite $SUITE)" local LABEL="$(getlabelfromsuite $SUITE)" local ORIGIN="$(getoriginfromsuite $SUITE)" + local NOTAUTOMATIC="$(getnotautomaticfromsuite $SUITE)" + local BUTAUTOMATICUPGRADES="$(getbutautomaticupgradesfromsuite $SUITE)" aptftparchiverelease "$dir" \ -o APT::FTPArchive::Release::Suite="${SUITE}" \ -o APT::FTPArchive::Release::Codename="${CODENAME}" \ @@ -1078,11 +1086,9 @@ generatereleasefiles() { -o APT::FTPArchive::Release::Label="${LABEL}" \ -o APT::FTPArchive::Release::Origin="${ORIGIN}" \ -o APT::FTPArchive::Release::Version="${VERSION}" \ + -o APT::FTPArchive::Release::NotAutomatic="${NOTAUTOMATIC}" \ + -o APT::FTPArchive::Release::ButAutomaticUpgrades="${BUTAUTOMATICUPGRADES}" \ > "$dir/Release" - if [ "$SUITE" = "experimental" -o "$SUITE" = "experimental2" ]; then - sed -i '/^Date: / a\ -NotAutomatic: yes' "$dir/Release" - fi done else msgninfo "\tGenerate Release files for flat… " @@ -1296,7 +1302,7 @@ changetowebserver() { else shift fi - if test -x "${APTWEBSERVERBINDIR}/aptwebserver"; then + if test -x "${APTTESTHELPERSBINDIR}/aptwebserver"; then cd aptarchive local LOG="webserver.log" if ! aptwebserver --port 0 -o aptwebserver::fork=1 -o aptwebserver::portfile='aptwebserver.port' "$@" >$LOG 2>&1 ; then @@ -1394,7 +1400,20 @@ downloadfile() { } checkdiff() { - local DIFFTEXT="$(command diff -u "$@" 2>&1 | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')" + local TMPFILE1="${TMPWORKINGDIRECTORY}/rootdir/tmp/checkdiff.1.tmp" + local TMPFILE2="${TMPWORKINGDIRECTORY}/rootdir/tmp/checkdiff.2.tmp" + touch "$TMPFILE1" "$TMPFILE2" + if [ "$1" != '-' ]; then + sed -e '/^profiling:/ d' < "$1" >"$TMPFILE1" + else + TMPFILE1='-' + fi + if [ "$2" != '-' ]; then + sed -e '/^profiling:/ d' < "$2" >"$TMPFILE2" + else + TMPFILE2='-' + fi + local DIFFTEXT="$(command diff -u "$TMPFILE1" "$TMPFILE2" 2>&1 | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')" if [ -n "$DIFFTEXT" ]; then echo >&2 echo >&2 "$DIFFTEXT"