[PATCH 8 of 8 "STABLE] test: generate the `test-sparse-revlog` artifact when slow-test is allowed

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Feb 24 14:42:47 EST 2019


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1551034520 -3600
#      Sun Feb 24 19:55:20 2019 +0100
# Branch stable
# Node ID 60ad23544b2188cbb1a725d5e6b71672aafffa06
# Parent  25e5d27bedf62f7800d489ee8a71ed7eed8574af
# EXP-Topic test-sparse-revlog
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 60ad23544b21
test: generate the `test-sparse-revlog` artifact when slow-test is allowed

The `test-sparse-revlog.t` logic requires a large bundle to be generated. This
bundle can be reused from one run to the next but its initial generation is
slow. With this patch, if the bundle is missing and slow tests are permitted,
the bundle will be generated during the test run.

This should ensure that CI run this test.

diff --git a/tests/test-sparse-revlog.t b/tests/test-sparse-revlog.t
--- a/tests/test-sparse-revlog.t
+++ b/tests/test-sparse-revlog.t
@@ -12,10 +12,22 @@ repeatedly while some of it changes rare
   $ bundlepath="$TESTDIR/artifacts/cache/big-file-churn.hg"
 
   $ expectedhash=`cat "$bundlepath".md5`
+
+#if slow
+
+  $ if [ ! -f "$bundlepath" ]; then
+  >     "$TESTDIR"/artifacts/scripts/generate-churning-bundle.py > /dev/null
+  > fi
+
+#else
+
   $ if [ ! -f "$bundlepath" ]; then
   >     echo 'skipped: missing artifact, run "'"$TESTDIR"'/artifacts/scripts/generate-churning-bundle.py"'
   >     exit 80
   > fi
+
+#endif
+
   $ currenthash=`f -M "$bundlepath" | cut -d = -f 2`
   $ if [ "$currenthash" != "$expectedhash" ]; then
   >     echo 'skipped: outdated artifact, md5 "'"$currenthash"'" expected "'"$expectedhash"'" run "'"$TESTDIR"'/artifacts/scripts/generate-churning-bundle.py"'


More information about the Mercurial-devel mailing list