##// 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 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 > $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 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]
General Comments 0
You need to be logged in to leave comments. Login now