@@ -35,6 +35,8 @@ thisdir="$(dirname "${BASH_SOURCE[0]}")" || exit $?
35
35
topdir=" $( git -C " ${thisdir} " rev-parse --show-toplevel) " || exit $?
36
36
cd " ${topdir} " || exit $?
37
37
38
+ errors=()
39
+
38
40
# Parse arguments.
39
41
apply_arg=" "
40
42
only_changed=0
@@ -57,29 +59,43 @@ for arg in "$@"; do
57
59
done
58
60
59
61
echo " Running misc"
60
- check/misc
62
+ check/misc || errors+=( " check/misc failed " )
61
63
62
64
if [ ${only_changed} -ne 0 ]; then
63
65
echo " Running incremental pylint"
64
- check/pylint-changed-files
66
+ check/pylint-changed-files || errors+=( " check/pylint-changed-files failed " )
65
67
else
66
68
echo " Running pylint"
67
- check/pylint
69
+ check/pylint || errors+=( " check/pylint failed " )
68
70
fi
69
71
70
72
echo " Running mypy"
71
- check/mypy
73
+ check/mypy || errors+=( " check/mypy failed " )
72
74
73
75
echo " Running incremental format"
74
- check/format-incremental " ${rev} " " ${apply_arg} "
76
+ check/format-incremental " ${rev} " " ${apply_arg} " || errors+=( " check/format-incremental failed " )
75
77
76
78
if [ ${only_changed} -ne 0 ]; then
77
79
echo " Running pytest and incremental coverage on changed files"
78
- check/pytest-changed-files-and-incremental-coverage " ${rev} "
80
+ check/pytest-changed-files-and-incremental-coverage " ${rev} " ||
81
+ errors+=( " check/pytest-changed-files-and-incremental-coverage failed" )
79
82
else
80
83
echo " Running pytest and incremental coverage"
81
- check/pytest-and-incremental-coverage " ${rev} "
84
+ check/pytest-and-incremental-coverage " ${rev} " ||
85
+ errors+=( " check/pytest-and-incremental-coverage failed" )
82
86
fi
83
87
84
88
echo " Running doctest"
85
- check/doctest
89
+ check/doctest || errors+=( " check/doctest failed" )
90
+
91
+ echo
92
+ if [[ " ${# errors[@]} " == 0 ]]; then
93
+ echo " All checks passed."
94
+ result=0
95
+ else
96
+ printf " Some checks failed.\n\n"
97
+ printf " %s\n" " ${errors[@]} "
98
+ result=1
99
+ fi
100
+
101
+ exit " ${result} "
0 commit comments