File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ function util::print::success() {
3636 reset=" \033[0;39m"
3737
3838 echo -e " ${green}${message}${reset} " >&2
39- exit 0
39+ exitcode=" ${2:- 0} "
40+ exit " ${exitcode} "
4041}
4142
4243function util::print::warn() {
Original file line number Diff line number Diff line change @@ -130,3 +130,13 @@ function util::tools::packager::install () {
130130 GOBIN=" ${dir} " go get github.com/cloudfoundry/libcfbuildpack/packager
131131 fi
132132}
133+
134+ function util::tools::tests::checkfocus() {
135+ testout=" ${1} "
136+ if grep -q ' Focused: [1-9]' " ${testout} " ; then
137+ echo " Detected Focused Test(s) - setting exit code to 197"
138+ rm " ${testout} "
139+ util::print::success " ** GO Test Succeeded **" 197
140+ fi
141+ rm " ${testout} "
142+ }
Original file line number Diff line number Diff line change @@ -97,8 +97,11 @@ function images::pull() {
9797
9898function tests::run() {
9999 util::print::title " Run Buildpack Runtime Integration Tests"
100+
101+ testout=$( mktemp)
100102 pushd " ${BUILDPACKDIR} " > /dev/null
101- if GOMAXPROCS=" ${GOMAXPROCS:- 4} " go test -count=1 -timeout 0 ./integration/... -v -run Integration; then
103+ if GOMAXPROCS=" ${GOMAXPROCS:- 4} " go test -count=1 -timeout 0 ./integration/... -v -run Integration | tee " ${testout} " ; then
104+ util::tools::tests::checkfocus " ${testout} "
102105 util::print::success " ** GO Test Succeeded **"
103106 else
104107 util::print::error " ** GO Test Failed **"
You can’t perform that action at this time.
0 commit comments