summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-08-05 20:14:38 +0100
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-08-05 20:35:03 +0100
commitacc048b4ee9aea7dc90395a091b0de5968047268 (patch)
treed26085725bc7abd4284da66af500685c6231575f /tests
parent235ed194d7a3094db7f9e2e4d93c5b1750f55e3a (diff)
downloadlorry-acc048b4ee9aea7dc90395a091b0de5968047268.tar.gz
lorry: Only log number of commits pruned from marks files
Logging each pruned commit can result in very long logs for some repositories. This is a problem for Lorry Controller because job status updates result in copying the entire log and not just the new log lines. There's not much value in listing all the commit hashes, so log the number of commits instead. Update the test case accordingly.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/hg-unnamed-head.script3
-rw-r--r--tests/hg-unnamed-head.stdout2
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/hg-unnamed-head.script b/tests/hg-unnamed-head.script
index fa2693f..512938f 100755
--- a/tests/hg-unnamed-head.script
+++ b/tests/hg-unnamed-head.script
@@ -26,6 +26,7 @@ workdir="$DATADIR/work-dir"
"${SRCDIR}/test-lorry" --verbose --pull-only --log="$logfile" --working-area="$workdir" \
"$DATADIR/hg-test-repo.lorry" > /dev/null 2> /dev/null
+grep -o 'pruned [0-9]* unreachable commit' < "$logfile" || true
# verify that the git repository was created correctly
(
@@ -48,4 +49,4 @@ workdir="$DATADIR/work-dir"
# that this involves pruning an unreachable commit
"${SRCDIR}/test-lorry" --verbose --pull-only --log="$logfile" --working-area="$workdir" \
"$DATADIR/hg-test-repo.lorry" > /dev/null 2> /dev/null
-grep -c 'pruning unreachable commit' < "$logfile"
+grep -o 'pruned [0-9]* unreachable commit' < "$logfile"
diff --git a/tests/hg-unnamed-head.stdout b/tests/hg-unnamed-head.stdout
index 7354306..029b454 100644
--- a/tests/hg-unnamed-head.stdout
+++ b/tests/hg-unnamed-head.stdout
@@ -4,4 +4,4 @@ first line
third line
third commit
first commit
-1
+pruned 1 unreachable commit