changeset 41805:090a41251f09

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 24 Feb 2019 19:55:20 +0100
parents 4cbccb50df46
children 118c1ec4f31b
files tests/test-sparse-revlog.t
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-sparse-revlog.t	Sun Feb 24 19:56:23 2019 +0100
+++ b/tests/test-sparse-revlog.t	Sun Feb 24 19:55:20 2019 +0100
@@ -12,10 +12,22 @@
   $ 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"'