mirror of
https://github.com/sstephenson/bats.git
synced 2025-03-04 07:49:50 +01:00
test/bats: Add statements to debug Travis macOS
The following build is demonstrating failures I can't reproduce on my own macOS system: https://travis-ci.org/bats-core/bats-core/jobs/281719290
This commit is contained in:
parent
d310b25911
commit
918714dd4d
|
@ -67,6 +67,8 @@ fixtures bats
|
||||||
@test "one failing test" {
|
@test "one failing test" {
|
||||||
run bats "$FIXTURE_ROOT/failing.bats"
|
run bats "$FIXTURE_ROOT/failing.bats"
|
||||||
[ $status -eq 1 ]
|
[ $status -eq 1 ]
|
||||||
|
printf 'lines:\n' >&2
|
||||||
|
printf '%s\n' "${lines[@]}" >&2
|
||||||
[ "${lines[0]}" = '1..1' ]
|
[ "${lines[0]}" = '1..1' ]
|
||||||
[ "${lines[1]}" = 'not ok 1 a failing test' ]
|
[ "${lines[1]}" = 'not ok 1 a failing test' ]
|
||||||
[ "${lines[2]}" = "# (in test file $RELATIVE_FIXTURE_ROOT/failing.bats, line 4)" ]
|
[ "${lines[2]}" = "# (in test file $RELATIVE_FIXTURE_ROOT/failing.bats, line 4)" ]
|
||||||
|
@ -86,6 +88,8 @@ fixtures bats
|
||||||
@test "failing test with significant status" {
|
@test "failing test with significant status" {
|
||||||
STATUS=2 run bats "$FIXTURE_ROOT/failing.bats"
|
STATUS=2 run bats "$FIXTURE_ROOT/failing.bats"
|
||||||
[ $status -eq 1 ]
|
[ $status -eq 1 ]
|
||||||
|
printf 'lines:\n' >&2
|
||||||
|
printf '%s\n' "${lines[@]}" >&2
|
||||||
[ "${lines[3]}" = "# \`eval \"( exit \${STATUS:-1} )\"' failed with status 2" ]
|
[ "${lines[3]}" = "# \`eval \"( exit \${STATUS:-1} )\"' failed with status 2" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,6 +157,8 @@ fixtures bats
|
||||||
cd "$TMP"
|
cd "$TMP"
|
||||||
run bats "$FIXTURE_ROOT/failing.bats"
|
run bats "$FIXTURE_ROOT/failing.bats"
|
||||||
[ $status -eq 1 ]
|
[ $status -eq 1 ]
|
||||||
|
printf 'lines:\n' >&2
|
||||||
|
printf '%s\n' "${lines[@]}" >&2
|
||||||
[ "${lines[2]}" = "# (in test file $FIXTURE_ROOT/failing.bats, line 4)" ]
|
[ "${lines[2]}" = "# (in test file $FIXTURE_ROOT/failing.bats, line 4)" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user