Commit e378ffa6 authored by Bernhard Link's avatar Bernhard Link

[testsuite] add more macros for database operation output (tracking)

parent f13c8fa4
......@@ -183,7 +183,7 @@ $(opd 'documentation' unset test main source dsc)
-v6*= replacing './dists/test/main/binary-coal/Packages' (uncompressed,gzipped)
-v6*= looking for changes in 'test|main|source'...
-v6*= replacing './dists/test/main/source/Sources' (gzipped)
-d1*=db: 'documentation' '9876AD' removed from tracking.db(test).
$(otd 'documentation' '9876AD' 'test')
-v0*=Deleting files no longer referenced...
$(ofd 'pool/main/d/documentation/documentation_9876AD.dsc')
$(ofd 'pool/main/d/documentation/documentation_9876AD.tar.gz')
......@@ -330,7 +330,7 @@ $(opd 'documentation' unset test main source dsc)
-v6*= replacing './dists/test/main/binary-coal/Packages' (uncompressed,gzipped)
-v6*= looking for changes in 'test|main|source'...
-v6*= replacing './dists/test/main/source/Sources' (gzipped)
-d1*=db: 'documentation' '9876AD' removed from tracking.db(test).
$(otd 'documentation' '9876AD' 'test')
-v0*=Deleting files no longer referenced...
$(ofd 'pool/main/d/documentation/documentation_9876AD_source+all.changes')
$(ofd 'pool/main/d/documentation/documentation_9876AD_coal+all.log')
......
......@@ -183,6 +183,14 @@ odb() {
printf -- '-v2*=Created directory "./db"'
}
otd() {
local name="$1" version="$2" codename="$3"
printf -- "-d1*=db: '%s' '%s' removed from tracking.db(%s)." "$name" "$version" "$codename"
}
ottd() {
local name="$1" version="$2" codename="$3"
printf -- "-t1*=db: '%s' '%s' removed from tracking.db(%s)." "$name" "$version" "$codename"
}
ota() {
printf -- "-d1*=db: '%s' added to tracking.db(%s)." "$2" "$1"
}
......@@ -194,9 +202,9 @@ ofa() {
}
ofd() {
if ${2:-true} ; then
printf -- '-v1*=deleting and forgetting %s\n' "$1"
printf -- "-v1${3-*}"'=deleting and forgetting %s\n' "$1"
fi
printf -- "-d1*=db: '%s' removed from checksums.db(pool)." "$1"
printf -- "-d1${3-*}=db: '%s' removed from checksums.db(pool)." "$1"
}
opa() {
local name="$1" version="$2" codename="$3" component="$4" arch="$5" type="$6" u=""
......
......@@ -64,7 +64,7 @@ stderr
*='pool/something/a/aa/aa_1-1.dsc' has refcount > 0, but was nowhere found.
*='pool/something/a/aa/aa_1-1.tar.gz' has refcount > 0, but was nowhere found.
stdout
-d1*=db: 'aa' '1-1' removed from tracking.db(breakme).
$(otd 'aa' '1-1' 'breakme')
-v1*=4 files lost their last reference.
-v1*=(dumpunreferenced lists such files, use deleteunreferenced to delete them.)
EOF
......
......@@ -1494,8 +1494,8 @@ sed -i -e 's/^Tracking: keep/Tracking: all/' conf/distributions
testrun - -b . tidytracks 3<<EOF
stdout
-v0*=Looking for old tracks in test1...
-d1*=db: 'testb' '1:2-2' removed from tracking.db(test1).
-d1*=db: 'bloat+-0a9z.app' '99:0.9-A:Z+a:z-0+aA.9zZ' removed from tracking.db(test1).
$(otd 'testb' '1:2-2' 'test1')
$(otd 'bloat+-0a9z.app' '99:0.9-A:Z+a:z-0+aA.9zZ' 'test1')
-v0*=Deleting files no longer referenced...
$(ofd 'pool/ugly/b/bloat+-0a9z.app/bloat+-0a9z.app-addons_0.9-A:Z+a:z-0+aA.9zZ_all.deb')
$(ofd 'pool/ugly/b/bloat+-0a9z.app/bloat+-0a9z.app_0.9-A:Z+a:z-0+aA.9zZ_abacus.deb')
......
......@@ -276,7 +276,7 @@ $(opu 'aa-addons' x x 'a' 'all' 'abacus' 'deb')
$(opu 'aa' x x 'a' 'all' 'abacus' 'deb')
$(opu 'aa' x x 'a' 'all' 'source' 'dsc')
$(otta 'a' 'aa')
-t1*=db: 'aa' '1-1' removed from tracking.db(a).
$(ottd 'aa' '1-1' 'a')
-v0*=Exporting indices...
-v2*=Created directory "./dists/a"
-v2*=Created directory "./dists/a/all"
......@@ -366,7 +366,7 @@ $(opu 'aa-addons' x x 'a' 'all' 'abacus' 'deb')
$(opu 'aa' x x 'a' 'all' 'abacus' 'deb')
$(opu 'aa' x x 'a' 'all' 'source' 'dsc')
$(otta 'a' 'aa')
-t1*=db: 'aa' '1-2' removed from tracking.db(a).
$(ottd 'aa' '1-2' 'a')
-v0*=Deleting files no longer referenced...
$(ofd 'pool/all/a/aa/aa_1-2.dsc')
$(ofd 'pool/all/a/aa/aa_1-2.tar.gz')
......@@ -591,7 +591,7 @@ $(ofa 'pool/all/a/ab/ab_3-1.tar.gz')
$(ofa 'pool/all/a/ab/ab_3-1.diff.gz')
$(ofa 'pool/all/a/ab/ab_3-1.dsc')
$(opu 'ab' x x 'a' 'all' 'source' 'dsc')
-t1*=db: 'ab' '2-1' removed from tracking.db(a).
$(ottd 'ab' '2-1' 'a')
-v0*=Deleting files just added to the pool but not used.
-v0*=(to avoid use --keepunusednewfiles next time)
$(ofd 'pool/all/a/ab/ab_3-1.diff.gz')
......@@ -623,8 +623,7 @@ EOF
dodiff /dev/null results || dodiff results.expected results
testrun - -b . deleteunreferenced 3<<EOF
stdout
-v1=deleting and forgetting pool/all/a/ab/ab_3-1.diff.gz
-d1=db: 'pool/all/a/ab/ab_3-1.diff.gz' removed from checksums.db(pool).
$(ofd 'pool/all/a/ab/ab_3-1.diff.gz' true '')
EOF
DISTRI=b PACKAGE=ac EPOCH="" VERSION=1 REVISION="-1" SECTION="stupid/base" genpackage.sh
......@@ -818,7 +817,7 @@ stdout
$(opd 'ab-addons' x a all abacus deb)
$(opd 'ab' x a all abacus deb)
$(opd 'ab' x a all source dsc)
-t1*=db: 'ab' '3-1' removed from tracking.db(a).
$(ottd 'ab' '3-1' 'a')
-v0*=Exporting indices...
-v6*= looking for changes in 'a|all|abacus'...
-v6*= replacing './dists/a/all/binary-abacus/Packages' (uncompressed,gzipped)
......@@ -847,7 +846,7 @@ stdout
$(opd 'ab-addons' unset a all abacus deb)
$(opd 'ab' unset a all abacus deb)
$(opd 'ab' unset a all source deb)
-t1*=db: 'ab' '3-1' removed from tracking.db(a).
$(ottd 'ab' '3-1' 'a')
-v0*=Exporting indices...
-v6*= looking for changes in 'a|all|abacus'...
-v6*= replacing './dists/a/all/binary-abacus/Packages' (uncompressed,gzipped)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment