Skip to content

Commit c0a6810

Browse files
paketo-botpaketo-bot
authored andcommitted
Update github-config to 27eb427
1 parent ed065c8 commit c0a6810

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

scripts/.util/print.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

4243
function util::print::warn() {

scripts/.util/tools.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
}

scripts/integration.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,11 @@ function images::pull() {
9797

9898
function 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 **"

0 commit comments

Comments
 (0)