diff tests/test-contrib-relnotes.t @ 51961:a9b1acca2b14 stable

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 08 Oct 2024 15:54:59 +0200
parents 530d211ae9a8
children
line wrap: on
line diff
--- 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