Mercurial > public > mercurial-scm > hg-stable
diff tests/helpers-testrepo.sh @ 51689:16574ca8b155 stable
test: preserve the existing module policy config for testrepohg resuse
The test runner is, righfully, setting HGMODULEPOLICY to match the flavor
requests to run the tests. However this mess with the `testrepohg` ability to
run properly, as the newly set policy might be incompatible with its
installation, or its ability to read the test repo.
So we preserve the initial value in a dedicated variable and use it in the
`testrepohg` helper.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 08 Oct 2024 15:54:59 +0200 |
parents | 152f1b47e0ad |
children | 5e2f0fec0a47 |
line wrap: on
line diff
--- a/tests/helpers-testrepo.sh Tue Oct 08 15:54:59 2024 +0200 +++ b/tests/helpers-testrepo.sh Tue Oct 08 15:54:59 2024 +0200 @@ -29,6 +29,12 @@ . "$HGTEST_RESTOREENV" HGPLAIN=1 export HGPLAIN + if [ -n "$HGTEST_BASE_HGMODULEPOLICY" ]; then + HGMODULEPOLICY="$HGTEST_BASE_HGMODULEPOLICY" + else + unset HGMODULEPOLICY + fi + export HGMODULEPOLICY } # The test-repo is a live hg repository which may have evolution markers