test-install.t
175 lines
| 6.3 KiB
| text/troff
|
Tads3Lexer
/ tests / test-install.t
|
r11917 | hg debuginstall | ||
$ hg debuginstall | ||||
|
r16934 | checking encoding (ascii)... | ||
|
r20741 | checking Python executable (*) (glob) | ||
checking Python version (2.*) (glob) | ||||
|
r17392 | checking Python lib (*lib*)... (glob) | ||
|
r30222 | checking Python security support (*) (glob) | ||
TLS 1.2 not supported by Python install; network connections lack modern security (?) | ||||
SNI not supported by Python install; may have connectivity issues with some servers (?) | ||||
|
r29197 | checking Mercurial version (*) (glob) | ||
checking Mercurial custom build (*) (glob) | ||||
|
r29266 | checking module policy (*) (glob) | ||
|
r16934 | checking installed modules (*mercurial)... (glob) | ||
|
r30462 | checking registered compression engines (*zlib*) (glob) | ||
checking available compression engines (*zlib*) (glob) | ||||
|
r30762 | checking available compression engines for wire protocol (*zlib*) (glob) | ||
|
r16934 | checking templates (*mercurial?templates)... (glob) | ||
|
r28440 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | ||
|
r28626 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) | ||
|
r28440 | checking username (test) | ||
|
r16934 | no problems detected | ||
|
r11917 | |||
|
r28440 | hg debuginstall JSON | ||
|
r28885 | $ hg debuginstall -Tjson | sed 's|\\\\|\\|g' | ||
|
r28440 | [ | ||
{ | ||||
|
r30462 | "compengines": ["bz2", "bz2truncated", "none", "zlib"*], (glob) | ||
"compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob) | ||||
|
r30762 | "compenginesserver": [*"zlib"*], (glob) | ||
|
r28440 | "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) | ||
"defaulttemplateerror": null, | ||||
"defaulttemplatenotfound": "default", | ||||
|
r28626 | "editor": "* -c \"import sys; sys.exit(0)\"", (glob) | ||
|
r28440 | "editornotfound": false, | ||
"encoding": "ascii", | ||||
"encodingerror": null, | ||||
"extensionserror": null, | ||||
|
r29266 | "hgmodulepolicy": "*", (glob) | ||
|
r28440 | "hgmodules": "*mercurial", (glob) | ||
|
r29197 | "hgver": "*", (glob) | ||
"hgverextra": "*", (glob) | ||||
|
r28440 | "problems": 0, | ||
|
r28544 | "pythonexe": "*", (glob) | ||
|
r28626 | "pythonlib": "*", (glob) | ||
|
r30222 | "pythonsecurity": [*], (glob) | ||
|
r28440 | "pythonver": "*.*.*", (glob) | ||
"templatedirs": "*mercurial?templates", (glob) | ||||
"username": "test", | ||||
"usernameerror": null, | ||||
"vinotfound": false | ||||
} | ||||
] | ||||
|
r11917 | hg debuginstall with no username | ||
$ HGUSER= hg debuginstall | ||||
|
r16934 | checking encoding (ascii)... | ||
|
r20741 | checking Python executable (*) (glob) | ||
checking Python version (2.*) (glob) | ||||
|
r17392 | checking Python lib (*lib*)... (glob) | ||
|
r30222 | checking Python security support (*) (glob) | ||
TLS 1.2 not supported by Python install; network connections lack modern security (?) | ||||
SNI not supported by Python install; may have connectivity issues with some servers (?) | ||||
|
r29197 | checking Mercurial version (*) (glob) | ||
checking Mercurial custom build (*) (glob) | ||||
|
r29266 | checking module policy (*) (glob) | ||
|
r16934 | checking installed modules (*mercurial)... (glob) | ||
|
r30462 | checking registered compression engines (*zlib*) (glob) | ||
checking available compression engines (*zlib*) (glob) | ||||
|
r30762 | checking available compression engines for wire protocol (*zlib*) (glob) | ||
|
r16934 | checking templates (*mercurial?templates)... (glob) | ||
|
r28440 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | ||
|
r28626 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) | ||
|
r16934 | checking username... | ||
|
r20574 | no username supplied | ||
|
r12084 | (specify a username in your configuration file) | ||
|
r11917 | 1 problems detected, please check your install! | ||
|
r12316 | [1] | ||
|
r24891 | |||
path variables are expanded (~ is the same as $TESTTMP) | ||||
$ mkdir tools | ||||
$ touch tools/testeditor.exe | ||||
#if execbit | ||||
$ chmod 755 tools/testeditor.exe | ||||
#endif | ||||
$ hg debuginstall --config ui.editor=~/tools/testeditor.exe | ||||
checking encoding (ascii)... | ||||
checking Python executable (*) (glob) | ||||
checking Python version (*) (glob) | ||||
checking Python lib (*lib*)... (glob) | ||||
|
r30222 | checking Python security support (*) (glob) | ||
TLS 1.2 not supported by Python install; network connections lack modern security (?) | ||||
SNI not supported by Python install; may have connectivity issues with some servers (?) | ||||
|
r29197 | checking Mercurial version (*) (glob) | ||
checking Mercurial custom build (*) (glob) | ||||
|
r29266 | checking module policy (*) (glob) | ||
|
r24891 | checking installed modules (*mercurial)... (glob) | ||
|
r30462 | checking registered compression engines (*zlib*) (glob) | ||
checking available compression engines (*zlib*) (glob) | ||||
|
r30762 | checking available compression engines for wire protocol (*zlib*) (glob) | ||
|
r24891 | checking templates (*mercurial?templates)... (glob) | ||
|
r28440 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | ||
|
r28626 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) | ||
|
r28440 | checking username (test) | ||
|
r24891 | no problems detected | ||
|
r27383 | |||
|
r27442 | #if test-repo | ||
|
r29219 | $ . "$TESTDIR/helpers-testrepo.sh" | ||
|
r27383 | $ cat >> wixxml.py << EOF | ||
> import os, subprocess, sys | ||||
> import xml.etree.ElementTree as ET | ||||
> | ||||
> # MSYS mangles the path if it expands $TESTDIR | ||||
> testdir = os.environ['TESTDIR'] | ||||
> ns = {'wix' : 'http://schemas.microsoft.com/wix/2006/wi'} | ||||
> | ||||
> def directory(node, relpath): | ||||
> '''generator of files in the xml node, rooted at relpath''' | ||||
|
r27519 | > dirs = node.findall('./{%(wix)s}Directory' % ns) | ||
|
r27383 | > | ||
> for d in dirs: | ||||
> for subfile in directory(d, relpath + d.attrib['Name'] + '/'): | ||||
> yield subfile | ||||
> | ||||
|
r27519 | > files = node.findall('./{%(wix)s}Component/{%(wix)s}File' % ns) | ||
|
r27383 | > | ||
> for f in files: | ||||
> yield relpath + f.attrib['Name'] | ||||
> | ||||
> def hgdirectory(relpath): | ||||
> '''generator of tracked files, rooted at relpath''' | ||||
> hgdir = "%s/../mercurial" % (testdir) | ||||
|
r27442 | > args = ['hg', '--cwd', hgdir, 'files', relpath] | ||
|
r27383 | > proc = subprocess.Popen(args, stdout=subprocess.PIPE, | ||
> stderr=subprocess.PIPE) | ||||
> output = proc.communicate()[0] | ||||
> | ||||
> slash = '/' | ||||
> for line in output.splitlines(): | ||||
> if os.name == 'nt': | ||||
> yield line.replace(os.sep, slash) | ||||
> else: | ||||
> yield line | ||||
> | ||||
> tracked = [f for f in hgdirectory(sys.argv[1])] | ||||
> | ||||
> xml = ET.parse("%s/../contrib/wix/%s.wxs" % (testdir, sys.argv[1])) | ||||
> root = xml.getroot() | ||||
|
r27519 | > dir = root.find('.//{%(wix)s}DirectoryRef' % ns) | ||
|
r27383 | > | ||
> installed = [f for f in directory(dir, '')] | ||||
> | ||||
> print('Not installed:') | ||||
> for f in sorted(set(tracked) - set(installed)): | ||||
> print(' %s' % f) | ||||
> | ||||
> print('Not tracked:') | ||||
> for f in sorted(set(installed) - set(tracked)): | ||||
> print(' %s' % f) | ||||
> EOF | ||||
$ python wixxml.py help | ||||
Not installed: | ||||
help/common.txt | ||||
|
r29090 | help/hg-ssh.8.txt | ||
|
r27383 | help/hg.1.txt | ||
help/hgignore.5.txt | ||||
help/hgrc.5.txt | ||||
Not tracked: | ||||
$ python wixxml.py templates | ||||
Not installed: | ||||
Not tracked: | ||||
|
r27442 | |||
#endif | ||||