diff --git a/git.spec b/git.spec index cc7f53c..4c7d9bf 100644 --- a/git.spec +++ b/git.spec @@ -257,6 +257,7 @@ BuildRequires: subversion-perl BuildRequires: tar BuildRequires: time BuildRequires: zip +BuildRequires: zstd %endif # endif with tests @@ -864,7 +865,7 @@ export GIT_TEST_SVN_HTTPD=true # Create tmpdir for test output and update GIT_TEST_OPTS # Also update GIT-BUILD-OPTIONS to keep make from any needless rebuilding -testdir=$(mktemp -d -p /tmp git-t.XXXX) +export testdir=$(mktemp -d -p /tmp git-t.XXXX) sed -i "s@^GIT_TEST_OPTS = .*@& --root=$testdir@" config.mak touch -r GIT-BUILD-OPTIONS ts sed -i "s@\(GIT_TEST_OPTS='.*\)'@\1 --root=$testdir'@" GIT-BUILD-OPTIONS diff --git a/print-failed-test-output b/print-failed-test-output index d0d63aa..4e65662 100644 --- a/print-failed-test-output +++ b/print-failed-test-output @@ -10,4 +10,17 @@ for exit_file in t/test-results/*.exit; do printf '\n%s\n%s\n%s\n' "$sep" "$out_file" "$sep" cat "$out_file" done + +# tar up test-results & $testdir, then print base64 encoded output +# +# copy $testdir contents to test-results to avoid absolute paths with tar +cp -a $testdir/* t/test-results/ +begin='-----BEGIN BASE64 MESSAGE-----' +end='-----END BASE64 MESSAGE-----' +printf '\n%s\n' 'test-results and trash directory output follows; decode via:' +printf '%s\n' "sed -n '/^${begin}$/,/^${end}$/{/^${begin}$/!{/^${end}$/!p}}' build.log | base64 -d >output.tar.zst" +printf '%s\n' "$begin" +tar -C t -cf - test-results/ | zstdmt -17 | base64 +printf '%s\n' "$end" + exit 1