diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-11-06 20:40:04 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-11-06 21:32:41 +0000 |
commit | 1b72149044ab77e11215ab4780daa981c5c03225 (patch) | |
tree | 28c1c8bb9b148f51ff233842e82cfa0b0f0a594a | |
parent | eed6fc8ddef77d691bfb4cd1e02a53045b25814d (diff) |
Test suite: Introduce $t_archive_method
* Indirect t-archive-none and t-archive-query via this variable
* Rename t-archive-updated; it is for callers that have updated
aq/package.$suite.$p. There is one out-of-lib caller.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | tests/lib | 19 | ||||
-rwxr-xr-x | tests/tests/inarchivecopy | 2 |
2 files changed, 16 insertions, 5 deletions
@@ -65,6 +65,7 @@ incoming = $tmp/incoming run_dinstall = 0 END +: ${t_archive_method:=aq} : ${tagpfx:=archive/test-dummy} : ${suitespecs:=sid:unstable} @@ -226,6 +227,9 @@ t-prep-newpackage () { t-archive-none () { t-select-package $1 + t-archive-none-$t_archive_method +} +t-archive-none-aq () { mkdir -p $tmp/aq/dsc_in_suite $tmp/mirror/pool/main : >$tmp/aq/suites @@ -237,10 +241,10 @@ t-archive-none () { local sname=${suitespec#*:} >$tmp/aq/package.$suite.$p - t-archive-updated $suite $p + t-aq-archive-updated $suite $p >$tmp/aq/package.new.$p - t-archive-updated new $p + t-aq-archive-updated new $p ln -sf $suite $tmp/aq/dsc_in_suite/$sname @@ -267,7 +271,7 @@ END END } -t-archive-updated () { +t-aq-archive-updated () { local suite=$1 local p=$2 local suitedir=$tmp/aq/dsc_in_suite/$suite @@ -299,9 +303,16 @@ t-archive-process-incoming () { t-archive-query () { local suite=${1-sid} local dscf=main/${p}_${v}.dsc + t-archive-query-$t_archive_method "$suite" "$p" "$v" "$dscf" +} +t-archive-query-aq () { + local suite=$1 + local p=$2 + local v=$3 + local dscf=$4 local sha=`sha256sum <$tmp/mirror/pool/$dscf` echo "${v} ${sha% -} $dscf" >>$tmp/aq/package.$suite.${p} - t-archive-updated $suite $p + t-aq-archive-updated $suite $p } t-archive () { diff --git a/tests/tests/inarchivecopy b/tests/tests/inarchivecopy index 632d420..b34ba33 100755 --- a/tests/tests/inarchivecopy +++ b/tests/tests/inarchivecopy @@ -14,7 +14,7 @@ t-inarchive-copy () { local from=${2:-sid} local to=${3:-stable} egrep "^${vm//./\\.}" aq/package.$from.$p >>aq/package.$to.$p - t-archive-updated $to $p + t-aq-archive-updated $to $p } copy-check-good () { |