| 1 |
$ . "$RUNTESTDIR/helpers-testrepo.sh" |
| 2 |
|
| 3 |
hg debuginstall |
| 4 |
$ hg debuginstall |
| 5 |
checking encoding (ascii)... |
| 6 |
checking Python executable (*) (glob) |
| 7 |
checking Python implementation (*) (glob) |
| 8 |
checking Python version (3.*) (glob) |
| 9 |
checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) |
| 10 |
checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) |
| 11 |
checking Python security support (*) (glob) |
| 12 |
TLS 1.2 not supported by Python install; network connections lack modern security (?) |
| 13 |
SNI not supported by Python install; may have connectivity issues with some servers (?) |
| 14 |
checking Rust extensions \((installed|missing)\) (re) |
| 15 |
checking Mercurial version (*) (glob) |
| 16 |
checking Mercurial custom build (*) (glob) |
| 17 |
checking module policy (*) (glob) |
| 18 |
checking installed modules (*mercurial)... (glob) (no-pyoxidizer-in-memory !) |
| 19 |
checking installed modules (*/release/app/hg*)... (glob) (pyoxidizer-in-memory !) |
| 20 |
checking registered compression engines (*zlib*) (glob) |
| 21 |
checking available compression engines (*zlib*) (glob) |
| 22 |
checking available compression engines for wire protocol (*zlib*) (glob) |
| 23 |
checking "re2" regexp engine \((available|missing)\) (re) |
| 24 |
checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) |
| 25 |
checking templates (*app?templates)... (glob) (pyoxidizer !) |
| 26 |
checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) |
| 27 |
checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) |
| 28 |
checking commit editor... (*) (glob) |
| 29 |
checking username (test) |
| 30 |
no problems detected |
| 31 |
|
| 32 |
hg debuginstall JSON |
| 33 |
$ hg debuginstall -Tjson | sed 's|\\\\|\\|g' |
| 34 |
[ |
| 35 |
{ |
| 36 |
"compengines": ["bz2", "bz2truncated", "none", "zlib"*], (glob) |
| 37 |
"compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob) |
| 38 |
"compenginesserver": [*"zlib"*], (glob) |
| 39 |
"defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) (no-pyoxidizer !) |
| 40 |
"defaulttemplate": "*app?templates?map-cmdline.default", (glob) (pyoxidizer !) |
| 41 |
"defaulttemplateerror": null, |
| 42 |
"defaulttemplatenotfound": "default", |
| 43 |
"editor": "*", (glob) |
| 44 |
"editornotfound": false, |
| 45 |
"encoding": "ascii", |
| 46 |
"encodingerror": null, |
| 47 |
"extensionserror": null, (no-pure !) |
| 48 |
"hgmodulepolicy": "*", (glob) |
| 49 |
"hgmodules": "*mercurial", (glob) (no-pyoxidizer-in-memory !) |
| 50 |
"hgmodules": "*/release/app/hg*", (glob) (pyoxidizer-in-memory !) |
| 51 |
"hgver": "*", (glob) |
| 52 |
"hgverextra": "*", (glob) |
| 53 |
"problems": 0, |
| 54 |
"pythonexe": "*", (glob) |
| 55 |
"pythonimplementation": "*", (glob) |
| 56 |
"pythonlib": "*", (glob) |
| 57 |
"pythonsecurity": [*], (glob) |
| 58 |
"pythonver": "*.*.*", (glob) |
| 59 |
"re2": (true|false), (re) |
| 60 |
"templatedirs": "*mercurial?templates", (glob) (no-pyoxidizer !) |
| 61 |
"templatedirs": "*app?templates", (glob) (pyoxidizer !) |
| 62 |
"username": "test", |
| 63 |
"usernameerror": null, |
| 64 |
"vinotfound": false |
| 65 |
} |
| 66 |
] |
| 67 |
|
| 68 |
hg debuginstall with no username |
| 69 |
$ HGUSER= hg debuginstall |
| 70 |
checking encoding (ascii)... |
| 71 |
checking Python executable (*) (glob) |
| 72 |
checking Python implementation (*) (glob) |
| 73 |
checking Python version (3.*) (glob) |
| 74 |
checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) |
| 75 |
checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) |
| 76 |
checking Python security support (*) (glob) |
| 77 |
TLS 1.2 not supported by Python install; network connections lack modern security (?) |
| 78 |
SNI not supported by Python install; may have connectivity issues with some servers (?) |
| 79 |
checking Rust extensions \((installed|missing)\) (re) |
| 80 |
checking Mercurial version (*) (glob) |
| 81 |
checking Mercurial custom build (*) (glob) |
| 82 |
checking module policy (*) (glob) |
| 83 |
checking installed modules (*mercurial)... (glob) (no-pyoxidizer-in-memory !) |
| 84 |
checking installed modules (*/release/app/hg*)... (glob) (pyoxidizer-in-memory !) |
| 85 |
checking registered compression engines (*zlib*) (glob) |
| 86 |
checking available compression engines (*zlib*) (glob) |
| 87 |
checking available compression engines for wire protocol (*zlib*) (glob) |
| 88 |
checking "re2" regexp engine \((available|missing)\) (re) |
| 89 |
checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) |
| 90 |
checking templates (*app?templates)... (glob) (pyoxidizer !) |
| 91 |
checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) |
| 92 |
checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) |
| 93 |
checking commit editor... (*) (glob) |
| 94 |
checking username... |
| 95 |
no username supplied |
| 96 |
(specify a username in your configuration file) |
| 97 |
1 problems detected, please check your install! |
| 98 |
[1] |
| 99 |
|
| 100 |
hg debuginstall with invalid encoding |
| 101 |
$ HGENCODING=invalidenc hg debuginstall | grep encoding |
| 102 |
checking encoding (invalidenc)... |
| 103 |
unknown encoding: invalidenc |
| 104 |
|
| 105 |
exception message in JSON |
| 106 |
|
| 107 |
$ HGENCODING=invalidenc HGUSER= hg debuginstall -Tjson | grep error |
| 108 |
"defaulttemplateerror": null, |
| 109 |
"encodingerror": "unknown encoding: invalidenc", |
| 110 |
"extensionserror": null, (no-pure !) |
| 111 |
"usernameerror": "no username supplied", |
| 112 |
|
| 113 |
path variables are expanded (~ is the same as $TESTTMP) |
| 114 |
$ mkdir tools |
| 115 |
$ touch tools/testeditor.exe |
| 116 |
#if execbit |
| 117 |
$ chmod 755 tools/testeditor.exe |
| 118 |
#endif |
| 119 |
$ HGEDITOR="~/tools/testeditor.exe" hg debuginstall |
| 120 |
checking encoding (ascii)... |
| 121 |
checking Python executable (*) (glob) |
| 122 |
checking Python implementation (*) (glob) |
| 123 |
checking Python version (3.*) (glob) |
| 124 |
checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) |
| 125 |
checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) |
| 126 |
checking Python security support (*) (glob) |
| 127 |
TLS 1.2 not supported by Python install; network connections lack modern security (?) |
| 128 |
SNI not supported by Python install; may have connectivity issues with some servers (?) |
| 129 |
checking Rust extensions \((installed|missing)\) (re) |
| 130 |
checking Mercurial version (*) (glob) |
| 131 |
checking Mercurial custom build (*) (glob) |
| 132 |
checking module policy (*) (glob) |
| 133 |
checking installed modules (*mercurial)... (glob) (no-pyoxidizer-in-memory !) |
| 134 |
checking installed modules (*/release/app/hg*)... (glob) (pyoxidizer-in-memory !) |
| 135 |
checking registered compression engines (*zlib*) (glob) |
| 136 |
checking available compression engines (*zlib*) (glob) |
| 137 |
checking available compression engines for wire protocol (*zlib*) (glob) |
| 138 |
checking "re2" regexp engine \((available|missing)\) (re) |
| 139 |
checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) |
| 140 |
checking templates (*app?templates)... (glob) (pyoxidizer !) |
| 141 |
checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) |
| 142 |
checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) |
| 143 |
checking commit editor... ($TESTTMP/tools/testeditor.exe) |
| 144 |
checking username (test) |
| 145 |
no problems detected |
| 146 |
|
| 147 |
print out the binary post-shlexsplit in the error message when commit editor is |
| 148 |
not found (this is intentionally using backslashes to mimic a windows usecase). |
| 149 |
$ HGEDITOR="c:\foo\bar\baz.exe -y -z" hg debuginstall |
| 150 |
checking encoding (ascii)... |
| 151 |
checking Python executable (*) (glob) |
| 152 |
checking Python implementation (*) (glob) |
| 153 |
checking Python version (3.*) (glob) |
| 154 |
checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) |
| 155 |
checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) |
| 156 |
checking Python security support (*) (glob) |
| 157 |
TLS 1.2 not supported by Python install; network connections lack modern security (?) |
| 158 |
SNI not supported by Python install; may have connectivity issues with some servers (?) |
| 159 |
checking Rust extensions \((installed|missing)\) (re) |
| 160 |
checking Mercurial version (*) (glob) |
| 161 |
checking Mercurial custom build (*) (glob) |
| 162 |
checking module policy (*) (glob) |
| 163 |
checking installed modules (*mercurial)... (glob) (no-pyoxidizer-in-memory !) |
| 164 |
checking installed modules (*/release/app/hg*)... (glob) (pyoxidizer-in-memory !) |
| 165 |
checking registered compression engines (*zlib*) (glob) |
| 166 |
checking available compression engines (*zlib*) (glob) |
| 167 |
checking available compression engines for wire protocol (*zlib*) (glob) |
| 168 |
checking "re2" regexp engine \((available|missing)\) (re) |
| 169 |
checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) |
| 170 |
checking templates (*app?templates)... (glob) (pyoxidizer !) |
| 171 |
checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) |
| 172 |
checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) |
| 173 |
checking commit editor... (c:\foo\bar\baz.exe) (windows !) |
| 174 |
Can't find editor 'c:\foo\bar\baz.exe' in PATH (windows !) |
| 175 |
checking commit editor... (c:foobarbaz.exe) (no-windows !) |
| 176 |
Can't find editor 'c:foobarbaz.exe' in PATH (no-windows !) |
| 177 |
(specify a commit editor in your configuration file) |
| 178 |
checking username (test) |
| 179 |
1 problems detected, please check your install! |
| 180 |
[1] |
| 181 |
|
| 182 |
debuginstall extension support |
| 183 |
$ hg debuginstall --config extensions.fsmonitor= --config fsmonitor.watchman_exe=false | grep atchman |
| 184 |
fsmonitor checking for watchman binary... (false) |
| 185 |
watchman binary missing or broken: warning: Watchman unavailable: watchman exited with code 1 |
| 186 |
Verify the json works too: |
| 187 |
$ hg debuginstall --config extensions.fsmonitor= --config fsmonitor.watchman_exe=false -Tjson | grep atchman |
| 188 |
"fsmonitor-watchman": "false", |
| 189 |
"fsmonitor-watchman-error": "warning: Watchman unavailable: watchman exited with code 1", |
| 190 |
|
| 191 |
Verify that Mercurial is installable with pip. Note that this MUST be |
| 192 |
the last test in this file, because we do some nasty things to the |
| 193 |
shell environment in order to make the virtualenv work reliably. |
| 194 |
|
| 195 |
On Python 3, we use the venv module, which is part of the standard library. |
| 196 |
But some Linux distros strip out this module's functionality involving pip, |
| 197 |
so we have to look for the ensurepip module, which these distros strip out |
| 198 |
completely. |
| 199 |
On Python 2, we use the 3rd party virtualenv module, if available. |
| 200 |
|
| 201 |
$ cd $TESTTMP |
| 202 |
$ unset PYTHONPATH |
| 203 |
|
| 204 |
#if ensurepip network-io no-pyoxidizer |
| 205 |
$ "$PYTHON" -m venv installenv >> pip.log |
| 206 |
|
| 207 |
Hack: Debian does something a bit different in ensurepip.bootstrap. This makes |
| 208 |
it so that pip thinks the 'wheel' wheel is installed so it can build wheels; |
| 209 |
when it goes to try, however, it shells out to run `python3 -u <setup.py>`, |
| 210 |
that *doesn't* get the 'wheel' wheel, and it fails with an invalid command |
| 211 |
'bdist_wheel'. To fix this, we just delete the wheel from where Debian put it in |
| 212 |
our virtual env. Then pip doesn't think it's installed and doesn't try to build. |
| 213 |
$ rm installenv/share/python-wheels/wheel-*.whl >/dev/null 2>&1 || true |
| 214 |
|
| 215 |
Note: we use this weird path to run pip and hg to avoid platform differences, |
| 216 |
since it's bin on most platforms but Scripts on Windows. |
| 217 |
$ (syshgenv; ./installenv/*/pip --no-cache-dir \ |
| 218 |
> install --config-settings --global-option=--pure \ |
| 219 |
> $TESTDIR/.. >> pip.log) |
| 220 |
Failed building wheel for mercurial (?) |
| 221 |
WARNING: You are using pip version *; however, version * is available. (glob) (?) |
| 222 |
You should consider upgrading via the '$TESTTMP/installenv/bin/python* -m pip install --upgrade pip' command. (glob) (?) |
| 223 |
(?) |
| 224 |
[notice] A new release of pip is available: * -> * (glob) (?) |
| 225 |
[notice] To update, run: * -m pip install --upgrade pip (glob) (?) |
| 226 |
$ HGMODULEPOLICY=py ./installenv/*/hg debuginstall || cat pip.log |
| 227 |
checking encoding (ascii)... |
| 228 |
checking Python executable (*) (glob) |
| 229 |
checking Python implementation (*) (glob) |
| 230 |
checking Python version (3.*) (glob) |
| 231 |
checking Python lib (*)... (glob) |
| 232 |
checking Python security support (*) (glob) |
| 233 |
checking Rust extensions \((installed|missing)\) (re) |
| 234 |
checking Mercurial version (*) (glob) |
| 235 |
checking Mercurial custom build (*) (glob) |
| 236 |
checking module policy (*) (glob) |
| 237 |
checking installed modules (*/mercurial)... (glob) |
| 238 |
checking registered compression engines (*) (glob) |
| 239 |
checking available compression engines (*) (glob) |
| 240 |
checking available compression engines for wire protocol (*) (glob) |
| 241 |
checking "re2" regexp engine \((available|missing)\) (re) |
| 242 |
checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob) |
| 243 |
checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob) |
| 244 |
checking commit editor... (*) (glob) |
| 245 |
checking username (test) |
| 246 |
no problems detected |
| 247 |
#endif |