heptapod-ci: use strict module policy stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 05 Mar 2020 15:47:22 +0100
branchstable
changeset 44198 4bd35d25903f
parent 44197 24a3a9f7ea77
child 44199 b24721e7c5ee
heptapod-ci: use strict module policy Without this, test can silently fallback to other compatible policy in some cases. Differential Revision: https://phab.mercurial-scm.org/D8234
contrib/heptapod-ci.yml
--- a/contrib/heptapod-ci.yml	Thu Mar 05 08:30:11 2020 -0800
+++ b/contrib/heptapod-ci.yml	Thu Mar 05 15:47:22 2020 +0100
@@ -10,13 +10,14 @@
 
 variables:
     PYTHON: python
+    TEST_HGMODULEPOLICY: "allow"
 
 .runtests_template: &runtests
     script:
         - cd tests/
         - echo "python used, $PYTHON"
         - echo "$RUNTEST_ARGS"
-        - $PYTHON run-tests.py --color=always $RUNTEST_ARGS
+        - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" run-tests.py --color=always $RUNTEST_ARGS
 
 checks-py2:
     <<: *runtests
@@ -43,29 +44,34 @@
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
+        TEST_HGMODULEPOLICY: "c"
 
 test-py3:
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
         PYTHON: python3
+        TEST_HGMODULEPOLICY: "c"
 
 test-py2-pure:
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
+        TEST_HGMODULEPOLICY: "py"
 
 test-py3-pure:
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
         PYTHON: python3
+        TEST_HGMODULEPOLICY: "py"
 
 test-py2-rust:
     <<: *runtests
     variables:
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
+        TEST_HGMODULEPOLICY: "rust+c"
 
 test-py3-rust:
     <<: *runtests
@@ -73,3 +79,4 @@
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
         PYTHON: python3
+        TEST_HGMODULEPOLICY: "rust+c"