Show More
@@ -1,44 +1,46 | |||||
1 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
1 | $ . "$TESTDIR/helpers-testrepo.sh" | |
2 |
|
2 | |||
3 | Testing that hghave does not crash when checking features |
|
3 | Testing that hghave does not crash when checking features | |
4 |
|
4 | |||
5 | $ hghave --test-features 2>/dev/null |
|
5 | $ hghave --test-features 2>/dev/null | |
6 |
|
6 | |||
7 | Testing hghave extensibility for third party tools |
|
7 | Testing hghave extensibility for third party tools | |
8 |
|
8 | |||
9 | $ cat > hghaveaddon.py <<EOF |
|
9 | $ cat > hghaveaddon.py <<EOF | |
10 | > import hghave |
|
10 | > import hghave | |
11 | > @hghave.check("custom", "custom hghave feature") |
|
11 | > @hghave.check("custom", "custom hghave feature") | |
12 | > def has_custom(): |
|
12 | > def has_custom(): | |
13 | > return True |
|
13 | > return True | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | (invocation via run-tests.py) |
|
16 | (invocation via run-tests.py) | |
17 |
|
17 | |||
18 | $ cat > test-hghaveaddon.t <<EOF |
|
18 | $ cat > test-hghaveaddon.t <<EOF | |
19 | > #require custom |
|
19 | > #require custom | |
20 | > $ echo foo |
|
20 | > $ echo foo | |
21 | > foo |
|
21 | > foo | |
22 | > EOF |
|
22 | > EOF | |
23 | $ ( \ |
|
23 | $ ( \ | |
24 | > testrepohgenv; \ |
|
24 | > testrepohgenv; \ | |
25 |
> "$PYTHON" $TESTDIR/run-tests.py |
|
25 | > "$PYTHON" $TESTDIR/run-tests.py -j 1 \ | |
|
26 | > $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \ | |||
26 | > ) |
|
27 | > ) | |
|
28 | running 1 tests using 1 parallel processes | |||
27 | . |
|
29 | . | |
28 | # Ran 1 tests, 0 skipped, 0 failed. |
|
30 | # Ran 1 tests, 0 skipped, 0 failed. | |
29 |
|
31 | |||
30 | (invocation via command line) |
|
32 | (invocation via command line) | |
31 |
|
33 | |||
32 | $ unset TESTDIR |
|
34 | $ unset TESTDIR | |
33 | $ hghave custom |
|
35 | $ hghave custom | |
34 |
|
36 | |||
35 | (terminate with exit code 2 at failure of importing hghaveaddon.py) |
|
37 | (terminate with exit code 2 at failure of importing hghaveaddon.py) | |
36 |
|
38 | |||
37 | $ rm hghaveaddon.* |
|
39 | $ rm hghaveaddon.* | |
38 | $ cat > hghaveaddon.py <<NO_CHECK_EOF |
|
40 | $ cat > hghaveaddon.py <<NO_CHECK_EOF | |
39 | > importing this file should cause syntax error |
|
41 | > importing this file should cause syntax error | |
40 | > NO_CHECK_EOF |
|
42 | > NO_CHECK_EOF | |
41 |
|
43 | |||
42 | $ hghave custom |
|
44 | $ hghave custom | |
43 | failed to import hghaveaddon.py from '.': invalid syntax (hghaveaddon.py, line 1) |
|
45 | failed to import hghaveaddon.py from '.': invalid syntax (hghaveaddon.py, line 1) | |
44 | [2] |
|
46 | [2] |
General Comments 0
You need to be logged in to leave comments.
Login now