relnotes: skip the test if the source repository is not readable stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 08 Oct 2024 15:54:59 +0200
branchstable
changeset 51961 a9b1acca2b14
parent 51960 1c23faf64ad4
child 51962 7b8769cca23d
relnotes: skip the test if the source repository is not readable The test want to run the relnot extension, with the tested mercurial, on the original repository. This is not always possible (e.g. when running with --pure and the repository use zstd for example). So we skip the test in this case.
tests/test-contrib-relnotes.t
--- a/tests/test-contrib-relnotes.t	Tue Oct 08 15:54:59 2024 +0200
+++ b/tests/test-contrib-relnotes.t	Tue Oct 08 15:54:59 2024 +0200
@@ -2,6 +2,12 @@
   $ . "$TESTDIR/helpers-testrepo.sh"
 
   $ cd $TESTDIR/..
+  $ if hg root 2> /dev/null >&2; then true;
+  > else
+  >   echo 'skipped: cannot read the source repository';
+  >   exit 80;
+  > fi
+
   $ python3 contrib/relnotes 4.4 --stoprev 4.5
   changeset 3398603c5621: unexpected block in release notes directive feature
   New Features