annotate tests/test-install.t @ 30485:acd30a959980

dispatch: stop supporting non-use of @command We said we'd delete this after 3.8. It's time.
author Augie Fackler <augie@google.com>
date Mon, 21 Nov 2016 21:51:23 -0500
parents 356406ac454f
children 35b516f800e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4365
46280c004f22 change tests to use simplemerge by default
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3846
diff changeset
1 hg debuginstall
11917
b03cf2349a80 tests: unify test-install
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 9734
diff changeset
2 $ hg debuginstall
16934
0c9c41e53f1a debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents: 15447
diff changeset
3 checking encoding (ascii)...
20741
f1dfef0a9352 debuginstall: change showing to checking for consistency and future checking
Matt Mackall <mpm@selenic.com>
parents: 20740
diff changeset
4 checking Python executable (*) (glob)
f1dfef0a9352 debuginstall: change showing to checking for consistency and future checking
Matt Mackall <mpm@selenic.com>
parents: 20740
diff changeset
5 checking Python version (2.*) (glob)
17392
bdd248666dbc debuginstall: show directory for Python lib
Adrian Buehlmann <adrian@cadifra.com>
parents: 16934
diff changeset
6 checking Python lib (*lib*)... (glob)
30222
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
7 checking Python security support (*) (glob)
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
8 TLS 1.2 not supported by Python install; network connections lack modern security (?)
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
9 SNI not supported by Python install; may have connectivity issues with some servers (?)
29197
c5f9ff302065 debuginstall: add mercurial version
timeless <timeless@mozdev.org>
parents: 29090
diff changeset
10 checking Mercurial version (*) (glob)
c5f9ff302065 debuginstall: add mercurial version
timeless <timeless@mozdev.org>
parents: 29090
diff changeset
11 checking Mercurial custom build (*) (glob)
29266
b3a677c82a35 debuginstall: expose modulepolicy
timeless <timeless@mozdev.org>
parents: 29219
diff changeset
12 checking module policy (*) (glob)
16934
0c9c41e53f1a debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents: 15447
diff changeset
13 checking installed modules (*mercurial)... (glob)
30462
356406ac454f debuginstall: print compression engine support
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30222
diff changeset
14 checking registered compression engines (*zlib*) (glob)
356406ac454f debuginstall: print compression engine support
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30222
diff changeset
15 checking available compression engines (*zlib*) (glob)
16934
0c9c41e53f1a debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents: 15447
diff changeset
16 checking templates (*mercurial?templates)... (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
17 checking default template (*mercurial?templates?map-cmdline.default) (glob)
28626
60ee2593a270 tests: python executable should always be globbed
Sean Farley <sean@farley.io>
parents: 28544
diff changeset
18 checking commit editor... (* -c "import sys; sys.exit(0)") (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
19 checking username (test)
16934
0c9c41e53f1a debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents: 15447
diff changeset
20 no problems detected
9734
36c388a1aa51 commands: call ui.username carefully in debuginstall
Martin Geisler <mg@lazybytes.net>
parents: 4365
diff changeset
21
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
22 hg debuginstall JSON
28885
d7e7b3dd44c8 test-install: fix output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 28626
diff changeset
23 $ hg debuginstall -Tjson | sed 's|\\\\|\\|g'
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
24 [
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
25 {
30462
356406ac454f debuginstall: print compression engine support
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30222
diff changeset
26 "compengines": ["bz2", "bz2truncated", "none", "zlib"*], (glob)
356406ac454f debuginstall: print compression engine support
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30222
diff changeset
27 "compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
28 "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob)
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
29 "defaulttemplateerror": null,
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
30 "defaulttemplatenotfound": "default",
28626
60ee2593a270 tests: python executable should always be globbed
Sean Farley <sean@farley.io>
parents: 28544
diff changeset
31 "editor": "* -c \"import sys; sys.exit(0)\"", (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
32 "editornotfound": false,
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
33 "encoding": "ascii",
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
34 "encodingerror": null,
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
35 "extensionserror": null,
29266
b3a677c82a35 debuginstall: expose modulepolicy
timeless <timeless@mozdev.org>
parents: 29219
diff changeset
36 "hgmodulepolicy": "*", (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
37 "hgmodules": "*mercurial", (glob)
29197
c5f9ff302065 debuginstall: add mercurial version
timeless <timeless@mozdev.org>
parents: 29090
diff changeset
38 "hgver": "*", (glob)
c5f9ff302065 debuginstall: add mercurial version
timeless <timeless@mozdev.org>
parents: 29090
diff changeset
39 "hgverextra": "*", (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
40 "problems": 0,
28544
4d93d73b8aec tests: python executable path should always be globbed
Danek Duvall <danek.duvall@oracle.com>
parents: 28440
diff changeset
41 "pythonexe": "*", (glob)
28626
60ee2593a270 tests: python executable should always be globbed
Sean Farley <sean@farley.io>
parents: 28544
diff changeset
42 "pythonlib": "*", (glob)
30222
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
43 "pythonsecurity": [*], (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
44 "pythonver": "*.*.*", (glob)
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
45 "templatedirs": "*mercurial?templates", (glob)
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
46 "username": "test",
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
47 "usernameerror": null,
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
48 "vinotfound": false
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
49 }
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
50 ]
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
51
11917
b03cf2349a80 tests: unify test-install
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 9734
diff changeset
52 hg debuginstall with no username
b03cf2349a80 tests: unify test-install
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 9734
diff changeset
53 $ HGUSER= hg debuginstall
16934
0c9c41e53f1a debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents: 15447
diff changeset
54 checking encoding (ascii)...
20741
f1dfef0a9352 debuginstall: change showing to checking for consistency and future checking
Matt Mackall <mpm@selenic.com>
parents: 20740
diff changeset
55 checking Python executable (*) (glob)
f1dfef0a9352 debuginstall: change showing to checking for consistency and future checking
Matt Mackall <mpm@selenic.com>
parents: 20740
diff changeset
56 checking Python version (2.*) (glob)
17392
bdd248666dbc debuginstall: show directory for Python lib
Adrian Buehlmann <adrian@cadifra.com>
parents: 16934
diff changeset
57 checking Python lib (*lib*)... (glob)
30222
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
58 checking Python security support (*) (glob)
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
59 TLS 1.2 not supported by Python install; network connections lack modern security (?)
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
60 SNI not supported by Python install; may have connectivity issues with some servers (?)
29197
c5f9ff302065 debuginstall: add mercurial version
timeless <timeless@mozdev.org>
parents: 29090
diff changeset
61 checking Mercurial version (*) (glob)
c5f9ff302065 debuginstall: add mercurial version
timeless <timeless@mozdev.org>
parents: 29090
diff changeset
62 checking Mercurial custom build (*) (glob)
29266
b3a677c82a35 debuginstall: expose modulepolicy
timeless <timeless@mozdev.org>
parents: 29219
diff changeset
63 checking module policy (*) (glob)
16934
0c9c41e53f1a debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents: 15447
diff changeset
64 checking installed modules (*mercurial)... (glob)
30462
356406ac454f debuginstall: print compression engine support
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30222
diff changeset
65 checking registered compression engines (*zlib*) (glob)
356406ac454f debuginstall: print compression engine support
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30222
diff changeset
66 checking available compression engines (*zlib*) (glob)
16934
0c9c41e53f1a debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents: 15447
diff changeset
67 checking templates (*mercurial?templates)... (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
68 checking default template (*mercurial?templates?map-cmdline.default) (glob)
28626
60ee2593a270 tests: python executable should always be globbed
Sean Farley <sean@farley.io>
parents: 28544
diff changeset
69 checking commit editor... (* -c "import sys; sys.exit(0)") (glob)
16934
0c9c41e53f1a debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents: 15447
diff changeset
70 checking username...
20574
5614f8cf0861 ui: suggest config --edit when no username is set
Matt Mackall <mpm@selenic.com>
parents: 17392
diff changeset
71 no username supplied
12084
ff7c1118a83a Merge with stable
Martin Geisler <mg@aragost.com>
parents: 12004
diff changeset
72 (specify a username in your configuration file)
11917
b03cf2349a80 tests: unify test-install
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 9734
diff changeset
73 1 problems detected, please check your install!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12084
diff changeset
74 [1]
24891
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
75
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
76 path variables are expanded (~ is the same as $TESTTMP)
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
77 $ mkdir tools
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
78 $ touch tools/testeditor.exe
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
79 #if execbit
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
80 $ chmod 755 tools/testeditor.exe
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
81 #endif
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
82 $ hg debuginstall --config ui.editor=~/tools/testeditor.exe
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
83 checking encoding (ascii)...
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
84 checking Python executable (*) (glob)
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
85 checking Python version (*) (glob)
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
86 checking Python lib (*lib*)... (glob)
30222
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
87 checking Python security support (*) (glob)
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
88 TLS 1.2 not supported by Python install; network connections lack modern security (?)
7b428b00a1d4 commands: print security protocol support in debuginstall
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29266
diff changeset
89 SNI not supported by Python install; may have connectivity issues with some servers (?)
29197
c5f9ff302065 debuginstall: add mercurial version
timeless <timeless@mozdev.org>
parents: 29090
diff changeset
90 checking Mercurial version (*) (glob)
c5f9ff302065 debuginstall: add mercurial version
timeless <timeless@mozdev.org>
parents: 29090
diff changeset
91 checking Mercurial custom build (*) (glob)
29266
b3a677c82a35 debuginstall: expose modulepolicy
timeless <timeless@mozdev.org>
parents: 29219
diff changeset
92 checking module policy (*) (glob)
24891
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
93 checking installed modules (*mercurial)... (glob)
30462
356406ac454f debuginstall: print compression engine support
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30222
diff changeset
94 checking registered compression engines (*zlib*) (glob)
356406ac454f debuginstall: print compression engine support
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30222
diff changeset
95 checking available compression engines (*zlib*) (glob)
24891
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
96 checking templates (*mercurial?templates)... (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
97 checking default template (*mercurial?templates?map-cmdline.default) (glob)
28626
60ee2593a270 tests: python executable should always be globbed
Sean Farley <sean@farley.io>
parents: 28544
diff changeset
98 checking commit editor... (* -c "import sys; sys.exit(0)") (glob)
28440
855d9b2eea67 debuginstall: convert to formatter
timeless <timeless@mozdev.org>
parents: 27684
diff changeset
99 checking username (test)
24891
be4915009b09 debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents: 20741
diff changeset
100 no problems detected
27383
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
101
27442
f67c6d8cc606 test-install: perform the wix checking on wdir() instead of "."
Matt Harbison <matt_harbison@yahoo.com>
parents: 27384
diff changeset
102 #if test-repo
29219
3c9066ed557c tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents: 29197
diff changeset
103 $ . "$TESTDIR/helpers-testrepo.sh"
3c9066ed557c tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents: 29197
diff changeset
104
27383
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
105 $ cat >> wixxml.py << EOF
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
106 > import os, subprocess, sys
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
107 > import xml.etree.ElementTree as ET
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
108 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
109 > # MSYS mangles the path if it expands $TESTDIR
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
110 > testdir = os.environ['TESTDIR']
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
111 > ns = {'wix' : 'http://schemas.microsoft.com/wix/2006/wi'}
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
112 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
113 > def directory(node, relpath):
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
114 > '''generator of files in the xml node, rooted at relpath'''
27519
f4517c88ab81 test-install: embed wix namespace for Python 2.6 compatibility
Yuya Nishihara <yuya@tcha.org>
parents: 27442
diff changeset
115 > dirs = node.findall('./{%(wix)s}Directory' % ns)
27383
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
116 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
117 > for d in dirs:
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
118 > for subfile in directory(d, relpath + d.attrib['Name'] + '/'):
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
119 > yield subfile
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
120 >
27519
f4517c88ab81 test-install: embed wix namespace for Python 2.6 compatibility
Yuya Nishihara <yuya@tcha.org>
parents: 27442
diff changeset
121 > files = node.findall('./{%(wix)s}Component/{%(wix)s}File' % ns)
27383
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
122 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
123 > for f in files:
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
124 > yield relpath + f.attrib['Name']
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
125 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
126 > def hgdirectory(relpath):
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
127 > '''generator of tracked files, rooted at relpath'''
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
128 > hgdir = "%s/../mercurial" % (testdir)
27442
f67c6d8cc606 test-install: perform the wix checking on wdir() instead of "."
Matt Harbison <matt_harbison@yahoo.com>
parents: 27384
diff changeset
129 > args = ['hg', '--cwd', hgdir, 'files', relpath]
27383
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
130 > proc = subprocess.Popen(args, stdout=subprocess.PIPE,
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
131 > stderr=subprocess.PIPE)
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
132 > output = proc.communicate()[0]
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
133 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
134 > slash = '/'
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
135 > for line in output.splitlines():
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
136 > if os.name == 'nt':
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
137 > yield line.replace(os.sep, slash)
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
138 > else:
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
139 > yield line
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
140 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
141 > tracked = [f for f in hgdirectory(sys.argv[1])]
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
142 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
143 > xml = ET.parse("%s/../contrib/wix/%s.wxs" % (testdir, sys.argv[1]))
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
144 > root = xml.getroot()
27519
f4517c88ab81 test-install: embed wix namespace for Python 2.6 compatibility
Yuya Nishihara <yuya@tcha.org>
parents: 27442
diff changeset
145 > dir = root.find('.//{%(wix)s}DirectoryRef' % ns)
27383
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
146 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
147 > installed = [f for f in directory(dir, '')]
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
148 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
149 > print('Not installed:')
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
150 > for f in sorted(set(tracked) - set(installed)):
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
151 > print(' %s' % f)
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
152 >
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
153 > print('Not tracked:')
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
154 > for f in sorted(set(installed) - set(tracked)):
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
155 > print(' %s' % f)
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
156 > EOF
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
157
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
158 $ python wixxml.py help
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
159 Not installed:
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
160 help/common.txt
29090
7b52cb384c38 hg-ssh: copy doc string to man page
Sean Farley <sean@farley.io>
parents: 28885
diff changeset
161 help/hg-ssh.8.txt
27383
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
162 help/hg.1.txt
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
163 help/hgignore.5.txt
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
164 help/hgrc.5.txt
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
165 Not tracked:
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
166
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
167 $ python wixxml.py templates
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
168 Not installed:
b1160299a175 tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents: 24891
diff changeset
169 Not tracked:
27442
f67c6d8cc606 test-install: perform the wix checking on wdir() instead of "."
Matt Harbison <matt_harbison@yahoo.com>
parents: 27384
diff changeset
170
f67c6d8cc606 test-install: perform the wix checking on wdir() instead of "."
Matt Harbison <matt_harbison@yahoo.com>
parents: 27384
diff changeset
171 #endif