##// END OF EJS Templates
tests: invoke run-tests.py in test-hghave using $PYTHON (issue5697)...
Augie Fackler -
r34469:bb14dbab stable
parent child Browse files
Show More
@@ -1,44 +1,44 b''
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 > $TESTDIR/run-tests.py $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \
25 > $PYTHON $TESTDIR/run-tests.py $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \
26 > )
26 > )
27 .
27 .
28 # Ran 1 tests, 0 skipped, 0 failed.
28 # Ran 1 tests, 0 skipped, 0 failed.
29
29
30 (invocation via command line)
30 (invocation via command line)
31
31
32 $ unset TESTDIR
32 $ unset TESTDIR
33 $ hghave custom
33 $ hghave custom
34
34
35 (terminate with exit code 2 at failure of importing hghaveaddon.py)
35 (terminate with exit code 2 at failure of importing hghaveaddon.py)
36
36
37 $ rm hghaveaddon.*
37 $ rm hghaveaddon.*
38 $ cat > hghaveaddon.py <<EOF
38 $ cat > hghaveaddon.py <<EOF
39 > importing this file should cause syntax error
39 > importing this file should cause syntax error
40 > EOF
40 > EOF
41
41
42 $ hghave custom
42 $ hghave custom
43 failed to import hghaveaddon.py from '.': invalid syntax (hghaveaddon.py, line 1)
43 failed to import hghaveaddon.py from '.': invalid syntax (hghaveaddon.py, line 1)
44 [2]
44 [2]
General Comments 0
You need to be logged in to leave comments. Login now