File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 69
69
if [ " $RSPEC_TEST " = " true" ]; then
70
70
SAVED_PATH=" $PATH "
71
71
RSPEC_EXITCODE=" 0"
72
+ COVERAGE_EXITCODE=" 0"
72
73
for pv in $PUPPET_VERSIONS ; do
73
74
export PUPPET_VERSION=" $pv "
74
75
@@ -106,6 +107,11 @@ if [ "$RSPEC_TEST" = "true" ]; then
106
107
107
108
# Quick coverage report
108
109
cat " $DIR /coverage/coverage.txt"
110
+ if grep -q " 100% test coverage. You're all set, friend" " $DIR /coverage/coverage.txt" ; then
111
+ :
112
+ else
113
+ COVERAGE_EXITCODE=1
114
+ fi
109
115
echo " "
110
116
111
117
# To avoid travis getting hung if it gets confused, we'll run each of these
@@ -136,11 +142,16 @@ if [ "$RSPEC_TEST" = "true" ]; then
136
142
rm -f " ${DIR} /.puppet_version"
137
143
else
138
144
RSPEC_EXITCODE=-1
145
+ COVERAGE_EXITCODE=-1
139
146
echo " "
140
147
fi
141
148
142
149
# Finish off script
143
150
echo " Finished script/cibuild:"
144
- [ " $RUBOCOP_EXITCODE " -ge 0 ] && echo " - rubocop: exit ${RUBOCOP_EXITCODE} "
145
- [ " $RSPEC_EXITCODE " -ge 0 ] && echo " - rspec: exit ${RSPEC_EXITCODE} "
146
- if [ " $RUBOCOP_EXITCODE " -gt 0 ] || [ " $RSPEC_EXITCODE " -gt 0 ]; then exit 1; else exit 0; fi
151
+ [ " $RUBOCOP_EXITCODE " -ge 0 ] && echo " - rubocop: exit ${RUBOCOP_EXITCODE} "
152
+ [ " $RSPEC_EXITCODE " -ge 0 ] && echo " - rspec: exit ${RSPEC_EXITCODE} "
153
+ [ " $COVERAGE_EXITCODE " -ge 0 ] && echo " - coverage: exit ${COVERAGE_EXITCODE} "
154
+ if [ " $RUBOCOP_EXITCODE " -gt 0 ] || [ " $RSPEC_EXITCODE " -gt 0 ] || [ " $COVERAGE_EXITCODE " -gt 0 ]; then
155
+ exit 1
156
+ fi
157
+ exit 0
You can’t perform that action at this time.
0 commit comments