author | Thomas Arendsen Hein <thomas@intevation.de> |
Fri, 31 Aug 2007 12:54:07 +0200 | |
changeset 5273 | 4287590a63af |
parent 5250 | d61e98a82cee |
child 5308 | 9400d677efc7 |
permissions | -rwxr-xr-x |
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/env python |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 |
"""Test the running system for features availability. Exit with zero |
5125
80309fa23cdb
hghave: feature absence can be checked by prefixing with 'no-'
Patrick Mezard <pmezard@gmail.com>
parents:
5115
diff
changeset
|
3 |
if all features are there, non-zero otherwise. If a feature name is |
80309fa23cdb
hghave: feature absence can be checked by prefixing with 'no-'
Patrick Mezard <pmezard@gmail.com>
parents:
5115
diff
changeset
|
4 |
prefixed with "no-", the absence of feature is tested. |
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 |
""" |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 |
import optparse |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 |
import os |
5248
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
8 |
import re |
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 |
import sys |
5088
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
10 |
import tempfile |
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 |
|
5135
bf60e4bd6672
hghave: prefix temporary files with "hg-hghave-"
Patrick Mezard <pmezard@gmail.com>
parents:
5125
diff
changeset
|
12 |
tempprefix = 'hg-hghave-' |
bf60e4bd6672
hghave: prefix temporary files with "hg-hghave-"
Patrick Mezard <pmezard@gmail.com>
parents:
5125
diff
changeset
|
13 |
|
5248
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
14 |
def matchoutput(cmd, regexp): |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
15 |
"""Return True if cmd executes successfully and its output |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
16 |
is matched by the supplied regular expression. |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
17 |
""" |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
18 |
r = re.compile(regexp) |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
19 |
fh = os.popen(cmd) |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
20 |
s = fh.read() |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
21 |
ret = fh.close() |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
22 |
return ret is None and r.search(s) |
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
23 |
|
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 |
def has_symlink(): |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 |
return hasattr(os, "symlink") |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 |
|
5086
4cf6f8dbd1b4
hghave: detect FIFO availability
Patrick Mezard <pmezard@gmail.com>
parents:
4881
diff
changeset
|
27 |
def has_fifo(): |
4cf6f8dbd1b4
hghave: detect FIFO availability
Patrick Mezard <pmezard@gmail.com>
parents:
4881
diff
changeset
|
28 |
return hasattr(os, "mkfifo") |
4cf6f8dbd1b4
hghave: detect FIFO availability
Patrick Mezard <pmezard@gmail.com>
parents:
4881
diff
changeset
|
29 |
|
5088
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
30 |
def has_executablebit(): |
5135
bf60e4bd6672
hghave: prefix temporary files with "hg-hghave-"
Patrick Mezard <pmezard@gmail.com>
parents:
5125
diff
changeset
|
31 |
fd, path = tempfile.mkstemp(prefix=tempprefix) |
5088
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
32 |
os.close(fd) |
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
33 |
try: |
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
34 |
s = os.lstat(path).st_mode |
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
35 |
os.chmod(path, s | 0100) |
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
36 |
return (os.lstat(path).st_mode & 0100 != 0) |
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
37 |
finally: |
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
38 |
os.remove(path) |
7e2385a31933
hghave: detect executable permission availability.
Patrick Mezard <pmezard@gmail.com>
parents:
5086
diff
changeset
|
39 |
|
5090
e86788af599a
hghave: detect support for EOL in paths.
Patrick Mezard <pmezard@gmail.com>
parents:
5088
diff
changeset
|
40 |
def has_eol_in_paths(): |
e86788af599a
hghave: detect support for EOL in paths.
Patrick Mezard <pmezard@gmail.com>
parents:
5088
diff
changeset
|
41 |
try: |
5135
bf60e4bd6672
hghave: prefix temporary files with "hg-hghave-"
Patrick Mezard <pmezard@gmail.com>
parents:
5125
diff
changeset
|
42 |
fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r') |
5090
e86788af599a
hghave: detect support for EOL in paths.
Patrick Mezard <pmezard@gmail.com>
parents:
5088
diff
changeset
|
43 |
os.close(fd) |
e86788af599a
hghave: detect support for EOL in paths.
Patrick Mezard <pmezard@gmail.com>
parents:
5088
diff
changeset
|
44 |
os.remove(path) |
e86788af599a
hghave: detect support for EOL in paths.
Patrick Mezard <pmezard@gmail.com>
parents:
5088
diff
changeset
|
45 |
return True |
e86788af599a
hghave: detect support for EOL in paths.
Patrick Mezard <pmezard@gmail.com>
parents:
5088
diff
changeset
|
46 |
except: |
e86788af599a
hghave: detect support for EOL in paths.
Patrick Mezard <pmezard@gmail.com>
parents:
5088
diff
changeset
|
47 |
return False |
e86788af599a
hghave: detect support for EOL in paths.
Patrick Mezard <pmezard@gmail.com>
parents:
5088
diff
changeset
|
48 |
|
5162
9b0efeb725f4
test-profile: fix grep, check hotshot availability
Patrick Mezard <pmezard@gmail.com>
parents:
5157
diff
changeset
|
49 |
def has_hotshot(): |
9b0efeb725f4
test-profile: fix grep, check hotshot availability
Patrick Mezard <pmezard@gmail.com>
parents:
5157
diff
changeset
|
50 |
try: |
5164
e5b21a549cc5
hghave: test hotshot dependencies (debian does not provide profile)
Patrick Mezard <pmezard@gmail.com>
parents:
5162
diff
changeset
|
51 |
# hotshot.stats tests hotshot and many problematic dependencies |
e5b21a549cc5
hghave: test hotshot dependencies (debian does not provide profile)
Patrick Mezard <pmezard@gmail.com>
parents:
5162
diff
changeset
|
52 |
# like profile. |
e5b21a549cc5
hghave: test hotshot dependencies (debian does not provide profile)
Patrick Mezard <pmezard@gmail.com>
parents:
5162
diff
changeset
|
53 |
import hotshot.stats |
5162
9b0efeb725f4
test-profile: fix grep, check hotshot availability
Patrick Mezard <pmezard@gmail.com>
parents:
5157
diff
changeset
|
54 |
return True |
9b0efeb725f4
test-profile: fix grep, check hotshot availability
Patrick Mezard <pmezard@gmail.com>
parents:
5157
diff
changeset
|
55 |
except ImportError: |
9b0efeb725f4
test-profile: fix grep, check hotshot availability
Patrick Mezard <pmezard@gmail.com>
parents:
5157
diff
changeset
|
56 |
return False |
9b0efeb725f4
test-profile: fix grep, check hotshot availability
Patrick Mezard <pmezard@gmail.com>
parents:
5157
diff
changeset
|
57 |
|
5157
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
58 |
def has_lsprof(): |
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
59 |
try: |
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
60 |
import _lsprof |
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
61 |
return True |
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
62 |
except ImportError: |
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
63 |
return False |
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
64 |
|
5230
4fa0f2dff643
hghave: detect git availability
Patrick Mezard <pmezard@gmail.com>
parents:
5164
diff
changeset
|
65 |
def has_git(): |
5248
c0281c6b40b0
hghave: wrap command output matching
Patrick Mezard <pmezard@gmail.com>
parents:
5230
diff
changeset
|
66 |
return matchoutput('git --version 2>&1', r'^git version') |
5230
4fa0f2dff643
hghave: detect git availability
Patrick Mezard <pmezard@gmail.com>
parents:
5164
diff
changeset
|
67 |
|
5249
d82ebcdf20e1
hghave: detect subversion client and admin tools availability
Patrick Mezard <pmezard@gmail.com>
parents:
5248
diff
changeset
|
68 |
def has_svn(): |
d82ebcdf20e1
hghave: detect subversion client and admin tools availability
Patrick Mezard <pmezard@gmail.com>
parents:
5248
diff
changeset
|
69 |
return matchoutput('svn --version 2>&1', r'^svn, version') and \ |
d82ebcdf20e1
hghave: detect subversion client and admin tools availability
Patrick Mezard <pmezard@gmail.com>
parents:
5248
diff
changeset
|
70 |
matchoutput('svnadmin --version 2>&1', r'^svnadmin, version') |
d82ebcdf20e1
hghave: detect subversion client and admin tools availability
Patrick Mezard <pmezard@gmail.com>
parents:
5248
diff
changeset
|
71 |
|
5250
d61e98a82cee
hghave: detect subversion bindings availability
Patrick Mezard <pmezard@gmail.com>
parents:
5249
diff
changeset
|
72 |
def has_svn_bindings(): |
d61e98a82cee
hghave: detect subversion bindings availability
Patrick Mezard <pmezard@gmail.com>
parents:
5249
diff
changeset
|
73 |
try: |
d61e98a82cee
hghave: detect subversion bindings availability
Patrick Mezard <pmezard@gmail.com>
parents:
5249
diff
changeset
|
74 |
import svn.core |
d61e98a82cee
hghave: detect subversion bindings availability
Patrick Mezard <pmezard@gmail.com>
parents:
5249
diff
changeset
|
75 |
return True |
d61e98a82cee
hghave: detect subversion bindings availability
Patrick Mezard <pmezard@gmail.com>
parents:
5249
diff
changeset
|
76 |
except ImportError: |
d61e98a82cee
hghave: detect subversion bindings availability
Patrick Mezard <pmezard@gmail.com>
parents:
5249
diff
changeset
|
77 |
return False |
d61e98a82cee
hghave: detect subversion bindings availability
Patrick Mezard <pmezard@gmail.com>
parents:
5249
diff
changeset
|
78 |
|
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
79 |
checks = { |
5157
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
80 |
"eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), |
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
81 |
"execbit": (has_executablebit, "executable bit"), |
5230
4fa0f2dff643
hghave: detect git availability
Patrick Mezard <pmezard@gmail.com>
parents:
5164
diff
changeset
|
82 |
"git": (has_git, "git command line client"), |
5086
4cf6f8dbd1b4
hghave: detect FIFO availability
Patrick Mezard <pmezard@gmail.com>
parents:
4881
diff
changeset
|
83 |
"fifo": (has_fifo, "named pipes"), |
5162
9b0efeb725f4
test-profile: fix grep, check hotshot availability
Patrick Mezard <pmezard@gmail.com>
parents:
5157
diff
changeset
|
84 |
"hotshot": (has_hotshot, "python hotshot module"), |
5157
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
85 |
"lsprof": (has_lsprof, "python lsprof module"), |
5249
d82ebcdf20e1
hghave: detect subversion client and admin tools availability
Patrick Mezard <pmezard@gmail.com>
parents:
5248
diff
changeset
|
86 |
"svn": (has_svn, "subversion client and admin tools"), |
5250
d61e98a82cee
hghave: detect subversion bindings availability
Patrick Mezard <pmezard@gmail.com>
parents:
5249
diff
changeset
|
87 |
"svn-bindings": (has_svn_bindings, "subversion python bindings"), |
5157
105d4cf7ec24
Test --time, --profile and --lsprof
Patrick Mezard <pmezard@gmail.com>
parents:
5144
diff
changeset
|
88 |
"symlink": (has_symlink, "symbolic links"), |
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
89 |
} |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
90 |
|
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
91 |
def list_features(): |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
92 |
for name, feature in checks.iteritems(): |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
93 |
desc = feature[1] |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
94 |
print name + ':', desc |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
95 |
|
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
96 |
parser = optparse.OptionParser("%prog [options] [features]") |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
97 |
parser.add_option("--list-features", action="store_true", |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
98 |
help="list available features") |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
99 |
parser.add_option("-q", "--quiet", action="store_true", |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
100 |
help="check features silently") |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
101 |
|
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
102 |
if __name__ == '__main__': |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
103 |
options, args = parser.parse_args() |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
104 |
if options.list_features: |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
105 |
list_features() |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
106 |
sys.exit(0) |
5115
ea7b982b6c08
Remove trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5090
diff
changeset
|
107 |
|
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
108 |
quiet = options.quiet |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
109 |
|
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
110 |
failures = 0 |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
111 |
|
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
112 |
def error(msg): |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
113 |
global failures |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
114 |
if not quiet: |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
115 |
sys.stderr.write(msg + '\n') |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
116 |
failures += 1 |
5115
ea7b982b6c08
Remove trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5090
diff
changeset
|
117 |
|
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
118 |
for feature in args: |
5125
80309fa23cdb
hghave: feature absence can be checked by prefixing with 'no-'
Patrick Mezard <pmezard@gmail.com>
parents:
5115
diff
changeset
|
119 |
negate = feature.startswith('no-') |
80309fa23cdb
hghave: feature absence can be checked by prefixing with 'no-'
Patrick Mezard <pmezard@gmail.com>
parents:
5115
diff
changeset
|
120 |
if negate: |
80309fa23cdb
hghave: feature absence can be checked by prefixing with 'no-'
Patrick Mezard <pmezard@gmail.com>
parents:
5115
diff
changeset
|
121 |
feature = feature[3:] |
5143
fc6106267198
Hide absolute path from test-no-symlinks output.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5135
diff
changeset
|
122 |
|
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
123 |
if feature not in checks: |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
124 |
error('hghave: unknown feature: ' + feature) |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
125 |
continue |
5115
ea7b982b6c08
Remove trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5090
diff
changeset
|
126 |
|
ea7b982b6c08
Remove trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5090
diff
changeset
|
127 |
check, desc = checks[feature] |
5125
80309fa23cdb
hghave: feature absence can be checked by prefixing with 'no-'
Patrick Mezard <pmezard@gmail.com>
parents:
5115
diff
changeset
|
128 |
if not negate and not check(): |
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
129 |
error('hghave: missing feature: ' + desc) |
5125
80309fa23cdb
hghave: feature absence can be checked by prefixing with 'no-'
Patrick Mezard <pmezard@gmail.com>
parents:
5115
diff
changeset
|
130 |
elif negate and check(): |
5144
6e040f6c2c9c
Print less scary message if the system supports symlinks:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5143
diff
changeset
|
131 |
error('hghave: system supports %s' % desc) |
4881
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
132 |
|
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
133 |
if failures != 0: |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
134 |
sys.exit(1) |
c51c9bc4579d
Add hghave utility and run-tests.py support.
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
135 |
|
5115
ea7b982b6c08
Remove trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5090
diff
changeset
|
136 |