##// END OF EJS Templates
tests: switch test from '--config ui.editor=~/foo' to HGEDITOR=~/foo...
Kyle Lippincott -
r35538:711149d8 default
parent child Browse files
Show More
@@ -1,230 +1,230
1 1 hg debuginstall
2 2 $ hg debuginstall
3 3 checking encoding (ascii)...
4 4 checking Python executable (*) (glob)
5 5 checking Python version (2.*) (glob)
6 6 checking Python lib (*lib*)... (glob)
7 7 checking Python security support (*) (glob)
8 8 TLS 1.2 not supported by Python install; network connections lack modern security (?)
9 9 SNI not supported by Python install; may have connectivity issues with some servers (?)
10 10 checking Mercurial version (*) (glob)
11 11 checking Mercurial custom build (*) (glob)
12 12 checking module policy (*) (glob)
13 13 checking installed modules (*mercurial)... (glob)
14 14 checking registered compression engines (*zlib*) (glob)
15 15 checking available compression engines (*zlib*) (glob)
16 16 checking available compression engines for wire protocol (*zlib*) (glob)
17 17 checking "re2" regexp engine \((available|missing)\) (re)
18 18 checking templates (*mercurial?templates)... (glob)
19 19 checking default template (*mercurial?templates?map-cmdline.default) (glob)
20 20 checking commit editor... (* -c "import sys; sys.exit(0)") (glob)
21 21 checking username (test)
22 22 no problems detected
23 23
24 24 hg debuginstall JSON
25 25 $ hg debuginstall -Tjson | sed 's|\\\\|\\|g'
26 26 [
27 27 {
28 28 "compengines": ["bz2", "bz2truncated", "none", "zlib"*], (glob)
29 29 "compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob)
30 30 "compenginesserver": [*"zlib"*], (glob)
31 31 "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob)
32 32 "defaulttemplateerror": null,
33 33 "defaulttemplatenotfound": "default",
34 34 "editor": "* -c \"import sys; sys.exit(0)\"", (glob)
35 35 "editornotfound": false,
36 36 "encoding": "ascii",
37 37 "encodingerror": null,
38 38 "extensionserror": null, (no-pure !)
39 39 "hgmodulepolicy": "*", (glob)
40 40 "hgmodules": "*mercurial", (glob)
41 41 "hgver": "*", (glob)
42 42 "hgverextra": "*", (glob)
43 43 "problems": 0,
44 44 "pythonexe": "*", (glob)
45 45 "pythonlib": "*", (glob)
46 46 "pythonsecurity": [*], (glob)
47 47 "pythonver": "*.*.*", (glob)
48 48 "re2": (true|false), (re)
49 49 "templatedirs": "*mercurial?templates", (glob)
50 50 "username": "test",
51 51 "usernameerror": null,
52 52 "vinotfound": false
53 53 }
54 54 ]
55 55
56 56 hg debuginstall with no username
57 57 $ HGUSER= hg debuginstall
58 58 checking encoding (ascii)...
59 59 checking Python executable (*) (glob)
60 60 checking Python version (2.*) (glob)
61 61 checking Python lib (*lib*)... (glob)
62 62 checking Python security support (*) (glob)
63 63 TLS 1.2 not supported by Python install; network connections lack modern security (?)
64 64 SNI not supported by Python install; may have connectivity issues with some servers (?)
65 65 checking Mercurial version (*) (glob)
66 66 checking Mercurial custom build (*) (glob)
67 67 checking module policy (*) (glob)
68 68 checking installed modules (*mercurial)... (glob)
69 69 checking registered compression engines (*zlib*) (glob)
70 70 checking available compression engines (*zlib*) (glob)
71 71 checking available compression engines for wire protocol (*zlib*) (glob)
72 72 checking "re2" regexp engine \((available|missing)\) (re)
73 73 checking templates (*mercurial?templates)... (glob)
74 74 checking default template (*mercurial?templates?map-cmdline.default) (glob)
75 75 checking commit editor... (* -c "import sys; sys.exit(0)") (glob)
76 76 checking username...
77 77 no username supplied
78 78 (specify a username in your configuration file)
79 79 1 problems detected, please check your install!
80 80 [1]
81 81
82 82 hg debuginstall with invalid encoding
83 83 $ HGENCODING=invalidenc hg debuginstall | grep encoding
84 84 checking encoding (invalidenc)...
85 85 unknown encoding: invalidenc
86 86
87 87 exception message in JSON
88 88
89 89 $ HGENCODING=invalidenc HGUSER= hg debuginstall -Tjson | grep error
90 90 "defaulttemplateerror": null,
91 91 "encodingerror": "unknown encoding: invalidenc",
92 92 "extensionserror": null, (no-pure !)
93 93 "usernameerror": "no username supplied",
94 94
95 95 path variables are expanded (~ is the same as $TESTTMP)
96 96 $ mkdir tools
97 97 $ touch tools/testeditor.exe
98 98 #if execbit
99 99 $ chmod 755 tools/testeditor.exe
100 100 #endif
101 $ hg debuginstall --config ui.editor=~/tools/testeditor.exe
101 $ HGEDITOR="~/tools/testeditor.exe" hg debuginstall
102 102 checking encoding (ascii)...
103 103 checking Python executable (*) (glob)
104 104 checking Python version (*) (glob)
105 105 checking Python lib (*lib*)... (glob)
106 106 checking Python security support (*) (glob)
107 107 TLS 1.2 not supported by Python install; network connections lack modern security (?)
108 108 SNI not supported by Python install; may have connectivity issues with some servers (?)
109 109 checking Mercurial version (*) (glob)
110 110 checking Mercurial custom build (*) (glob)
111 111 checking module policy (*) (glob)
112 112 checking installed modules (*mercurial)... (glob)
113 113 checking registered compression engines (*zlib*) (glob)
114 114 checking available compression engines (*zlib*) (glob)
115 115 checking available compression engines for wire protocol (*zlib*) (glob)
116 116 checking "re2" regexp engine \((available|missing)\) (re)
117 117 checking templates (*mercurial?templates)... (glob)
118 118 checking default template (*mercurial?templates?map-cmdline.default) (glob)
119 checking commit editor... (* -c "import sys; sys.exit(0)") (glob)
119 checking commit editor... ($TESTTMP/tools/testeditor.exe)
120 120 checking username (test)
121 121 no problems detected
122 122
123 123 #if test-repo
124 124 $ . "$TESTDIR/helpers-testrepo.sh"
125 125
126 126 $ cat >> wixxml.py << EOF
127 127 > import os, subprocess, sys
128 128 > import xml.etree.ElementTree as ET
129 129 >
130 130 > # MSYS mangles the path if it expands $TESTDIR
131 131 > testdir = os.environ['TESTDIR']
132 132 > ns = {'wix' : 'http://schemas.microsoft.com/wix/2006/wi'}
133 133 >
134 134 > def directory(node, relpath):
135 135 > '''generator of files in the xml node, rooted at relpath'''
136 136 > dirs = node.findall('./{%(wix)s}Directory' % ns)
137 137 >
138 138 > for d in dirs:
139 139 > for subfile in directory(d, relpath + d.attrib['Name'] + '/'):
140 140 > yield subfile
141 141 >
142 142 > files = node.findall('./{%(wix)s}Component/{%(wix)s}File' % ns)
143 143 >
144 144 > for f in files:
145 145 > yield relpath + f.attrib['Name']
146 146 >
147 147 > def hgdirectory(relpath):
148 148 > '''generator of tracked files, rooted at relpath'''
149 149 > hgdir = "%s/../mercurial" % (testdir)
150 150 > args = ['hg', '--cwd', hgdir, 'files', relpath]
151 151 > proc = subprocess.Popen(args, stdout=subprocess.PIPE,
152 152 > stderr=subprocess.PIPE)
153 153 > output = proc.communicate()[0]
154 154 >
155 155 > slash = '/'
156 156 > for line in output.splitlines():
157 157 > if os.name == 'nt':
158 158 > yield line.replace(os.sep, slash)
159 159 > else:
160 160 > yield line
161 161 >
162 162 > tracked = [f for f in hgdirectory(sys.argv[1])]
163 163 >
164 164 > xml = ET.parse("%s/../contrib/wix/%s.wxs" % (testdir, sys.argv[1]))
165 165 > root = xml.getroot()
166 166 > dir = root.find('.//{%(wix)s}DirectoryRef' % ns)
167 167 >
168 168 > installed = [f for f in directory(dir, '')]
169 169 >
170 170 > print('Not installed:')
171 171 > for f in sorted(set(tracked) - set(installed)):
172 172 > print(' %s' % f)
173 173 >
174 174 > print('Not tracked:')
175 175 > for f in sorted(set(installed) - set(tracked)):
176 176 > print(' %s' % f)
177 177 > EOF
178 178
179 179 $ ( testrepohgenv; $PYTHON wixxml.py help )
180 180 Not installed:
181 181 help/common.txt
182 182 help/hg-ssh.8.txt
183 183 help/hg.1.txt
184 184 help/hgignore.5.txt
185 185 help/hgrc.5.txt
186 186 Not tracked:
187 187
188 188 $ ( testrepohgenv; $PYTHON wixxml.py templates )
189 189 Not installed:
190 190 Not tracked:
191 191
192 192 #endif
193 193
194 194 #if virtualenv
195 195
196 196 Verify that Mercurial is installable with pip. Note that this MUST be
197 197 the last test in this file, because we do some nasty things to the
198 198 shell environment in order to make the virtualenv work reliably.
199 199
200 200 $ cd $TESTTMP
201 201 Note: --no-site-packages is deprecated, but some places have an
202 202 ancient virtualenv from their linux distro or similar and it's not yet
203 203 the default for them.
204 204 $ unset PYTHONPATH
205 205 $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log
206 206 Note: we use this weird path to run pip and hg to avoid platform differences,
207 207 since it's bin on most platforms but Scripts on Windows.
208 208 $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log
209 209 $ ./installenv/*/hg debuginstall || cat pip.log
210 210 checking encoding (ascii)...
211 211 checking Python executable (*) (glob)
212 212 checking Python version (2.*) (glob)
213 213 checking Python lib (*)... (glob)
214 214 checking Python security support (*) (glob)
215 215 TLS 1.2 not supported by Python install; network connections lack modern security (?)
216 216 SNI not supported by Python install; may have connectivity issues with some servers (?)
217 217 checking Mercurial version (*) (glob)
218 218 checking Mercurial custom build (*) (glob)
219 219 checking module policy (*) (glob)
220 220 checking installed modules (*/mercurial)... (glob)
221 221 checking registered compression engines (*) (glob)
222 222 checking available compression engines (*) (glob)
223 223 checking available compression engines for wire protocol (*) (glob)
224 224 checking "re2" regexp engine \((available|missing)\) (re)
225 225 checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob)
226 226 checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob)
227 227 checking commit editor... (*) (glob)
228 228 checking username (test)
229 229 no problems detected
230 230 #endif
General Comments 0
You need to be logged in to leave comments. Login now