author | Durham Goode <durham@fb.com> |
Mon, 08 Feb 2016 14:17:11 -0800 | |
changeset 28116 | ba8257cb53e8 |
parent 27684 | e9857fbfd072 |
child 28440 | 855d9b2eea67 |
permissions | -rw-r--r-- |
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) |
16934
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
7 |
checking installed modules (*mercurial)... (glob) |
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
8 |
checking templates (*mercurial?templates)... (glob) |
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
9 |
checking commit editor... |
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
10 |
checking username... |
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
11 |
no problems detected |
9734
36c388a1aa51
commands: call ui.username carefully in debuginstall
Martin Geisler <mg@lazybytes.net>
parents:
4365
diff
changeset
|
12 |
|
11917
b03cf2349a80
tests: unify test-install
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
9734
diff
changeset
|
13 |
hg debuginstall with no username |
b03cf2349a80
tests: unify test-install
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
9734
diff
changeset
|
14 |
$ HGUSER= hg debuginstall |
16934
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
15 |
checking encoding (ascii)... |
20741
f1dfef0a9352
debuginstall: change showing to checking for consistency and future checking
Matt Mackall <mpm@selenic.com>
parents:
20740
diff
changeset
|
16 |
checking Python executable (*) (glob) |
f1dfef0a9352
debuginstall: change showing to checking for consistency and future checking
Matt Mackall <mpm@selenic.com>
parents:
20740
diff
changeset
|
17 |
checking Python version (2.*) (glob) |
17392
bdd248666dbc
debuginstall: show directory for Python lib
Adrian Buehlmann <adrian@cadifra.com>
parents:
16934
diff
changeset
|
18 |
checking Python lib (*lib*)... (glob) |
16934
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
19 |
checking installed modules (*mercurial)... (glob) |
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
20 |
checking templates (*mercurial?templates)... (glob) |
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
21 |
checking commit editor... |
0c9c41e53f1a
debuginstall: lowercase status messages
Martin Geisler <mg@aragost.com>
parents:
15447
diff
changeset
|
22 |
checking username... |
20574
5614f8cf0861
ui: suggest config --edit when no username is set
Matt Mackall <mpm@selenic.com>
parents:
17392
diff
changeset
|
23 |
no username supplied |
12084 | 24 |
(specify a username in your configuration file) |
11917
b03cf2349a80
tests: unify test-install
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
9734
diff
changeset
|
25 |
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
|
26 |
[1] |
24891
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
27 |
|
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
28 |
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
|
29 |
$ mkdir tools |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
30 |
$ 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
|
31 |
#if execbit |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
32 |
$ 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
|
33 |
#endif |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
34 |
$ 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
|
35 |
checking encoding (ascii)... |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
36 |
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
|
37 |
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
|
38 |
checking Python lib (*lib*)... (glob) |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
39 |
checking installed modules (*mercurial)... (glob) |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
40 |
checking templates (*mercurial?templates)... (glob) |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
41 |
checking commit editor... |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
42 |
checking username... |
be4915009b09
debuginstall: expand the editor path before searching for it (issue4380)
Matt Harbison <matt_harbison@yahoo.com>
parents:
20741
diff
changeset
|
43 |
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
|
44 |
|
27442
f67c6d8cc606
test-install: perform the wix checking on wdir() instead of "."
Matt Harbison <matt_harbison@yahoo.com>
parents:
27384
diff
changeset
|
45 |
#if test-repo |
27383
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
46 |
$ 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
|
47 |
> 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
|
48 |
> 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
|
49 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
50 |
> # 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
|
51 |
> 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
|
52 |
> 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
|
53 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
54 |
> 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
|
55 |
> '''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
|
56 |
> 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
|
57 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
58 |
> 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
|
59 |
> 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
|
60 |
> yield subfile |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
61 |
> |
27519
f4517c88ab81
test-install: embed wix namespace for Python 2.6 compatibility
Yuya Nishihara <yuya@tcha.org>
parents:
27442
diff
changeset
|
62 |
> 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
|
63 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
64 |
> 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
|
65 |
> 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
|
66 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
67 |
> 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
|
68 |
> '''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
|
69 |
> 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
|
70 |
> 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
|
71 |
> 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
|
72 |
> 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
|
73 |
> 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
|
74 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
75 |
> slash = '/' |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
76 |
> 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
|
77 |
> 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
|
78 |
> 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
|
79 |
> else: |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
80 |
> yield line |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
81 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
82 |
> 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
|
83 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
84 |
> 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
|
85 |
> root = xml.getroot() |
27519
f4517c88ab81
test-install: embed wix namespace for Python 2.6 compatibility
Yuya Nishihara <yuya@tcha.org>
parents:
27442
diff
changeset
|
86 |
> 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
|
87 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
88 |
> 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
|
89 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
90 |
> 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
|
91 |
> 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
|
92 |
> 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
|
93 |
> |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
94 |
> 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
|
95 |
> 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
|
96 |
> 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
|
97 |
> EOF |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
98 |
|
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
99 |
$ 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
|
100 |
Not installed: |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
101 |
help/common.txt |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
102 |
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
|
103 |
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
|
104 |
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
|
105 |
Not tracked: |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
106 |
|
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
107 |
$ 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
|
108 |
Not installed: |
b1160299a175
tests: add coverage to ensure Wix tracks 'help' and 'templates' files
Matt Harbison <matt_harbison@yahoo.com>
parents:
24891
diff
changeset
|
109 |
Not tracked: |
27442
f67c6d8cc606
test-install: perform the wix checking on wdir() instead of "."
Matt Harbison <matt_harbison@yahoo.com>
parents:
27384
diff
changeset
|
110 |
|
f67c6d8cc606
test-install: perform the wix checking on wdir() instead of "."
Matt Harbison <matt_harbison@yahoo.com>
parents:
27384
diff
changeset
|
111 |
#endif |