chiark / gitweb /
test suite: tar up the artifacts, and name the tarball after the test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 13 Jul 2018 10:38:36 +0000 (11:38 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 13 Jul 2018 10:38:37 +0000 (11:38 +0100)
Naming the output after the test works around #903696.

tarring the whole lot up turns out to make it a lot smaller.
Before:
    $ du -sk ; du -sk --apparent-size
    1640    .
    853     .
After:
    236     .
    235     .

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
tests/lib

index f5078be3f9ce50290e7a1982feacfaf3e7e6d6dd..7f0c1ea36ad6bb86415e96406311354574568871 100644 (file)
@@ -1,3 +1,10 @@
+dgit (5.9+exp4~) experimental; urgency=medium
+
+  * test suite: tar up the artifacts, and name the tarball after
+    the test (to work around #903696).
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Fri, 13 Jul 2018 11:38:25 +0100
+
 dgit (5.9+exp3) experimental; urgency=medium
 
   * test suite: chmod a+r $AUTOPKGTEST explicitly.
index 4425bf6efc4834243aba3af4bb8c13e99eb1eaa1..40f1f0992e50080022aba595a39ea42dfab13ae1 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -420,20 +420,8 @@ t-save-artifacts () {
        if [ x"$artifacts" = x ]; then return; fi
        if [ x"tmp" = x ]; then return; fi
        : '(((((((((( t-save-artifacts ))))))))))'
-       cp -dR --preserve=links,timestamps "$tmp"/. "$artifacts"/.
-       chmod -R a+r -- "$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" \;
+       GZIP=-1v tar -C "$tmp" -zc -f "$artifacts/${0##*/}.tar.gz" \
+               --exclude=\*.tar .
        : ')))))))))) t-save-artifacts ))))))))))'
 }