Skip to content

Commit 5cbdfb3

Browse files
committed
test: Make sure return value of bats is returned
Was returning a failing exit status on platforms other than Linux on Travis.
1 parent 960de68 commit 5cbdfb3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@ _test() {
7171
else
7272
local tests=($(@go 'glob' "${__GO_TEST_GLOB_ARGS[@]}" "$@"))
7373
"$BASH" "$bats_path" "${tests[@]}"
74+
local result="$?"
7475

75-
if [[ "$?" -eq 0 && "$TRAVIS_OS_NAME" == 'linux' ]]; then
76+
if [[ "$result" -eq 0 && "$TRAVIS_OS_NAME" == 'linux' ]]; then
7677
_test_coverage "$@"
7778
else
78-
return "$?"
79+
return "$result"
7980
fi
8081
fi
8182
}

0 commit comments

Comments
 (0)