# HG changeset patch # User Anton Shestakov # Date 1731765593 -14400 # Node ID dd518437d4e0ef5febf45c9168df50b4e2d2168a # Parent 7fcf18ea78130724823785a18af4b20ec304ae81 tests: introduce a compat-branches blacklist file The idea behind this file is to have an easy and obvious mechanism for skipping some tests on compatibility branches without modifying the test files themselves or touching .gitlab-ci.yml. Obviously, each compatibility branch can have different set of tests, and so the contents of this file can be different on different branches. This concept had actually existed in core for a long time, see tests/blacklists/ directory. diff -r 7fcf18ea7813 -r dd518437d4e0 .gitlab-ci.yml --- a/.gitlab-ci.yml Mon Nov 04 12:12:59 2024 +0100 +++ b/.gitlab-ci.yml Sat Nov 16 17:59:53 2024 +0400 @@ -26,7 +26,7 @@ script: - *prepare_hg - ($PYTHON --version) - - (cd tests; set -x; HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON /ci/repos/mercurial/tests/run-tests.py --color=always $RUNTEST_ARGS) + - (cd tests; set -x; HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON /ci/repos/mercurial/tests/run-tests.py --color=always --blacklist blacklists/compat-branches $RUNTEST_ARGS) checks-py3: <<: *runtests @@ -95,7 +95,7 @@ echo testing with mercurial branch="$hg_branch", revision="$hg_rev"' - Invoke-Expression "$Env:PYTHON --version" - echo "$Env:RUNTEST_ARGS" - - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON C:/Temp/hg/tests/run-tests.py --color=always $RUNTEST_ARGS' + - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON C:/Temp/hg/tests/run-tests.py --blacklist tests/blacklists/compat-branches --color=always $RUNTEST_ARGS' windows-py3: <<: *windows_runtests diff -r 7fcf18ea7813 -r dd518437d4e0 MANIFEST.in --- a/MANIFEST.in Mon Nov 04 12:12:59 2024 +0100 +++ b/MANIFEST.in Sat Nov 16 17:59:53 2024 +0400 @@ -29,3 +29,4 @@ prune debian prune .gitlab prune hgext3rd/evolve/hack +prune tests/blacklists diff -r 7fcf18ea7813 -r dd518437d4e0 tests/blacklists/compat-branches --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/blacklists/compat-branches Sat Nov 16 17:59:53 2024 +0400 @@ -0,0 +1,6 @@ +# This file is used on compatibility branches to skip tests that for one reason +# or another are not applicable or simply incompatible with older versions of +# Mercurial. +# +# On default and stable branch this file should not list any test files. It's +# only supposed to be populated on compability branches. diff -r 7fcf18ea7813 -r dd518437d4e0 tests/test-check-sdist.t --- a/tests/test-check-sdist.t Mon Nov 04 12:12:59 2024 +0100 +++ b/tests/test-check-sdist.t Sat Nov 16 17:59:53 2024 +0400 @@ -29,6 +29,7 @@ no previously-included directories found matching 'contrib' no previously-included directories found matching 'debian' no previously-included directories found matching '.gitlab' + no previously-included directories found matching 'tests/blacklists' $ cd "$TESTTMP"/dist $ find hg?evolve-*.tar.gz -size +800000c