File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ result=0
4
+
5
+ fail ()
6
+ {
7
+ result = 1
8
+ }
9
+
3
10
# Setup stuff
4
11
5
12
DRIVER=$PWD /scripts/mypy
@@ -10,10 +17,10 @@ export PYTHONPATH=`pwd`/lib-typing/3.2:`pwd`
10
17
echo Running tests...
11
18
echo
12
19
echo tests.py
13
- python " $DRIVER " tests.py
20
+ python " $DRIVER " tests.py || fail
14
21
for t in mypy.test.testpythoneval mypy.test.testcgen; do
15
22
echo $t
16
- python " $DRIVER " -m $t
23
+ python " $DRIVER " -m $t || fail
17
24
done
18
25
19
26
# Stub checks
27
34
28
35
echo Type checking stubs...
29
36
echo
30
- python " $DRIVER " -S $STUBTEST
37
+ python " $DRIVER " -S $STUBTEST || fail
31
38
rm $STUBTEST
32
39
cd ..
33
40
34
41
# Sample checks
35
42
36
-
37
-
38
43
# Only run under 3.2
39
44
40
45
if [ " ` python -c ' from sys import version_info as vi; print(vi.major, vi.minor)' ` " == " 3 3" ]; then
@@ -44,8 +49,10 @@ if [ "`python -c 'from sys import version_info as vi; print(vi.major, vi.minor)'
44
49
for f in test/test_* .py; do
45
50
mod=test.` basename " $f " .py`
46
51
echo $mod
47
- python " $DRIVER " -S -m $mod
52
+ python " $DRIVER " -S -m $mod || fail
48
53
done
49
54
else
50
55
echo " Skipping lib-python type checks(Not Python 3.2!)"
51
56
fi
57
+
58
+ exit $result
You can’t perform that action at this time.
0 commit comments