comparison tests/hghave @ 12740:b86c6954ec4c

serve: fix https mode and add test The https mode failed in super because BaseRequestHandler is an old-style class. This introduces the first test of https client/server functionality - and "hghave ssl". The test is currently only run on Python 2.6.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 17 Oct 2010 04:13:35 +0200
parents cbe400a8e217
children 763be3cd084a
comparison
equal deleted inserted replaced
12739:8dcd3203a261 12740:b86c6954ec4c
177 return False 177 return False
178 178
179 def has_outer_repo(): 179 def has_outer_repo():
180 return matchoutput('hg root 2>&1', r'') 180 return matchoutput('hg root 2>&1', r'')
181 181
182 def has_ssl():
183 try:
184 from OpenSSL.SSL import SysCallError, ZeroReturnError
185 import ssl
186 return True
187 except ImportError:
188 return False
189
182 checks = { 190 checks = {
183 "baz": (has_baz, "GNU Arch baz client"), 191 "baz": (has_baz, "GNU Arch baz client"),
184 "bzr": (has_bzr, "Canonical's Bazaar client"), 192 "bzr": (has_bzr, "Canonical's Bazaar client"),
185 "bzr114": (has_bzr114, "Canonical's Bazaar client >= 1.14"), 193 "bzr114": (has_bzr114, "Canonical's Bazaar client >= 1.14"),
186 "cvs": (has_cvs, "cvs client/server"), 194 "cvs": (has_cvs, "cvs client/server"),
187 "darcs": (has_darcs, "darcs client"), 195 "darcs": (has_darcs, "darcs client"),
196 "docutils": (has_docutils, "Docutils text processing library"),
188 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), 197 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
189 "execbit": (has_executablebit, "executable bit"), 198 "execbit": (has_executablebit, "executable bit"),
190 "fifo": (has_fifo, "named pipes"), 199 "fifo": (has_fifo, "named pipes"),
191 "git": (has_git, "git command line client"), 200 "git": (has_git, "git command line client"),
192 "gpg": (has_gpg, "gpg client"), 201 "gpg": (has_gpg, "gpg client"),
196 "lsprof": (has_lsprof, "python lsprof module"), 205 "lsprof": (has_lsprof, "python lsprof module"),
197 "mtn": (has_mtn, "monotone client (> 0.31)"), 206 "mtn": (has_mtn, "monotone client (> 0.31)"),
198 "outer-repo": (has_outer_repo, "outer repo"), 207 "outer-repo": (has_outer_repo, "outer repo"),
199 "p4": (has_p4, "Perforce server and client"), 208 "p4": (has_p4, "Perforce server and client"),
200 "pygments": (has_pygments, "Pygments source highlighting library"), 209 "pygments": (has_pygments, "Pygments source highlighting library"),
201 "docutils": (has_docutils, "Docutils text processing library"), 210 "ssl": (has_ssl, "python ssl and openssl modules"),
202 "svn": (has_svn, "subversion client and admin tools"), 211 "svn": (has_svn, "subversion client and admin tools"),
203 "svn-bindings": (has_svn_bindings, "subversion python bindings"), 212 "svn-bindings": (has_svn_bindings, "subversion python bindings"),
204 "symlink": (has_symlink, "symbolic links"), 213 "symlink": (has_symlink, "symbolic links"),
205 "tla": (has_tla, "GNU Arch tla client"), 214 "tla": (has_tla, "GNU Arch tla client"),
206 "unix-permissions": (has_unix_permissions, "unix-style permissions"), 215 "unix-permissions": (has_unix_permissions, "unix-style permissions"),
270 elif negate and available: 279 elif negate and available:
271 error('skipped: system supports %s' % desc) 280 error('skipped: system supports %s' % desc)
272 281
273 if failures != 0: 282 if failures != 0:
274 sys.exit(1) 283 sys.exit(1)
275
276