diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-12 12:57:32 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-12 13:44:42 +0100 |
commit | 45fad9bad87765ce13511a0ba8f302ba9ddd1cd5 (patch) | |
tree | e50d38e6f4a71b6b8ee4f5306109a0a4d6221a14 | |
parent | c6d53e75432183e55ed0144465101968ea01511f (diff) |
test suite: Save much stuff to $AUTOPKGTEST_ARTIFACTS.
We take some care to make this of reasonable size. In particular,
we delete raw tarballs (typically, IMPORT) and .git's sample hooks.
And, we git gc the git trees.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | tests/lib | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 90b157c..dee2b95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ dgit (5.9+exp1) experimental; urgency=medium * test suite: Use dch -r -D sid '' not dch -r sid. Closes:#903441. + * test suite: Save much stuff to $AUTOPKGTEST_ARTIFACTS. -- @@ -17,6 +17,8 @@ funcs: ${FUNCNAME[*]} lines: ${BASH_LINENO[*]} files: ${BASH_SOURCE[*]} END + t-save-artifacts + exit 16 } @@ -409,9 +411,31 @@ t-fscks () { t-ok () { : '========================================' t-fscks + t-save-artifacts echo ok. } +t-save-artifacts () { + artifacts="$AUTOPKGTEST_ARTIFACTS" + if [ x"$artifacts" = x ]; then return; fi + if [ x"tmp" = x ]; then return; fi + : '(((((((((( t-save-artifacts ))))))))))' + cp -a "$tmp"/. "$artifacts"/. + cd "$artifacts"/. + find . \( -name \*.tar -o -name \*.sample \) -print0 | \ + xargs -0r rm -v + find . \( -name .git \ + -o -path ./salsa/\* \ + -o -path ./git/\*.git \ + \) -type d \ + \! -path '*/.git/*/.git' -exec sh -xec ' + cd "$1" + "$2"/playtree-save-refs + git gc --prune=all + ' x '{}' "$troot" \; + : ')))))))))) t-save-artifacts ))))))))))' +} + t-rm-dput-dropping () { rm -f $tmp/${p}_${v}_*.upload } |