Show More
@@ -1,37 +1,36 | |||
|
1 | 1 | # Invoke the system hg installation (rather than the local hg version being |
|
2 | 2 | # tested). |
|
3 | 3 | # |
|
4 | 4 | # We want to use the hg version being tested when interacting with the test |
|
5 | 5 | # repository, and the system hg when interacting with the mercurial source code |
|
6 | 6 | # repository. |
|
7 | 7 | # |
|
8 | 8 | # The mercurial source repository was typically orignally cloned with the |
|
9 | 9 | # system mercurial installation, and may require extensions or settings from |
|
10 | 10 | # the system installation. |
|
11 | 11 | syshg () { |
|
12 | 12 | ( |
|
13 | 13 | syshgenv |
|
14 | 14 | exec hg "$@" |
|
15 | 15 | ) |
|
16 | 16 | } |
|
17 | 17 | |
|
18 | 18 | # Revert the environment so that running "hg" runs the system hg |
|
19 | 19 | # rather than the test hg installation. |
|
20 | 20 | syshgenv () { |
|
21 | 21 | . "$HGTEST_RESTOREENV" |
|
22 | 22 | HGPLAIN=1 |
|
23 | 23 | export HGPLAIN |
|
24 | 24 | } |
|
25 | 25 | |
|
26 | 26 | # Most test-check-* sourcing this file run "hg files", which is not available |
|
27 | 27 | # in ancient versions of hg. So we double check if "syshg files" works and |
|
28 | 28 | # fallback to hg bundled in the repo. |
|
29 | 29 | syshg files -h >/dev/null 2>/dev/null |
|
30 |
if [ $? - |
|
|
31 | syshg() { | |
|
32 | hg "$@" | |
|
33 | } | |
|
34 | syshgenv() { | |
|
35 | : | |
|
36 | } | |
|
30 | if [ $? -eq 0 ]; then | |
|
31 | alias testrepohg=syshg | |
|
32 | alias testrepohgenv=syshgenv | |
|
33 | else | |
|
34 | alias testrepohg=hg | |
|
35 | alias testrepohgenv=: | |
|
37 | 36 | fi |
@@ -1,49 +1,50 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | $ check_code="$TESTDIR"/../contrib/check-code.py |
|
5 | 5 | $ cd "$TESTDIR"/.. |
|
6 | 6 | |
|
7 | 7 | New errors are not allowed. Warnings are strongly discouraged. |
|
8 | 8 | (The writing "no-che?k-code" is for not skipping this file when checking.) |
|
9 | 9 | |
|
10 |
$ |
|
|
10 | $ testrepohg locate -X contrib/python-zstandard \ | |
|
11 | > -X hgext/fsmonitor/pywatchman | | |
|
11 | 12 | > sed 's-\\-/-g' | "$check_code" --warnings --per-file=0 - || false |
|
12 | 13 | Skipping i18n/polib.py it has no-che?k-code (glob) |
|
13 | 14 | Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob) |
|
14 | 15 | Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob) |
|
15 | 16 | Skipping mercurial/statprof.py it has no-che?k-code (glob) |
|
16 | 17 | Skipping tests/badserverext.py it has no-che?k-code (glob) |
|
17 | 18 | |
|
18 | 19 | @commands in debugcommands.py should be in alphabetical order. |
|
19 | 20 | |
|
20 | 21 | >>> import re |
|
21 | 22 | >>> commands = [] |
|
22 | 23 | >>> with open('mercurial/debugcommands.py', 'rb') as fh: |
|
23 | 24 | ... for line in fh: |
|
24 | 25 | ... m = re.match("^@command\('([a-z]+)", line) |
|
25 | 26 | ... if m: |
|
26 | 27 | ... commands.append(m.group(1)) |
|
27 | 28 | >>> scommands = list(sorted(commands)) |
|
28 | 29 | >>> for i, command in enumerate(scommands): |
|
29 | 30 | ... if command != commands[i]: |
|
30 | 31 | ... print('commands in debugcommands.py not sorted; first differing ' |
|
31 | 32 | ... 'command is %s; expected %s' % (commands[i], command)) |
|
32 | 33 | ... break |
|
33 | 34 | |
|
34 | 35 | Prevent adding new files in the root directory accidentally. |
|
35 | 36 | |
|
36 |
$ |
|
|
37 | $ testrepohg files 'glob:*' | |
|
37 | 38 | .editorconfig |
|
38 | 39 | .hgignore |
|
39 | 40 | .hgsigs |
|
40 | 41 | .hgtags |
|
41 | 42 | CONTRIBUTING |
|
42 | 43 | CONTRIBUTORS |
|
43 | 44 | COPYING |
|
44 | 45 | Makefile |
|
45 | 46 | README |
|
46 | 47 | hg |
|
47 | 48 | hgeditor |
|
48 | 49 | hgweb.cgi |
|
49 | 50 | setup.py |
@@ -1,21 +1,22 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | Enable obsolescence to avoid the warning issue when obsmarker are found |
|
4 | 4 | |
|
5 | 5 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
6 | 6 | |
|
7 | 7 | Go back in the hg repo |
|
8 | 8 | |
|
9 | 9 | $ cd $TESTDIR/.. |
|
10 | 10 | |
|
11 |
$ for node in ` |
|
|
12 | > syshg export --git $node | contrib/check-commit > ${TESTTMP}/check-commit.out | |
|
11 | $ for node in `testrepohg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do | |
|
12 | > testrepohg export --git $node \ | |
|
13 | > | contrib/check-commit > ${TESTTMP}/check-commit.out | |
|
13 | 14 | > if [ $? -ne 0 ]; then |
|
14 | 15 | > echo "Revision $node does not comply with rules" |
|
15 | 16 | > echo '------------------------------------------------------' |
|
16 | 17 | > cat ${TESTTMP}/check-commit.out |
|
17 | 18 | > echo |
|
18 | 19 | > fi |
|
19 | 20 | > done |
|
20 | 21 | |
|
21 | 22 |
@@ -1,47 +1,47 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | |
|
5 | 5 | Sanity check check-config.py |
|
6 | 6 | |
|
7 | 7 | $ cat > testfile.py << EOF |
|
8 | 8 | > # Good |
|
9 | 9 | > foo = ui.config('ui', 'username') |
|
10 | 10 | > # Missing |
|
11 | 11 | > foo = ui.config('ui', 'doesnotexist') |
|
12 | 12 | > # Missing different type |
|
13 | 13 | > foo = ui.configint('ui', 'missingint') |
|
14 | 14 | > # Missing with default value |
|
15 | 15 | > foo = ui.configbool('ui', 'missingbool1', default=True) |
|
16 | 16 | > foo = ui.configbool('ui', 'missingbool2', False) |
|
17 | 17 | > # Inconsistent values for defaults. |
|
18 | 18 | > foo = ui.configint('ui', 'intdefault', default=1) |
|
19 | 19 | > foo = ui.configint('ui', 'intdefault', default=42) |
|
20 | 20 | > # Can suppress inconsistent value error |
|
21 | 21 | > foo = ui.configint('ui', 'intdefault2', default=1) |
|
22 | 22 | > # inconsistent config: ui.intdefault2 |
|
23 | 23 | > foo = ui.configint('ui', 'intdefault2', default=42) |
|
24 | 24 | > EOF |
|
25 | 25 | |
|
26 | 26 | $ cat > files << EOF |
|
27 | 27 | > mercurial/help/config.txt |
|
28 | 28 | > $TESTTMP/testfile.py |
|
29 | 29 | > EOF |
|
30 | 30 | |
|
31 | 31 | $ cd "$TESTDIR"/.. |
|
32 | 32 | |
|
33 | 33 | $ $PYTHON contrib/check-config.py < $TESTTMP/files |
|
34 | 34 | foo = ui.configint('ui', 'intdefault', default=42) |
|
35 | 35 | |
|
36 | 36 | conflict on ui.intdefault: ('int', '42') != ('int', '1') |
|
37 | 37 | undocumented: ui.doesnotexist (str) |
|
38 | 38 | undocumented: ui.intdefault (int) [42] |
|
39 | 39 | undocumented: ui.intdefault2 (int) [42] |
|
40 | 40 | undocumented: ui.missingbool1 (bool) [True] |
|
41 | 41 | undocumented: ui.missingbool2 (bool) |
|
42 | 42 | undocumented: ui.missingint (int) |
|
43 | 43 | |
|
44 | 44 | New errors are not allowed. Warnings are strongly discouraged. |
|
45 | 45 | |
|
46 |
$ |
|
|
46 | $ testrepohg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' | | |
|
47 | 47 | > $PYTHON contrib/check-config.py |
@@ -1,24 +1,24 | |||
|
1 | 1 | #require test-repo execbit |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | $ cd "`dirname "$TESTDIR"`" |
|
5 | 5 | |
|
6 | 6 | look for python scripts without the execute bit |
|
7 | 7 | |
|
8 |
$ |
|
|
8 | $ testrepohg files 'set:**.py and not exec() and grep(r"^#!.*?python")' | |
|
9 | 9 | [1] |
|
10 | 10 | |
|
11 | 11 | look for python scripts with execute bit but not shebang |
|
12 | 12 | |
|
13 |
$ |
|
|
13 | $ testrepohg files 'set:**.py and exec() and not grep(r"^#!.*?python")' | |
|
14 | 14 | [1] |
|
15 | 15 | |
|
16 | 16 | look for shell scripts with execute bit but not shebang |
|
17 | 17 | |
|
18 |
$ |
|
|
18 | $ testrepohg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")' | |
|
19 | 19 | [1] |
|
20 | 20 | |
|
21 | 21 | look for non scripts with no shebang |
|
22 | 22 | |
|
23 |
$ |
|
|
23 | $ testrepohg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")' | |
|
24 | 24 | [1] |
@@ -1,29 +1,29 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | |
|
5 | 5 | $ cat <<'EOF' > scanhelptopics.py |
|
6 | 6 | > from __future__ import absolute_import, print_function |
|
7 | 7 | > import re |
|
8 | 8 | > import sys |
|
9 | 9 | > if sys.platform == "win32": |
|
10 | 10 | > import os, msvcrt |
|
11 | 11 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
|
12 | 12 | > topics = set() |
|
13 | 13 | > topicre = re.compile(r':hg:`help ([a-z0-9\-.]+)`') |
|
14 | 14 | > for fname in sys.argv: |
|
15 | 15 | > with open(fname) as f: |
|
16 | 16 | > topics.update(m.group(1) for m in topicre.finditer(f.read())) |
|
17 | 17 | > for s in sorted(topics): |
|
18 | 18 | > print(s) |
|
19 | 19 | > EOF |
|
20 | 20 | |
|
21 | 21 | $ cd "$TESTDIR"/.. |
|
22 | 22 | |
|
23 | 23 | Check if ":hg:`help TOPIC`" is valid: |
|
24 | 24 | (use "xargs -n1 -t" to see which help commands are executed) |
|
25 | 25 | |
|
26 |
$ |
|
|
26 | $ testrepohg files 'glob:{hgdemandimport,hgext,mercurial}/**/*.py' \ | |
|
27 | 27 | > | sed 's|\\|/|g' \ |
|
28 | 28 | > | xargs $PYTHON "$TESTTMP/scanhelptopics.py" \ |
|
29 | 29 | > | xargs -n1 hg help > /dev/null |
@@ -1,40 +1,40 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | $ import_checker="$TESTDIR"/../contrib/import-checker.py |
|
5 | 5 | |
|
6 | 6 | $ cd "$TESTDIR"/.. |
|
7 | 7 | |
|
8 | 8 | There are a handful of cases here that require renaming a module so it |
|
9 | 9 | doesn't overlap with a stdlib module name. There are also some cycles |
|
10 | 10 | here that we should still endeavor to fix, and some cycles will be |
|
11 | 11 | hidden by deduplication algorithm in the cycle detector, so fixing |
|
12 | 12 | these may expose other cycles. |
|
13 | 13 | |
|
14 | 14 | Known-bad files are excluded by -X as some of them would produce unstable |
|
15 | 15 | outputs, which should be fixed later. |
|
16 | 16 | |
|
17 |
$ |
|
|
17 | $ testrepohg locate 'set:**.py or grep(r"^#!.*?python")' \ | |
|
18 | 18 | > 'tests/**.t' \ |
|
19 | 19 | > -X contrib/debugshell.py \ |
|
20 | 20 | > -X contrib/python-zstandard/ \ |
|
21 | 21 | > -X contrib/win32/hgwebdir_wsgi.py \ |
|
22 | 22 | > -X doc/gendoc.py \ |
|
23 | 23 | > -X doc/hgmanpage.py \ |
|
24 | 24 | > -X i18n/posplit \ |
|
25 | 25 | > -X tests/test-hgweb-auth.py \ |
|
26 | 26 | > -X tests/hypothesishelpers.py \ |
|
27 | 27 | > -X tests/test-ctxmanager.py \ |
|
28 | 28 | > -X tests/test-lock.py \ |
|
29 | 29 | > -X tests/test-verify-repo-operations.py \ |
|
30 | 30 | > -X tests/test-hook.t \ |
|
31 | 31 | > -X tests/test-import.t \ |
|
32 | 32 | > -X tests/test-imports-checker.t \ |
|
33 | 33 | > -X tests/test-commit-interactive.t \ |
|
34 | 34 | > -X tests/test-contrib-check-code.t \ |
|
35 | 35 | > -X tests/test-extension.t \ |
|
36 | 36 | > -X tests/test-hghave.t \ |
|
37 | 37 | > -X tests/test-hgweb-no-path-info.t \ |
|
38 | 38 | > -X tests/test-hgweb-no-request-uri.t \ |
|
39 | 39 | > -X tests/test-hgweb-non-interactive.t \ |
|
40 | 40 | > | sed 's-\\-/-g' | python "$import_checker" - |
@@ -1,44 +1,46 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | $ cd "$TESTDIR"/.. |
|
5 | 5 | |
|
6 |
$ |
|
|
6 | $ testrepohg files 'set:(**.py)' | sed 's|\\|/|g' \ | |
|
7 | > | xargs $PYTHON contrib/check-py3-compat.py | |
|
7 | 8 | contrib/python-zstandard/setup.py not using absolute_import |
|
8 | 9 | contrib/python-zstandard/setup_zstd.py not using absolute_import |
|
9 | 10 | contrib/python-zstandard/tests/common.py not using absolute_import |
|
10 | 11 | contrib/python-zstandard/tests/test_buffer_util.py not using absolute_import |
|
11 | 12 | contrib/python-zstandard/tests/test_compressor.py not using absolute_import |
|
12 | 13 | contrib/python-zstandard/tests/test_compressor_fuzzing.py not using absolute_import |
|
13 | 14 | contrib/python-zstandard/tests/test_data_structures.py not using absolute_import |
|
14 | 15 | contrib/python-zstandard/tests/test_data_structures_fuzzing.py not using absolute_import |
|
15 | 16 | contrib/python-zstandard/tests/test_decompressor.py not using absolute_import |
|
16 | 17 | contrib/python-zstandard/tests/test_decompressor_fuzzing.py not using absolute_import |
|
17 | 18 | contrib/python-zstandard/tests/test_estimate_sizes.py not using absolute_import |
|
18 | 19 | contrib/python-zstandard/tests/test_module_attributes.py not using absolute_import |
|
19 | 20 | contrib/python-zstandard/tests/test_train_dictionary.py not using absolute_import |
|
20 | 21 | i18n/check-translation.py not using absolute_import |
|
21 | 22 | setup.py not using absolute_import |
|
22 | 23 | tests/test-demandimport.py not using absolute_import |
|
23 | 24 | |
|
24 | 25 | #if py3exe |
|
25 |
$ |
|
|
26 | $ testrepohg files 'set:(**.py) - grep(pygments)' \ | |
|
27 | > -X hgext/fsmonitor/pywatchman \ | |
|
26 | 28 | > | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py \ |
|
27 | 29 | > | sed 's/[0-9][0-9]*)$/*)/' |
|
28 | 30 | hgext/convert/transport.py: error importing: <*Error> No module named 'svn.client' (error at transport.py:*) (glob) |
|
29 | 31 | mercurial/cffi/bdiff.py: error importing: <ImportError> cannot import name '_bdiff' (error at bdiff.py:*) |
|
30 | 32 | mercurial/cffi/bdiffbuild.py: error importing: <ImportError> No module named 'cffi' (error at bdiffbuild.py:*) |
|
31 | 33 | mercurial/cffi/mpatch.py: error importing: <ImportError> cannot import name '_mpatch' (error at mpatch.py:*) |
|
32 | 34 | mercurial/cffi/mpatchbuild.py: error importing: <ImportError> No module named 'cffi' (error at mpatchbuild.py:*) |
|
33 | 35 | mercurial/cffi/osutilbuild.py: error importing: <ImportError> No module named 'cffi' (error at osutilbuild.py:*) |
|
34 | 36 | mercurial/scmwindows.py: error importing: <*Error> No module named 'msvcrt' (error at win32.py:*) (glob) |
|
35 | 37 | mercurial/win32.py: error importing: <*Error> No module named 'msvcrt' (error at win32.py:*) (glob) |
|
36 | 38 | mercurial/windows.py: error importing: <*Error> No module named 'msvcrt' (error at windows.py:*) (glob) |
|
37 | 39 | |
|
38 | 40 | #endif |
|
39 | 41 | |
|
40 | 42 | #if py3exe py3pygments |
|
41 |
$ |
|
|
43 | $ testrepohg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \ | |
|
42 | 44 | > | xargs $PYTHON3 contrib/check-py3-compat.py \ |
|
43 | 45 | > | sed 's/[0-9][0-9]*)$/*)/' |
|
44 | 46 | #endif |
@@ -1,15 +1,15 | |||
|
1 | 1 | #require test-repo pyflakes hg10 |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | $ cd "`dirname "$TESTDIR"`" |
|
5 | 5 | |
|
6 | 6 | run pyflakes on all tracked files ending in .py or without a file ending |
|
7 | 7 | (skipping binary file random-seed) |
|
8 | 8 | |
|
9 |
$ |
|
|
9 | $ testrepohg locate 'set:**.py or grep("^#!.*python")' \ | |
|
10 | 10 | > -X hgext/fsmonitor/pywatchman \ |
|
11 | 11 | > -X mercurial/pycompat.py -X contrib/python-zstandard \ |
|
12 | 12 | > 2>/dev/null \ |
|
13 | 13 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
|
14 | 14 | tests/filterpyflakes.py:41: undefined name 'undefinedname' |
|
15 | 15 |
@@ -1,25 +1,25 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | $ cd "`dirname "$TESTDIR"`" |
|
5 | 5 | |
|
6 | 6 | look for python scripts that do not use /usr/bin/env |
|
7 | 7 | |
|
8 |
$ |
|
|
8 | $ testrepohg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bi{1}n/env python") - **/*.t' | |
|
9 | 9 | [1] |
|
10 | 10 | |
|
11 | 11 | In tests, enforce $PYTHON and *not* /usr/bin/env python or similar: |
|
12 |
$ |
|
|
12 | $ testrepohg files 'set:grep(r"#!.*?python") and **/*.t' \ | |
|
13 | 13 | > -X tests/test-check-execute.t \ |
|
14 | 14 | > -X tests/test-check-module-imports.t \ |
|
15 | 15 | > -X tests/test-check-pyflakes.t \ |
|
16 | 16 | > -X tests/test-check-shbang.t |
|
17 | 17 | [1] |
|
18 | 18 | |
|
19 | 19 | The above exclusions are because they're looking for files that |
|
20 | 20 | contain Python but don't end in .py - please avoid adding more. |
|
21 | 21 | |
|
22 | 22 | look for shell scripts that do not use /bin/sh |
|
23 | 23 | |
|
24 |
$ |
|
|
24 | $ testrepohg files 'set:grep(r"^#!.*/bi{1}n/sh") and not grep(r"^#!/bi{1}n/sh")' | |
|
25 | 25 | [1] |
@@ -1,175 +1,175 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | Set vars: |
|
4 | 4 | |
|
5 | 5 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
6 | 6 | $ CONTRIBDIR="$TESTDIR/../contrib" |
|
7 | 7 | |
|
8 | 8 | Prepare repo: |
|
9 | 9 | |
|
10 | 10 | $ hg init |
|
11 | 11 | |
|
12 | 12 | $ echo this is file a > a |
|
13 | 13 | $ hg add a |
|
14 | 14 | $ hg commit -m first |
|
15 | 15 | |
|
16 | 16 | $ echo adding to file a >> a |
|
17 | 17 | $ hg commit -m second |
|
18 | 18 | |
|
19 | 19 | $ echo adding more to file a >> a |
|
20 | 20 | $ hg commit -m third |
|
21 | 21 | |
|
22 | 22 | $ hg up -r 0 |
|
23 | 23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 24 | $ echo merge-this >> a |
|
25 | 25 | $ hg commit -m merge-able |
|
26 | 26 | created new head |
|
27 | 27 | |
|
28 | 28 | $ hg up -r 2 |
|
29 | 29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
30 | 30 | |
|
31 | 31 | perfstatus |
|
32 | 32 | |
|
33 | 33 | $ cat >> $HGRCPATH << EOF |
|
34 | 34 | > [extensions] |
|
35 | 35 | > perfstatusext=$CONTRIBDIR/perf.py |
|
36 | 36 | > [perf] |
|
37 | 37 | > presleep=0 |
|
38 | 38 | > stub=on |
|
39 | 39 | > parentscount=1 |
|
40 | 40 | > EOF |
|
41 | 41 | $ hg help perfstatusext |
|
42 | 42 | perfstatusext extension - helper extension to measure performance |
|
43 | 43 | |
|
44 | 44 | list of commands: |
|
45 | 45 | |
|
46 | 46 | perfaddremove |
|
47 | 47 | (no help text available) |
|
48 | 48 | perfancestors |
|
49 | 49 | (no help text available) |
|
50 | 50 | perfancestorset |
|
51 | 51 | (no help text available) |
|
52 | 52 | perfannotate (no help text available) |
|
53 | 53 | perfbdiff benchmark a bdiff between revisions |
|
54 | 54 | perfbookmarks |
|
55 | 55 | benchmark parsing bookmarks from disk to memory |
|
56 | 56 | perfbranchmap |
|
57 | 57 | benchmark the update of a branchmap |
|
58 | 58 | perfcca (no help text available) |
|
59 | 59 | perfchangegroupchangelog |
|
60 | 60 | Benchmark producing a changelog group for a changegroup. |
|
61 | 61 | perfchangeset |
|
62 | 62 | (no help text available) |
|
63 | 63 | perfctxfiles (no help text available) |
|
64 | 64 | perfdiffwd Profile diff of working directory changes |
|
65 | 65 | perfdirfoldmap |
|
66 | 66 | (no help text available) |
|
67 | 67 | perfdirs (no help text available) |
|
68 | 68 | perfdirstate (no help text available) |
|
69 | 69 | perfdirstatedirs |
|
70 | 70 | (no help text available) |
|
71 | 71 | perfdirstatefoldmap |
|
72 | 72 | (no help text available) |
|
73 | 73 | perfdirstatewrite |
|
74 | 74 | (no help text available) |
|
75 | 75 | perffncacheencode |
|
76 | 76 | (no help text available) |
|
77 | 77 | perffncacheload |
|
78 | 78 | (no help text available) |
|
79 | 79 | perffncachewrite |
|
80 | 80 | (no help text available) |
|
81 | 81 | perfheads (no help text available) |
|
82 | 82 | perfindex (no help text available) |
|
83 | 83 | perfloadmarkers |
|
84 | 84 | benchmark the time to parse the on-disk markers for a repo |
|
85 | 85 | perflog (no help text available) |
|
86 | 86 | perflookup (no help text available) |
|
87 | 87 | perflrucachedict |
|
88 | 88 | (no help text available) |
|
89 | 89 | perfmanifest (no help text available) |
|
90 | 90 | perfmergecalculate |
|
91 | 91 | (no help text available) |
|
92 | 92 | perfmoonwalk benchmark walking the changelog backwards |
|
93 | 93 | perfnodelookup |
|
94 | 94 | (no help text available) |
|
95 | 95 | perfparents (no help text available) |
|
96 | 96 | perfpathcopies |
|
97 | 97 | (no help text available) |
|
98 | 98 | perfphases benchmark phasesets computation |
|
99 | 99 | perfrawfiles (no help text available) |
|
100 | 100 | perfrevlogchunks |
|
101 | 101 | Benchmark operations on revlog chunks. |
|
102 | 102 | perfrevlogindex |
|
103 | 103 | Benchmark operations against a revlog index. |
|
104 | 104 | perfrevlogrevision |
|
105 | 105 | Benchmark obtaining a revlog revision. |
|
106 | 106 | perfrevlogrevisions |
|
107 | 107 | Benchmark reading a series of revisions from a revlog. |
|
108 | 108 | perfrevrange (no help text available) |
|
109 | 109 | perfrevset benchmark the execution time of a revset |
|
110 | 110 | perfstartup (no help text available) |
|
111 | 111 | perfstatus (no help text available) |
|
112 | 112 | perftags (no help text available) |
|
113 | 113 | perftemplating |
|
114 | 114 | (no help text available) |
|
115 | 115 | perfvolatilesets |
|
116 | 116 | benchmark the computation of various volatile set |
|
117 | 117 | perfwalk (no help text available) |
|
118 | 118 | perfwrite microbenchmark ui.write |
|
119 | 119 | |
|
120 | 120 | (use 'hg help -v perfstatusext' to show built-in aliases and global options) |
|
121 | 121 | $ hg perfaddremove |
|
122 | 122 | $ hg perfancestors |
|
123 | 123 | $ hg perfancestorset 2 |
|
124 | 124 | $ hg perfannotate a |
|
125 | 125 | $ hg perfbdiff -c 1 |
|
126 | 126 | $ hg perfbdiff --alldata 1 |
|
127 | 127 | $ hg perfbookmarks |
|
128 | 128 | $ hg perfbranchmap |
|
129 | 129 | $ hg perfcca |
|
130 | 130 | $ hg perfchangegroupchangelog |
|
131 | 131 | $ hg perfchangeset 2 |
|
132 | 132 | $ hg perfctxfiles 2 |
|
133 | 133 | $ hg perfdiffwd |
|
134 | 134 | $ hg perfdirfoldmap |
|
135 | 135 | $ hg perfdirs |
|
136 | 136 | $ hg perfdirstate |
|
137 | 137 | $ hg perfdirstatedirs |
|
138 | 138 | $ hg perfdirstatefoldmap |
|
139 | 139 | $ hg perfdirstatewrite |
|
140 | 140 | $ hg perffncacheencode |
|
141 | 141 | $ hg perffncacheload |
|
142 | 142 | $ hg perffncachewrite |
|
143 | 143 | $ hg perfheads |
|
144 | 144 | $ hg perfindex |
|
145 | 145 | $ hg perfloadmarkers |
|
146 | 146 | $ hg perflog |
|
147 | 147 | $ hg perflookup 2 |
|
148 | 148 | $ hg perflrucache |
|
149 | 149 | $ hg perfmanifest 2 |
|
150 | 150 | $ hg perfmergecalculate -r 3 |
|
151 | 151 | $ hg perfmoonwalk |
|
152 | 152 | $ hg perfnodelookup 2 |
|
153 | 153 | $ hg perfpathcopies 1 2 |
|
154 | 154 | $ hg perfrawfiles 2 |
|
155 | 155 | $ hg perfrevlogindex -c |
|
156 | 156 | $ hg perfrevlogrevisions .hg/store/data/a.i |
|
157 | 157 | $ hg perfrevlogrevision -m 0 |
|
158 | 158 | $ hg perfrevlogchunks -c |
|
159 | 159 | $ hg perfrevrange |
|
160 | 160 | $ hg perfrevset 'all()' |
|
161 | 161 | $ hg perfstartup |
|
162 | 162 | $ hg perfstatus |
|
163 | 163 | $ hg perftags |
|
164 | 164 | $ hg perftemplating |
|
165 | 165 | $ hg perfvolatilesets |
|
166 | 166 | $ hg perfwalk |
|
167 | 167 | $ hg perfparents |
|
168 | 168 | |
|
169 | 169 | Check perf.py for historical portability |
|
170 | 170 | |
|
171 | 171 | $ cd "$TESTDIR/.." |
|
172 | 172 | |
|
173 |
$ ( |
|
|
174 |
> |
|
|
173 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; | |
|
174 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | | |
|
175 | 175 | > "$TESTDIR"/check-perf-code.py contrib/perf.py |
@@ -1,23 +1,23 | |||
|
1 | 1 | #require test-repo slow debhelper |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 |
$ |
|
|
4 | $ testrepohgenv | |
|
5 | 5 | |
|
6 | 6 | Ensure debuild doesn't run the testsuite, as that could get silly. |
|
7 | 7 | $ DEB_BUILD_OPTIONS=nocheck |
|
8 | 8 | $ export DEB_BUILD_OPTIONS |
|
9 | 9 | $ OUTPUTDIR=`pwd` |
|
10 | 10 | $ export OUTPUTDIR |
|
11 | 11 | |
|
12 | 12 | $ cd "$TESTDIR"/.. |
|
13 | 13 | $ make deb > $OUTPUTDIR/build.log 2>&1 |
|
14 | 14 | $ cd $OUTPUTDIR |
|
15 | 15 | $ ls *.deb |
|
16 | 16 | mercurial-common_*.deb (glob) |
|
17 | 17 | mercurial_*.deb (glob) |
|
18 | 18 | main deb should have .so but no .py |
|
19 | 19 | $ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)' |
|
20 | 20 | * ./usr/lib/python2.7/dist-packages/mercurial/parsers*.so (glob) |
|
21 | 21 | mercurial-common should have py but no .so or pyc |
|
22 | 22 | $ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers)' |
|
23 | 23 | * ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py (glob) |
@@ -1,31 +1,31 | |||
|
1 | 1 | #require test-repo slow docker |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 |
$ |
|
|
4 | $ testrepohgenv | |
|
5 | 5 | |
|
6 | 6 | Ensure debuild doesn't run the testsuite, as that could get silly. |
|
7 | 7 | $ DEB_BUILD_OPTIONS=nocheck |
|
8 | 8 | $ export DEB_BUILD_OPTIONS |
|
9 | 9 | $ OUTPUTDIR=`pwd` |
|
10 | 10 | $ export OUTPUTDIR |
|
11 | 11 | |
|
12 | 12 | $ cd "$TESTDIR"/.. |
|
13 | 13 | $ make docker-debian-jessie > $OUTPUTDIR/build.log 2>&1 |
|
14 | 14 | $ cd $OUTPUTDIR |
|
15 | 15 | $ ls *.deb |
|
16 | 16 | mercurial-common_*.deb (glob) |
|
17 | 17 | mercurial_*.deb (glob) |
|
18 | 18 | |
|
19 | 19 | We check debian package contents with portable tools so that when |
|
20 | 20 | we're on non-debian machines we can still test the packages that are |
|
21 | 21 | built using docker. |
|
22 | 22 | |
|
23 | 23 | main deb should have .so but no .py |
|
24 | 24 | $ ar x mercurial_*.deb |
|
25 | 25 | $ tar tf data.tar* | egrep '(localrepo|parsers)' |
|
26 | 26 | ./usr/lib/python2.7/dist-packages/mercurial/parsers*.so (glob) |
|
27 | 27 | mercurial-common should have .py but no .so or .pyc |
|
28 | 28 | $ ar x mercurial-common_*.deb |
|
29 | 29 | $ tar tf data.tar* | egrep '(localrepo|parsers)' |
|
30 | 30 | ./usr/lib/python2.7/dist-packages/mercurial/pure/parsers.py |
|
31 | 31 | ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py |
@@ -1,44 +1,44 | |||
|
1 | 1 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
2 | 2 | |
|
3 | 3 | Testing that hghave does not crash when checking features |
|
4 | 4 | |
|
5 | 5 | $ hghave --test-features 2>/dev/null |
|
6 | 6 | |
|
7 | 7 | Testing hghave extensibility for third party tools |
|
8 | 8 | |
|
9 | 9 | $ cat > hghaveaddon.py <<EOF |
|
10 | 10 | > import hghave |
|
11 | 11 | > @hghave.check("custom", "custom hghave feature") |
|
12 | 12 | > def has_custom(): |
|
13 | 13 | > return True |
|
14 | 14 | > EOF |
|
15 | 15 | |
|
16 | 16 | (invocation via run-tests.py) |
|
17 | 17 | |
|
18 | 18 | $ cat > test-hghaveaddon.t <<EOF |
|
19 | 19 | > #require custom |
|
20 | 20 | > $ echo foo |
|
21 | 21 | > foo |
|
22 | 22 | > EOF |
|
23 | 23 | $ ( \ |
|
24 |
> |
|
|
24 | > testrepohgenv; \ | |
|
25 | 25 | > $TESTDIR/run-tests.py $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \ |
|
26 | 26 | > ) |
|
27 | 27 | . |
|
28 | 28 | # Ran 1 tests, 0 skipped, 0 failed. |
|
29 | 29 | |
|
30 | 30 | (invocation via command line) |
|
31 | 31 | |
|
32 | 32 | $ unset TESTDIR |
|
33 | 33 | $ hghave custom |
|
34 | 34 | |
|
35 | 35 | (terminate with exit code 2 at failure of importing hghaveaddon.py) |
|
36 | 36 | |
|
37 | 37 | $ rm hghaveaddon.* |
|
38 | 38 | $ cat > hghaveaddon.py <<EOF |
|
39 | 39 | > importing this file should cause syntax error |
|
40 | 40 | > EOF |
|
41 | 41 | |
|
42 | 42 | $ hghave custom |
|
43 | 43 | failed to import hghaveaddon.py from '.': invalid syntax (hghaveaddon.py, line 1) |
|
44 | 44 | [2] |
@@ -1,147 +1,147 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 |
$ |
|
|
4 | $ testrepohgenv | |
|
5 | 5 | $ import_checker="$TESTDIR"/../contrib/import-checker.py |
|
6 | 6 | |
|
7 | 7 | Run the doctests from the import checker, and make sure |
|
8 | 8 | it's working correctly. |
|
9 | 9 | $ TERM=dumb |
|
10 | 10 | $ export TERM |
|
11 | 11 | $ python -m doctest $import_checker |
|
12 | 12 | |
|
13 | 13 | Run additional tests for the import checker |
|
14 | 14 | |
|
15 | 15 | $ mkdir testpackage |
|
16 | 16 | $ touch testpackage/__init__.py |
|
17 | 17 | |
|
18 | 18 | $ cat > testpackage/multiple.py << EOF |
|
19 | 19 | > from __future__ import absolute_import |
|
20 | 20 | > import os, sys |
|
21 | 21 | > EOF |
|
22 | 22 | |
|
23 | 23 | $ cat > testpackage/unsorted.py << EOF |
|
24 | 24 | > from __future__ import absolute_import |
|
25 | 25 | > import sys |
|
26 | 26 | > import os |
|
27 | 27 | > EOF |
|
28 | 28 | |
|
29 | 29 | $ cat > testpackage/stdafterlocal.py << EOF |
|
30 | 30 | > from __future__ import absolute_import |
|
31 | 31 | > from . import unsorted |
|
32 | 32 | > import os |
|
33 | 33 | > EOF |
|
34 | 34 | |
|
35 | 35 | $ cat > testpackage/requirerelative.py << EOF |
|
36 | 36 | > from __future__ import absolute_import |
|
37 | 37 | > import testpackage.unsorted |
|
38 | 38 | > EOF |
|
39 | 39 | |
|
40 | 40 | $ cat > testpackage/importalias.py << EOF |
|
41 | 41 | > from __future__ import absolute_import |
|
42 | 42 | > import ui |
|
43 | 43 | > EOF |
|
44 | 44 | |
|
45 | 45 | $ cat > testpackage/relativestdlib.py << EOF |
|
46 | 46 | > from __future__ import absolute_import |
|
47 | 47 | > from .. import os |
|
48 | 48 | > EOF |
|
49 | 49 | |
|
50 | 50 | $ cat > testpackage/symbolimport.py << EOF |
|
51 | 51 | > from __future__ import absolute_import |
|
52 | 52 | > from .unsorted import foo |
|
53 | 53 | > EOF |
|
54 | 54 | |
|
55 | 55 | $ cat > testpackage/latesymbolimport.py << EOF |
|
56 | 56 | > from __future__ import absolute_import |
|
57 | 57 | > from . import unsorted |
|
58 | 58 | > from mercurial.node import hex |
|
59 | 59 | > EOF |
|
60 | 60 | |
|
61 | 61 | $ cat > testpackage/multiplegroups.py << EOF |
|
62 | 62 | > from __future__ import absolute_import |
|
63 | 63 | > from . import unsorted |
|
64 | 64 | > from . import more |
|
65 | 65 | > EOF |
|
66 | 66 | |
|
67 | 67 | $ mkdir testpackage/subpackage |
|
68 | 68 | $ cat > testpackage/subpackage/levelpriority.py << EOF |
|
69 | 69 | > from __future__ import absolute_import |
|
70 | 70 | > from . import foo |
|
71 | 71 | > from .. import parent |
|
72 | 72 | > EOF |
|
73 | 73 | |
|
74 | 74 | $ touch testpackage/subpackage/foo.py |
|
75 | 75 | $ cat > testpackage/subpackage/__init__.py << EOF |
|
76 | 76 | > from __future__ import absolute_import |
|
77 | 77 | > from . import levelpriority # should not cause cycle |
|
78 | 78 | > EOF |
|
79 | 79 | |
|
80 | 80 | $ cat > testpackage/subpackage/localimport.py << EOF |
|
81 | 81 | > from __future__ import absolute_import |
|
82 | 82 | > from . import foo |
|
83 | 83 | > def bar(): |
|
84 | 84 | > # should not cause "higher-level import should come first" |
|
85 | 85 | > from .. import unsorted |
|
86 | 86 | > # but other errors should be detected |
|
87 | 87 | > from .. import more |
|
88 | 88 | > import testpackage.subpackage.levelpriority |
|
89 | 89 | > EOF |
|
90 | 90 | |
|
91 | 91 | $ cat > testpackage/importmodulefromsub.py << EOF |
|
92 | 92 | > from __future__ import absolute_import |
|
93 | 93 | > from .subpackage import foo # not a "direct symbol import" |
|
94 | 94 | > EOF |
|
95 | 95 | |
|
96 | 96 | $ cat > testpackage/importsymbolfromsub.py << EOF |
|
97 | 97 | > from __future__ import absolute_import |
|
98 | 98 | > from .subpackage import foo, nonmodule |
|
99 | 99 | > EOF |
|
100 | 100 | |
|
101 | 101 | $ cat > testpackage/sortedentries.py << EOF |
|
102 | 102 | > from __future__ import absolute_import |
|
103 | 103 | > from . import ( |
|
104 | 104 | > foo, |
|
105 | 105 | > bar, |
|
106 | 106 | > ) |
|
107 | 107 | > EOF |
|
108 | 108 | |
|
109 | 109 | $ cat > testpackage/importfromalias.py << EOF |
|
110 | 110 | > from __future__ import absolute_import |
|
111 | 111 | > from . import ui |
|
112 | 112 | > EOF |
|
113 | 113 | |
|
114 | 114 | $ cat > testpackage/importfromrelative.py << EOF |
|
115 | 115 | > from __future__ import absolute_import |
|
116 | 116 | > from testpackage.unsorted import foo |
|
117 | 117 | > EOF |
|
118 | 118 | |
|
119 | 119 | $ mkdir testpackage2 |
|
120 | 120 | $ touch testpackage2/__init__.py |
|
121 | 121 | |
|
122 | 122 | $ cat > testpackage2/latesymbolimport.py << EOF |
|
123 | 123 | > from __future__ import absolute_import |
|
124 | 124 | > from testpackage import unsorted |
|
125 | 125 | > from mercurial.node import hex |
|
126 | 126 | > EOF |
|
127 | 127 | |
|
128 | 128 | $ $PYTHON "$import_checker" testpackage*/*.py testpackage/subpackage/*.py |
|
129 | 129 | testpackage/importalias.py:2: ui module must be "as" aliased to uimod |
|
130 | 130 | testpackage/importfromalias.py:2: ui from testpackage must be "as" aliased to uimod |
|
131 | 131 | testpackage/importfromrelative.py:2: import should be relative: testpackage.unsorted |
|
132 | 132 | testpackage/importfromrelative.py:2: direct symbol import foo from testpackage.unsorted |
|
133 | 133 | testpackage/importsymbolfromsub.py:2: direct symbol import nonmodule from testpackage.subpackage |
|
134 | 134 | testpackage/latesymbolimport.py:3: symbol import follows non-symbol import: mercurial.node |
|
135 | 135 | testpackage/multiple.py:2: multiple imported names: os, sys |
|
136 | 136 | testpackage/multiplegroups.py:3: multiple "from . import" statements |
|
137 | 137 | testpackage/relativestdlib.py:2: relative import of stdlib module |
|
138 | 138 | testpackage/requirerelative.py:2: import should be relative: testpackage.unsorted |
|
139 | 139 | testpackage/sortedentries.py:2: imports from testpackage not lexically sorted: bar < foo |
|
140 | 140 | testpackage/stdafterlocal.py:3: stdlib import "os" follows local import: testpackage |
|
141 | 141 | testpackage/subpackage/levelpriority.py:3: higher-level import should come first: testpackage |
|
142 | 142 | testpackage/subpackage/localimport.py:7: multiple "from .. import" statements |
|
143 | 143 | testpackage/subpackage/localimport.py:8: import should be relative: testpackage.subpackage.levelpriority |
|
144 | 144 | testpackage/symbolimport.py:2: direct symbol import foo from testpackage.unsorted |
|
145 | 145 | testpackage/unsorted.py:3: imports not lexically sorted: os < sys |
|
146 | 146 | testpackage2/latesymbolimport.py:3: symbol import follows non-symbol import: mercurial.node |
|
147 | 147 | [1] |
@@ -1,212 +1,212 | |||
|
1 | 1 | hg debuginstall |
|
2 | 2 | $ hg debuginstall |
|
3 | 3 | checking encoding (ascii)... |
|
4 | 4 | checking Python executable (*) (glob) |
|
5 | 5 | checking Python version (2.*) (glob) |
|
6 | 6 | checking Python lib (*lib*)... (glob) |
|
7 | 7 | checking Python security support (*) (glob) |
|
8 | 8 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
9 | 9 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
10 | 10 | checking Mercurial version (*) (glob) |
|
11 | 11 | checking Mercurial custom build (*) (glob) |
|
12 | 12 | checking module policy (*) (glob) |
|
13 | 13 | checking installed modules (*mercurial)... (glob) |
|
14 | 14 | checking registered compression engines (*zlib*) (glob) |
|
15 | 15 | checking available compression engines (*zlib*) (glob) |
|
16 | 16 | checking available compression engines for wire protocol (*zlib*) (glob) |
|
17 | 17 | checking templates (*mercurial?templates)... (glob) |
|
18 | 18 | checking default template (*mercurial?templates?map-cmdline.default) (glob) |
|
19 | 19 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) |
|
20 | 20 | checking username (test) |
|
21 | 21 | no problems detected |
|
22 | 22 | |
|
23 | 23 | hg debuginstall JSON |
|
24 | 24 | $ hg debuginstall -Tjson | sed 's|\\\\|\\|g' |
|
25 | 25 | [ |
|
26 | 26 | { |
|
27 | 27 | "compengines": ["bz2", "bz2truncated", "none", "zlib"*], (glob) |
|
28 | 28 | "compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob) |
|
29 | 29 | "compenginesserver": [*"zlib"*], (glob) |
|
30 | 30 | "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) |
|
31 | 31 | "defaulttemplateerror": null, |
|
32 | 32 | "defaulttemplatenotfound": "default", |
|
33 | 33 | "editor": "* -c \"import sys; sys.exit(0)\"", (glob) |
|
34 | 34 | "editornotfound": false, |
|
35 | 35 | "encoding": "ascii", |
|
36 | 36 | "encodingerror": null, |
|
37 | 37 | "extensionserror": null, (no-pure !) |
|
38 | 38 | "hgmodulepolicy": "*", (glob) |
|
39 | 39 | "hgmodules": "*mercurial", (glob) |
|
40 | 40 | "hgver": "*", (glob) |
|
41 | 41 | "hgverextra": "*", (glob) |
|
42 | 42 | "problems": 0, |
|
43 | 43 | "pythonexe": "*", (glob) |
|
44 | 44 | "pythonlib": "*", (glob) |
|
45 | 45 | "pythonsecurity": [*], (glob) |
|
46 | 46 | "pythonver": "*.*.*", (glob) |
|
47 | 47 | "templatedirs": "*mercurial?templates", (glob) |
|
48 | 48 | "username": "test", |
|
49 | 49 | "usernameerror": null, |
|
50 | 50 | "vinotfound": false |
|
51 | 51 | } |
|
52 | 52 | ] |
|
53 | 53 | |
|
54 | 54 | hg debuginstall with no username |
|
55 | 55 | $ HGUSER= hg debuginstall |
|
56 | 56 | checking encoding (ascii)... |
|
57 | 57 | checking Python executable (*) (glob) |
|
58 | 58 | checking Python version (2.*) (glob) |
|
59 | 59 | checking Python lib (*lib*)... (glob) |
|
60 | 60 | checking Python security support (*) (glob) |
|
61 | 61 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
62 | 62 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
63 | 63 | checking Mercurial version (*) (glob) |
|
64 | 64 | checking Mercurial custom build (*) (glob) |
|
65 | 65 | checking module policy (*) (glob) |
|
66 | 66 | checking installed modules (*mercurial)... (glob) |
|
67 | 67 | checking registered compression engines (*zlib*) (glob) |
|
68 | 68 | checking available compression engines (*zlib*) (glob) |
|
69 | 69 | checking available compression engines for wire protocol (*zlib*) (glob) |
|
70 | 70 | checking templates (*mercurial?templates)... (glob) |
|
71 | 71 | checking default template (*mercurial?templates?map-cmdline.default) (glob) |
|
72 | 72 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) |
|
73 | 73 | checking username... |
|
74 | 74 | no username supplied |
|
75 | 75 | (specify a username in your configuration file) |
|
76 | 76 | 1 problems detected, please check your install! |
|
77 | 77 | [1] |
|
78 | 78 | |
|
79 | 79 | path variables are expanded (~ is the same as $TESTTMP) |
|
80 | 80 | $ mkdir tools |
|
81 | 81 | $ touch tools/testeditor.exe |
|
82 | 82 | #if execbit |
|
83 | 83 | $ chmod 755 tools/testeditor.exe |
|
84 | 84 | #endif |
|
85 | 85 | $ hg debuginstall --config ui.editor=~/tools/testeditor.exe |
|
86 | 86 | checking encoding (ascii)... |
|
87 | 87 | checking Python executable (*) (glob) |
|
88 | 88 | checking Python version (*) (glob) |
|
89 | 89 | checking Python lib (*lib*)... (glob) |
|
90 | 90 | checking Python security support (*) (glob) |
|
91 | 91 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
92 | 92 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
93 | 93 | checking Mercurial version (*) (glob) |
|
94 | 94 | checking Mercurial custom build (*) (glob) |
|
95 | 95 | checking module policy (*) (glob) |
|
96 | 96 | checking installed modules (*mercurial)... (glob) |
|
97 | 97 | checking registered compression engines (*zlib*) (glob) |
|
98 | 98 | checking available compression engines (*zlib*) (glob) |
|
99 | 99 | checking available compression engines for wire protocol (*zlib*) (glob) |
|
100 | 100 | checking templates (*mercurial?templates)... (glob) |
|
101 | 101 | checking default template (*mercurial?templates?map-cmdline.default) (glob) |
|
102 | 102 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) |
|
103 | 103 | checking username (test) |
|
104 | 104 | no problems detected |
|
105 | 105 | |
|
106 | 106 | #if test-repo |
|
107 | 107 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
108 | 108 | |
|
109 | 109 | $ cat >> wixxml.py << EOF |
|
110 | 110 | > import os, subprocess, sys |
|
111 | 111 | > import xml.etree.ElementTree as ET |
|
112 | 112 | > |
|
113 | 113 | > # MSYS mangles the path if it expands $TESTDIR |
|
114 | 114 | > testdir = os.environ['TESTDIR'] |
|
115 | 115 | > ns = {'wix' : 'http://schemas.microsoft.com/wix/2006/wi'} |
|
116 | 116 | > |
|
117 | 117 | > def directory(node, relpath): |
|
118 | 118 | > '''generator of files in the xml node, rooted at relpath''' |
|
119 | 119 | > dirs = node.findall('./{%(wix)s}Directory' % ns) |
|
120 | 120 | > |
|
121 | 121 | > for d in dirs: |
|
122 | 122 | > for subfile in directory(d, relpath + d.attrib['Name'] + '/'): |
|
123 | 123 | > yield subfile |
|
124 | 124 | > |
|
125 | 125 | > files = node.findall('./{%(wix)s}Component/{%(wix)s}File' % ns) |
|
126 | 126 | > |
|
127 | 127 | > for f in files: |
|
128 | 128 | > yield relpath + f.attrib['Name'] |
|
129 | 129 | > |
|
130 | 130 | > def hgdirectory(relpath): |
|
131 | 131 | > '''generator of tracked files, rooted at relpath''' |
|
132 | 132 | > hgdir = "%s/../mercurial" % (testdir) |
|
133 | 133 | > args = ['hg', '--cwd', hgdir, 'files', relpath] |
|
134 | 134 | > proc = subprocess.Popen(args, stdout=subprocess.PIPE, |
|
135 | 135 | > stderr=subprocess.PIPE) |
|
136 | 136 | > output = proc.communicate()[0] |
|
137 | 137 | > |
|
138 | 138 | > slash = '/' |
|
139 | 139 | > for line in output.splitlines(): |
|
140 | 140 | > if os.name == 'nt': |
|
141 | 141 | > yield line.replace(os.sep, slash) |
|
142 | 142 | > else: |
|
143 | 143 | > yield line |
|
144 | 144 | > |
|
145 | 145 | > tracked = [f for f in hgdirectory(sys.argv[1])] |
|
146 | 146 | > |
|
147 | 147 | > xml = ET.parse("%s/../contrib/wix/%s.wxs" % (testdir, sys.argv[1])) |
|
148 | 148 | > root = xml.getroot() |
|
149 | 149 | > dir = root.find('.//{%(wix)s}DirectoryRef' % ns) |
|
150 | 150 | > |
|
151 | 151 | > installed = [f for f in directory(dir, '')] |
|
152 | 152 | > |
|
153 | 153 | > print('Not installed:') |
|
154 | 154 | > for f in sorted(set(tracked) - set(installed)): |
|
155 | 155 | > print(' %s' % f) |
|
156 | 156 | > |
|
157 | 157 | > print('Not tracked:') |
|
158 | 158 | > for f in sorted(set(installed) - set(tracked)): |
|
159 | 159 | > print(' %s' % f) |
|
160 | 160 | > EOF |
|
161 | 161 | |
|
162 |
$ ( |
|
|
162 | $ ( testrepohgenv; $PYTHON wixxml.py help ) | |
|
163 | 163 | Not installed: |
|
164 | 164 | help/common.txt |
|
165 | 165 | help/hg-ssh.8.txt |
|
166 | 166 | help/hg.1.txt |
|
167 | 167 | help/hgignore.5.txt |
|
168 | 168 | help/hgrc.5.txt |
|
169 | 169 | Not tracked: |
|
170 | 170 | |
|
171 |
$ ( |
|
|
171 | $ ( testrepohgenv; $PYTHON wixxml.py templates ) | |
|
172 | 172 | Not installed: |
|
173 | 173 | Not tracked: |
|
174 | 174 | |
|
175 | 175 | #endif |
|
176 | 176 | |
|
177 | 177 | #if virtualenv |
|
178 | 178 | |
|
179 | 179 | Verify that Mercurial is installable with pip. Note that this MUST be |
|
180 | 180 | the last test in this file, because we do some nasty things to the |
|
181 | 181 | shell environment in order to make the virtualenv work reliably. |
|
182 | 182 | |
|
183 | 183 | $ cd $TESTTMP |
|
184 | 184 | Note: --no-site-packages is deprecated, but some places have an |
|
185 | 185 | ancient virtualenv from their linux distro or similar and it's not yet |
|
186 | 186 | the default for them. |
|
187 | 187 | $ unset PYTHONPATH |
|
188 | 188 | $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log |
|
189 | 189 | Note: we use this weird path to run pip and hg to avoid platform differences, |
|
190 | 190 | since it's bin on most platforms but Scripts on Windows. |
|
191 | 191 | $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log |
|
192 | 192 | $ ./installenv/*/hg debuginstall || cat pip.log |
|
193 | 193 | checking encoding (ascii)... |
|
194 | 194 | checking Python executable (*) (glob) |
|
195 | 195 | checking Python version (2.*) (glob) |
|
196 | 196 | checking Python lib (*)... (glob) |
|
197 | 197 | checking Python security support (*) (glob) |
|
198 | 198 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
199 | 199 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
200 | 200 | checking Mercurial version (*) (glob) |
|
201 | 201 | checking Mercurial custom build (*) (glob) |
|
202 | 202 | checking module policy (*) (glob) |
|
203 | 203 | checking installed modules (*/mercurial)... (glob) |
|
204 | 204 | checking registered compression engines (*) (glob) |
|
205 | 205 | checking available compression engines (*) (glob) |
|
206 | 206 | checking available compression engines for wire protocol (*) (glob) |
|
207 | 207 | checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob) |
|
208 | 208 | checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob) |
|
209 | 209 | checking commit editor... (*) (glob) |
|
210 | 210 | checking username (test) |
|
211 | 211 | no problems detected |
|
212 | 212 | #endif |
@@ -1,64 +1,64 | |||
|
1 | 1 | #require test-repo slow osx osxpackaging |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 |
$ |
|
|
4 | $ testrepohgenv | |
|
5 | 5 | |
|
6 | 6 | $ OUTPUTDIR="`pwd`" |
|
7 | 7 | $ export OUTPUTDIR |
|
8 | 8 | $ KEEPMPKG=yes |
|
9 | 9 | $ export KEEPMPKG |
|
10 | 10 | |
|
11 | 11 | $ cd "$TESTDIR"/.. |
|
12 | 12 | $ make osx > "$OUTPUTDIR/build.log" 2>&1 |
|
13 | 13 | $ cd "$OUTPUTDIR" |
|
14 | 14 | $ ls -d *.pkg |
|
15 | 15 | Mercurial-*-macosx10.*.pkg (glob) |
|
16 | 16 | |
|
17 | 17 | $ xar -xf Mercurial*.pkg |
|
18 | 18 | |
|
19 | 19 | Gather list of all installed files: |
|
20 | 20 | $ lsbom mercurial.pkg/Bom > boms.txt |
|
21 | 21 | |
|
22 | 22 | We've had problems with the filter logic in the past. Make sure no |
|
23 | 23 | .DS_Store files ended up in the final package: |
|
24 | 24 | $ grep DS_S boms.txt |
|
25 | 25 | [1] |
|
26 | 26 | |
|
27 | 27 | Spot-check some randomly selected files: |
|
28 | 28 | $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3 |
|
29 | 29 | ./Library/Python/2.7/site-packages/mercurial/cext/bdiff.so 100755 0/0 |
|
30 | 30 | ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0 |
|
31 | 31 | ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyc 100644 0/0 |
|
32 | 32 | ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyo 100644 0/0 |
|
33 | 33 | $ grep zsh/site-functions/_hg boms.txt | cut -d ' ' -f 1,2,3 |
|
34 | 34 | ./usr/local/share/zsh/site-functions/_hg 100644 0/0 |
|
35 | 35 | $ grep hg-completion.bash boms.txt | cut -d ' ' -f 1,2,3 |
|
36 | 36 | ./usr/local/hg/contrib/hg-completion.bash 100644 0/0 |
|
37 | 37 | $ egrep 'man[15]' boms.txt | cut -d ' ' -f 1,2,3 |
|
38 | 38 | ./usr/local/share/man/man1 40755 0/0 |
|
39 | 39 | ./usr/local/share/man/man1/chg.1 100644 0/0 |
|
40 | 40 | ./usr/local/share/man/man1/hg.1 100644 0/0 |
|
41 | 41 | ./usr/local/share/man/man5 40755 0/0 |
|
42 | 42 | ./usr/local/share/man/man5/hgignore.5 100644 0/0 |
|
43 | 43 | ./usr/local/share/man/man5/hgrc.5 100644 0/0 |
|
44 | 44 | $ grep bser boms.txt | cut -d ' ' -f 1,2,3 |
|
45 | 45 | ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/bser.so 100755 0/0 |
|
46 | 46 | ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.py 100644 0/0 |
|
47 | 47 | ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyc 100644 0/0 |
|
48 | 48 | ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyo 100644 0/0 |
|
49 | 49 | $ grep localrepo boms.txt | cut -d ' ' -f 1,2,3 |
|
50 | 50 | ./Library/Python/2.7/site-packages/mercurial/localrepo.py 100644 0/0 |
|
51 | 51 | ./Library/Python/2.7/site-packages/mercurial/localrepo.pyc 100644 0/0 |
|
52 | 52 | ./Library/Python/2.7/site-packages/mercurial/localrepo.pyo 100644 0/0 |
|
53 | 53 | $ egrep 'bin/' boms.txt | cut -d ' ' -f 1,2,3 |
|
54 | 54 | ./usr/local/bin/chg 100755 0/0 |
|
55 | 55 | ./usr/local/bin/hg 100755 0/0 |
|
56 | 56 | |
|
57 | 57 | Make sure the built binary uses the system Python interpreter |
|
58 | 58 | $ bsdtar xf mercurial.pkg/Payload usr/local/bin |
|
59 | 59 | Use a glob to find this to avoid check-code whining about a fixed path. |
|
60 | 60 | $ head -n 1 usr/local/b?n/hg |
|
61 | 61 | #!/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python |
|
62 | 62 | |
|
63 | 63 | Note that we're not currently installing any /etc/mercurial stuff, |
|
64 | 64 | including merge-tool configurations. |
General Comments 0
You need to be logged in to leave comments.
Login now