# HG changeset patch # User Pierre-Yves David # Date 2019-02-24 18:55:20 # Node ID 090a41251f093e8b8b97046deeef59f1d060d4e4 # Parent 4cbccb50df46699d309eb904e7b8a5670f7a694d 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"'