From 918714dd4d7c4e537dc45f0292b16d559033bde9 Mon Sep 17 00:00:00 2001 From: Mike Bland Date: Sat, 30 Sep 2017 14:51:45 -0400 Subject: [PATCH] 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 --- test/bats.bats | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/bats.bats b/test/bats.bats index f1aff29..9fca64a 100755 --- a/test/bats.bats +++ b/test/bats.bats @@ -67,6 +67,8 @@ fixtures bats @test "one failing test" { run bats "$FIXTURE_ROOT/failing.bats" [ $status -eq 1 ] + printf 'lines:\n' >&2 + printf '%s\n' "${lines[@]}" >&2 [ "${lines[0]}" = '1..1' ] [ "${lines[1]}" = 'not ok 1 a failing test' ] [ "${lines[2]}" = "# (in test file $RELATIVE_FIXTURE_ROOT/failing.bats, line 4)" ] @@ -86,6 +88,8 @@ fixtures bats @test "failing test with significant status" { STATUS=2 run bats "$FIXTURE_ROOT/failing.bats" [ $status -eq 1 ] + printf 'lines:\n' >&2 + printf '%s\n' "${lines[@]}" >&2 [ "${lines[3]}" = "# \`eval \"( exit \${STATUS:-1} )\"' failed with status 2" ] } @@ -153,6 +157,8 @@ fixtures bats cd "$TMP" run bats "$FIXTURE_ROOT/failing.bats" [ $status -eq 1 ] + printf 'lines:\n' >&2 + printf '%s\n' "${lines[@]}" >&2 [ "${lines[2]}" = "# (in test file $FIXTURE_ROOT/failing.bats, line 4)" ] }