From 7222ba65870b7d8c667835d4d817e9011d8a3eb5 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Tue, 7 Jun 2016 18:52:20 +1000 Subject: [PATCH] tests: add debug information for failing tests bats doesn't automatically print the entirety of $output when an error has occurred in a test. This makes debugging much harder, so add to the runc wrapper some more debug information to make maintainers' lives easier. Signed-off-by: Aleksa Sarai --- tests/integration/helpers.bash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index e61ad3011..236e5d26c 100644 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -31,6 +31,11 @@ ROOT="$BATS_TMPDIR/runc" # Wrapper for runc. function runc() { run __runc "$@" + + # Some debug information to make life easier. bats will only print it if the + # test failed, in which case the output is useful. + echo "runc $@ (status=$status):" >&2 + echo "$output" >&2 } # Raw wrapper for runc.