test-install.t
259 lines
| 10.1 KiB
| text/troff
|
Tads3Lexer
/ tests / test-install.t
Pradeepkumar Gayam
|
r11917 | hg debuginstall | ||
$ hg debuginstall | ||||
Martin Geisler
|
r16934 | checking encoding (ascii)... | ||
Matt Mackall
|
r20741 | checking Python executable (*) (glob) | ||
checking Python version (2.*) (glob) | ||||
Adrian Buehlmann
|
r17392 | checking Python lib (*lib*)... (glob) | ||
Gregory Szorc
|
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 (?) | ||||
timeless
|
r29197 | checking Mercurial version (*) (glob) | ||
checking Mercurial custom build (*) (glob) | ||||
timeless
|
r29266 | checking module policy (*) (glob) | ||
Martin Geisler
|
r16934 | checking installed modules (*mercurial)... (glob) | ||
Gregory Szorc
|
r30462 | checking registered compression engines (*zlib*) (glob) | ||
checking available compression engines (*zlib*) (glob) | ||||
Gregory Szorc
|
r30762 | checking available compression engines for wire protocol (*zlib*) (glob) | ||
Boris Feld
|
r35464 | checking "re2" regexp engine \((available|missing)\) (re) | ||
Martin Geisler
|
r16934 | checking templates (*mercurial?templates)... (glob) | ||
timeless
|
r28440 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | ||
Kyle Lippincott
|
r36254 | checking commit editor... (*) (glob) | ||
timeless
|
r28440 | checking username (test) | ||
Martin Geisler
|
r16934 | no problems detected | ||
Pradeepkumar Gayam
|
r11917 | |||
timeless
|
r28440 | hg debuginstall JSON | ||
Matt Harbison
|
r28885 | $ hg debuginstall -Tjson | sed 's|\\\\|\\|g' | ||
timeless
|
r28440 | [ | ||
{ | ||||
Gregory Szorc
|
r30462 | "compengines": ["bz2", "bz2truncated", "none", "zlib"*], (glob) | ||
"compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob) | ||||
Gregory Szorc
|
r30762 | "compenginesserver": [*"zlib"*], (glob) | ||
timeless
|
r28440 | "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) | ||
"defaulttemplateerror": null, | ||||
"defaulttemplatenotfound": "default", | ||||
Kyle Lippincott
|
r36254 | "editor": "*", (glob) | ||
timeless
|
r28440 | "editornotfound": false, | ||
"encoding": "ascii", | ||||
"encodingerror": null, | ||||
Yuya Nishihara
|
r32204 | "extensionserror": null, (no-pure !) | ||
timeless
|
r29266 | "hgmodulepolicy": "*", (glob) | ||
timeless
|
r28440 | "hgmodules": "*mercurial", (glob) | ||
timeless
|
r29197 | "hgver": "*", (glob) | ||
"hgverextra": "*", (glob) | ||||
timeless
|
r28440 | "problems": 0, | ||
Danek Duvall
|
r28544 | "pythonexe": "*", (glob) | ||
Sean Farley
|
r28626 | "pythonlib": "*", (glob) | ||
Gregory Szorc
|
r30222 | "pythonsecurity": [*], (glob) | ||
timeless
|
r28440 | "pythonver": "*.*.*", (glob) | ||
Boris Feld
|
r35464 | "re2": (true|false), (re) | ||
timeless
|
r28440 | "templatedirs": "*mercurial?templates", (glob) | ||
"username": "test", | ||||
"usernameerror": null, | ||||
"vinotfound": false | ||||
} | ||||
] | ||||
Pradeepkumar Gayam
|
r11917 | hg debuginstall with no username | ||
$ HGUSER= hg debuginstall | ||||
Martin Geisler
|
r16934 | checking encoding (ascii)... | ||
Matt Mackall
|
r20741 | checking Python executable (*) (glob) | ||
checking Python version (2.*) (glob) | ||||
Adrian Buehlmann
|
r17392 | checking Python lib (*lib*)... (glob) | ||
Gregory Szorc
|
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 (?) | ||||
timeless
|
r29197 | checking Mercurial version (*) (glob) | ||
checking Mercurial custom build (*) (glob) | ||||
timeless
|
r29266 | checking module policy (*) (glob) | ||
Martin Geisler
|
r16934 | checking installed modules (*mercurial)... (glob) | ||
Gregory Szorc
|
r30462 | checking registered compression engines (*zlib*) (glob) | ||
checking available compression engines (*zlib*) (glob) | ||||
Gregory Szorc
|
r30762 | checking available compression engines for wire protocol (*zlib*) (glob) | ||
Boris Feld
|
r35464 | checking "re2" regexp engine \((available|missing)\) (re) | ||
Martin Geisler
|
r16934 | checking templates (*mercurial?templates)... (glob) | ||
timeless
|
r28440 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | ||
Kyle Lippincott
|
r36254 | checking commit editor... (*) (glob) | ||
Martin Geisler
|
r16934 | checking username... | ||
Matt Mackall
|
r20574 | no username supplied | ||
Martin Geisler
|
r12084 | (specify a username in your configuration file) | ||
Pradeepkumar Gayam
|
r11917 | 1 problems detected, please check your install! | ||
Matt Mackall
|
r12316 | [1] | ||
Matt Harbison
|
r24891 | |||
Yuya Nishihara
|
r34131 | hg debuginstall with invalid encoding | ||
$ HGENCODING=invalidenc hg debuginstall | grep encoding | ||||
checking encoding (invalidenc)... | ||||
unknown encoding: invalidenc | ||||
Yuya Nishihara
|
r34132 | exception message in JSON | ||
$ HGENCODING=invalidenc HGUSER= hg debuginstall -Tjson | grep error | ||||
"defaulttemplateerror": null, | ||||
"encodingerror": "unknown encoding: invalidenc", | ||||
"extensionserror": null, (no-pure !) | ||||
"usernameerror": "no username supplied", | ||||
Matt Harbison
|
r24891 | path variables are expanded (~ is the same as $TESTTMP) | ||
$ mkdir tools | ||||
$ touch tools/testeditor.exe | ||||
#if execbit | ||||
$ chmod 755 tools/testeditor.exe | ||||
#endif | ||||
Kyle Lippincott
|
r35538 | $ HGEDITOR="~/tools/testeditor.exe" hg debuginstall | ||
Matt Harbison
|
r24891 | checking encoding (ascii)... | ||
checking Python executable (*) (glob) | ||||
checking Python version (*) (glob) | ||||
checking Python lib (*lib*)... (glob) | ||||
Gregory Szorc
|
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 (?) | ||||
timeless
|
r29197 | checking Mercurial version (*) (glob) | ||
checking Mercurial custom build (*) (glob) | ||||
timeless
|
r29266 | checking module policy (*) (glob) | ||
Matt Harbison
|
r24891 | checking installed modules (*mercurial)... (glob) | ||
Gregory Szorc
|
r30462 | checking registered compression engines (*zlib*) (glob) | ||
checking available compression engines (*zlib*) (glob) | ||||
Gregory Szorc
|
r30762 | checking available compression engines for wire protocol (*zlib*) (glob) | ||
Boris Feld
|
r35464 | checking "re2" regexp engine \((available|missing)\) (re) | ||
Matt Harbison
|
r24891 | checking templates (*mercurial?templates)... (glob) | ||
timeless
|
r28440 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | ||
Kyle Lippincott
|
r35538 | checking commit editor... ($TESTTMP/tools/testeditor.exe) | ||
timeless
|
r28440 | checking username (test) | ||
Matt Harbison
|
r24891 | no problems detected | ||
Matt Harbison
|
r27383 | |||
Kyle Lippincott
|
r36254 | print out the binary post-shlexsplit in the error message when commit editor is | ||
not found (this is intentionally using backslashes to mimic a windows usecase). | ||||
$ HGEDITOR="c:\foo\bar\baz.exe -y -z" hg debuginstall | ||||
checking encoding (ascii)... | ||||
checking Python executable (*) (glob) | ||||
checking Python version (*) (glob) | ||||
checking Python lib (*lib*)... (glob) | ||||
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 (?) | ||||
checking Mercurial version (*) (glob) | ||||
checking Mercurial custom build (*) (glob) | ||||
checking module policy (*) (glob) | ||||
checking installed modules (*mercurial)... (glob) | ||||
checking registered compression engines (*zlib*) (glob) | ||||
checking available compression engines (*zlib*) (glob) | ||||
checking available compression engines for wire protocol (*zlib*) (glob) | ||||
checking "re2" regexp engine \((available|missing)\) (re) | ||||
checking templates (*mercurial?templates)... (glob) | ||||
checking default template (*mercurial?templates?map-cmdline.default) (glob) | ||||
Yuya Nishihara
|
r36327 | checking commit editor... (c:\foo\bar\baz.exe) (windows !) | ||
Can't find editor 'c:\foo\bar\baz.exe' in PATH (windows !) | ||||
checking commit editor... (c:foobarbaz.exe) (no-windows !) | ||||
Can't find editor 'c:foobarbaz.exe' in PATH (no-windows !) | ||||
Kyle Lippincott
|
r36254 | (specify a commit editor in your configuration file) | ||
checking username (test) | ||||
1 problems detected, please check your install! | ||||
[1] | ||||
Matt Harbison
|
r27442 | #if test-repo | ||
timeless
|
r29219 | $ . "$TESTDIR/helpers-testrepo.sh" | ||
Matt Harbison
|
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''' | ||||
Yuya Nishihara
|
r27519 | > dirs = node.findall('./{%(wix)s}Directory' % ns) | ||
Matt Harbison
|
r27383 | > | ||
> for d in dirs: | ||||
> for subfile in directory(d, relpath + d.attrib['Name'] + '/'): | ||||
> yield subfile | ||||
> | ||||
Yuya Nishihara
|
r27519 | > files = node.findall('./{%(wix)s}Component/{%(wix)s}File' % ns) | ||
Matt Harbison
|
r27383 | > | ||
> for f in files: | ||||
> yield relpath + f.attrib['Name'] | ||||
> | ||||
> def hgdirectory(relpath): | ||||
> '''generator of tracked files, rooted at relpath''' | ||||
> hgdir = "%s/../mercurial" % (testdir) | ||||
Matt Harbison
|
r27442 | > args = ['hg', '--cwd', hgdir, 'files', relpath] | ||
Matt Harbison
|
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() | ||||
Yuya Nishihara
|
r27519 | > dir = root.find('.//{%(wix)s}DirectoryRef' % ns) | ||
Matt Harbison
|
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 | ||||
Yuya Nishihara
|
r33199 | $ ( testrepohgenv; $PYTHON wixxml.py help ) | ||
Matt Harbison
|
r27383 | Not installed: | ||
help/common.txt | ||||
Sean Farley
|
r29090 | help/hg-ssh.8.txt | ||
Matt Harbison
|
r27383 | help/hg.1.txt | ||
help/hgignore.5.txt | ||||
help/hgrc.5.txt | ||||
Not tracked: | ||||
Yuya Nishihara
|
r33199 | $ ( testrepohgenv; $PYTHON wixxml.py templates ) | ||
Matt Harbison
|
r27383 | Not installed: | ||
Not tracked: | ||||
Matt Harbison
|
r27442 | |||
#endif | ||||
Augie Fackler
|
r32727 | |||
#if virtualenv | ||||
Verify that Mercurial is installable with pip. Note that this MUST be | ||||
the last test in this file, because we do some nasty things to the | ||||
shell environment in order to make the virtualenv work reliably. | ||||
$ cd $TESTTMP | ||||
Note: --no-site-packages is deprecated, but some places have an | ||||
ancient virtualenv from their linux distro or similar and it's not yet | ||||
the default for them. | ||||
$ unset PYTHONPATH | ||||
Danek Duvall
|
r32944 | $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log | ||
Augie Fackler
|
r32727 | Note: we use this weird path to run pip and hg to avoid platform differences, | ||
since it's bin on most platforms but Scripts on Windows. | ||||
Danek Duvall
|
r32954 | $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log | ||
Augie Fackler
|
r32727 | $ ./installenv/*/hg debuginstall || cat pip.log | ||
checking encoding (ascii)... | ||||
checking Python executable (*) (glob) | ||||
checking Python version (2.*) (glob) | ||||
checking Python lib (*)... (glob) | ||||
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 (?) | ||||
checking Mercurial version (*) (glob) | ||||
checking Mercurial custom build (*) (glob) | ||||
checking module policy (*) (glob) | ||||
checking installed modules (*/mercurial)... (glob) | ||||
checking registered compression engines (*) (glob) | ||||
checking available compression engines (*) (glob) | ||||
checking available compression engines for wire protocol (*) (glob) | ||||
Boris Feld
|
r35464 | checking "re2" regexp engine \((available|missing)\) (re) | ||
Augie Fackler
|
r32727 | checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob) | ||
checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob) | ||||
checking commit editor... (*) (glob) | ||||
checking username (test) | ||||
no problems detected | ||||
#endif | ||||