Show More
@@ -161,7 +161,11 testpats = [ | |||||
161 | (r'(\[|\btest\b).*-e ', "don't use 'test -e', use 'test -f'"), |
|
161 | (r'(\[|\btest\b).*-e ', "don't use 'test -e', use 'test -f'"), | |
162 | (r'\[\[\s+[^\]]*\]\]', "don't use '[[ ]]', use '[ ]'"), |
|
162 | (r'\[\[\s+[^\]]*\]\]', "don't use '[[ ]]', use '[ ]'"), | |
163 | (r'^alias\b.*=', "don't use alias, use a function"), |
|
163 | (r'^alias\b.*=', "don't use alias, use a function"), | |
164 | (r'if\s*!', "don't use '!' to negate exit status"), |
|
164 | # Solaris sh can not negate exit status with '!' | |
|
165 | ( | |||
|
166 | r'if\s*!', | |||
|
167 | "don't use '!' to negate exit status (use `||` or if/else)", | |||
|
168 | ), | |||
165 | (r'/dev/u?random', "don't use entropy, use /dev/zero"), |
|
169 | (r'/dev/u?random', "don't use entropy, use /dev/zero"), | |
166 | (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"), |
|
170 | (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"), | |
167 | ( |
|
171 | ( |
@@ -26,7 +26,6 image: registry.heptapod.net/mercurial/c | |||||
26 |
|
26 | |||
27 | variables: |
|
27 | variables: | |
28 | PYTHON: python |
|
28 | PYTHON: python | |
29 | TEST_HGMODULEPOLICY: "allow" |
|
|||
30 | HG_CI_IMAGE_TAG: "v2.1" |
|
29 | HG_CI_IMAGE_TAG: "v2.1" | |
31 | TEST_HGTESTS_ALLOW_NETIO: "0" |
|
30 | TEST_HGTESTS_ALLOW_NETIO: "0" | |
32 |
|
31 | |||
@@ -49,7 +48,7 variables: | |||||
49 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt |
|
48 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt | |
50 | script: |
|
49 | script: | |
51 | - echo "$RUNTEST_ARGS" |
|
50 | - echo "$RUNTEST_ARGS" | |
52 |
- HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" |
|
51 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS | |
53 |
|
52 | |||
54 | checks: |
|
53 | checks: | |
55 | <<: *runtests |
|
54 | <<: *runtests | |
@@ -70,34 +69,29 test-c: &test_c | |||||
70 | <<: *runtests |
|
69 | <<: *runtests | |
71 | variables: |
|
70 | variables: | |
72 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" |
|
71 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" | |
73 | TEST_HGMODULEPOLICY: "c" |
|
|||
74 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
72 | TEST_HGTESTS_ALLOW_NETIO: "1" | |
75 |
|
73 | |||
76 | test-pure: |
|
74 | test-pure: | |
77 | <<: *runtests |
|
75 | <<: *runtests | |
78 | variables: |
|
76 | variables: | |
79 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" |
|
77 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" | |
80 | TEST_HGMODULEPOLICY: "py" |
|
|||
81 |
|
78 | |||
82 | test-rust: &test_rust |
|
79 | test-rust: &test_rust | |
83 | <<: *runtests |
|
80 | <<: *runtests | |
84 | variables: |
|
81 | variables: | |
85 | HGWITHRUSTEXT: cpython |
|
82 | HGWITHRUSTEXT: cpython | |
86 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" |
|
83 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" | |
87 | TEST_HGMODULEPOLICY: "rust+c" |
|
|||
88 |
|
84 | |||
89 | test-rhg: |
|
85 | test-rhg: | |
90 | <<: *runtests |
|
86 | <<: *runtests | |
91 | variables: |
|
87 | variables: | |
92 | HGWITHRUSTEXT: cpython |
|
88 | HGWITHRUSTEXT: cpython | |
93 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" |
|
89 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" | |
94 | TEST_HGMODULEPOLICY: "rust+c" |
|
|||
95 |
|
90 | |||
96 | test-chg: |
|
91 | test-chg: | |
97 | <<: *runtests |
|
92 | <<: *runtests | |
98 | variables: |
|
93 | variables: | |
99 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" |
|
94 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" | |
100 | TEST_HGMODULEPOLICY: "c" |
|
|||
101 |
|
95 | |||
102 | # note: we should probably get a full matrix for flavor × py-version, but this |
|
96 | # note: we should probably get a full matrix for flavor × py-version, but this | |
103 | # is a simple start to be able to check if we break the lowest supported |
|
97 | # is a simple start to be able to check if we break the lowest supported | |
@@ -156,14 +150,13 check-pytype: | |||||
156 | - echo "$Env:TMP" |
|
150 | - echo "$Env:TMP" | |
157 | - echo "$Env:TEMP" |
|
151 | - echo "$Env:TEMP" | |
158 |
|
152 | |||
159 |
- C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" |
|
153 | - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" $PYTHON tests/run-tests.py --color=always $RUNTEST_ARGS' | |
160 |
|
154 | |||
161 | windows: |
|
155 | windows: | |
162 | <<: *windows_runtests |
|
156 | <<: *windows_runtests | |
163 | tags: |
|
157 | tags: | |
164 | - windows |
|
158 | - windows | |
165 | variables: |
|
159 | variables: | |
166 | TEST_HGMODULEPOLICY: "c" |
|
|||
167 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt" |
|
160 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt" | |
168 | PYTHON: py -3 |
|
161 | PYTHON: py -3 | |
169 |
|
162 | |||
@@ -172,6 +165,5 windows-pyox: | |||||
172 | tags: |
|
165 | tags: | |
173 | - windows |
|
166 | - windows | |
174 | variables: |
|
167 | variables: | |
175 | TEST_HGMODULEPOLICY: "c" |
|
|||
176 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized" |
|
168 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized" | |
177 | PYTHON: py -3 |
|
169 | PYTHON: py -3 |
@@ -60,7 +60,7 if '__pypy__' in sys.builtin_module_name | |||||
60 | policy: bytes = b'cffi' |
|
60 | policy: bytes = b'cffi' | |
61 |
|
61 | |||
62 | # Environment variable can always force settings. |
|
62 | # Environment variable can always force settings. | |
63 | if 'HGMODULEPOLICY' in os.environ: |
|
63 | if os.environ.get('HGMODULEPOLICY'): # ignore None and Empty | |
64 | policy: bytes = os.environ['HGMODULEPOLICY'].encode('utf-8') |
|
64 | policy: bytes = os.environ['HGMODULEPOLICY'].encode('utf-8') | |
65 |
|
65 | |||
66 |
|
66 |
@@ -9,7 +9,7 name='rusthg' | |||||
9 | crate-type = ["cdylib"] |
|
9 | crate-type = ["cdylib"] | |
10 |
|
10 | |||
11 | [dependencies] |
|
11 | [dependencies] | |
12 |
cpython = { version = "0.7. |
|
12 | cpython = { version = "0.7.2", features = ["extension-module"] } | |
13 | crossbeam-channel = "0.5.6" |
|
13 | crossbeam-channel = "0.5.6" | |
14 | hg-core = { path = "../hg-core"} |
|
14 | hg-core = { path = "../hg-core"} | |
15 | libc = "0.2.137" |
|
15 | libc = "0.2.137" |
@@ -29,6 +29,12 syshgenv () { | |||||
29 | . "$HGTEST_RESTOREENV" |
|
29 | . "$HGTEST_RESTOREENV" | |
30 | HGPLAIN=1 |
|
30 | HGPLAIN=1 | |
31 | export HGPLAIN |
|
31 | export HGPLAIN | |
|
32 | if [ -n "$HGTEST_BASE_HGMODULEPOLICY" ]; then | |||
|
33 | HGMODULEPOLICY="$HGTEST_BASE_HGMODULEPOLICY" | |||
|
34 | else | |||
|
35 | unset HGMODULEPOLICY | |||
|
36 | fi | |||
|
37 | export HGMODULEPOLICY | |||
32 | } |
|
38 | } | |
33 |
|
39 | |||
34 | # The test-repo is a live hg repository which may have evolution markers |
|
40 | # The test-repo is a live hg repository which may have evolution markers |
@@ -3372,6 +3372,10 class TestRunner: | |||||
3372 | pypath.append(oldpypath) |
|
3372 | pypath.append(oldpypath) | |
3373 | osenvironb[IMPL_PATH] = sepb.join(pypath) |
|
3373 | osenvironb[IMPL_PATH] = sepb.join(pypath) | |
3374 |
|
3374 | |||
|
3375 | os.environ["HGTEST_BASE_HGMODULEPOLICY"] = os.environ.get( | |||
|
3376 | "HGMODULEPOLICY", "" | |||
|
3377 | ) | |||
|
3378 | ||||
3375 | if self.options.pure: |
|
3379 | if self.options.pure: | |
3376 | os.environ["HGTEST_RUN_TESTS_PURE"] = "--pure" |
|
3380 | os.environ["HGTEST_RUN_TESTS_PURE"] = "--pure" | |
3377 | os.environ["HGMODULEPOLICY"] = "py" |
|
3381 | os.environ["HGMODULEPOLICY"] = "py" | |
@@ -3781,15 +3785,18 class TestRunner: | |||||
3781 | vlog("# Performing temporary installation of HG") |
|
3785 | vlog("# Performing temporary installation of HG") | |
3782 | installerrs = os.path.join(self._hgtmp, b"install.err") |
|
3786 | installerrs = os.path.join(self._hgtmp, b"install.err") | |
3783 | compiler = '' |
|
3787 | compiler = '' | |
|
3788 | install_env = original_env.copy() | |||
3784 | if self.options.compiler: |
|
3789 | if self.options.compiler: | |
3785 | compiler = '--compiler ' + self.options.compiler |
|
3790 | compiler = '--compiler ' + self.options.compiler | |
3786 | setup_opts = b"" |
|
3791 | setup_opts = b"" | |
3787 | if self.options.pure: |
|
3792 | if self.options.pure: | |
3788 | setup_opts = b"--pure" |
|
3793 | setup_opts = b"--pure" | |
|
3794 | install_env.pop('HGWITHRUSTEXT', None) | |||
3789 | elif self.options.rust: |
|
3795 | elif self.options.rust: | |
3790 | setup_opts = b"--rust" |
|
3796 | setup_opts = b"--rust" | |
3791 | elif self.options.no_rust: |
|
3797 | elif self.options.no_rust: | |
3792 | setup_opts = b"--no-rust" |
|
3798 | setup_opts = b"--no-rust" | |
|
3799 | install_env.pop('HGWITHRUSTEXT', None) | |||
3793 |
|
3800 | |||
3794 | # Run installer in hg root |
|
3801 | # Run installer in hg root | |
3795 | compiler = _sys2bytes(compiler) |
|
3802 | compiler = _sys2bytes(compiler) | |
@@ -3835,7 +3842,7 class TestRunner: | |||||
3835 | makedirs(self._bindir) |
|
3842 | makedirs(self._bindir) | |
3836 |
|
3843 | |||
3837 | vlog("# Running", cmd.decode("utf-8")) |
|
3844 | vlog("# Running", cmd.decode("utf-8")) | |
3838 |
if subprocess.call(_bytes2sys(cmd), shell=True, env= |
|
3845 | if subprocess.call(_bytes2sys(cmd), shell=True, env=install_env) == 0: | |
3839 | if not self.options.verbose: |
|
3846 | if not self.options.verbose: | |
3840 | try: |
|
3847 | try: | |
3841 | os.remove(installerrs) |
|
3848 | os.remove(installerrs) |
@@ -2,6 +2,12 | |||||
2 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
2 | $ . "$TESTDIR/helpers-testrepo.sh" | |
3 |
|
3 | |||
4 | $ cd $TESTDIR/.. |
|
4 | $ cd $TESTDIR/.. | |
|
5 | $ if hg root 2> /dev/null >&2; then true; | |||
|
6 | > else | |||
|
7 | > echo 'skipped: cannot read the source repository'; | |||
|
8 | > exit 80; | |||
|
9 | > fi | |||
|
10 | ||||
5 | $ python3 contrib/relnotes 4.4 --stoprev 4.5 |
|
11 | $ python3 contrib/relnotes 4.4 --stoprev 4.5 | |
6 | changeset 3398603c5621: unexpected block in release notes directive feature |
|
12 | changeset 3398603c5621: unexpected block in release notes directive feature | |
7 | New Features |
|
13 | New Features |
General Comments 0
You need to be logged in to leave comments.
Login now