From c5e2c0fe88bc85cbab7d80fa1d4cba3769442707 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Wed, 25 Jul 2018 16:11:52 +0100 Subject: [PATCH] tests: Add more messages Add a few more informational messages to help with debugging. Signed-off-by: James O. D. Hunt --- tests/test_images.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test_images.sh b/tests/test_images.sh index 242b1dbc1a..c85d7ea87f 100755 --- a/tests/test_images.sh +++ b/tests/test_images.sh @@ -64,6 +64,8 @@ exit_handler() { if [ "$?" -eq 0 ] then + info "tests passed successfully - cleaning up" + # Rootfs and images are owned by root sudo -E rm -rf "${tmp_rootfs}" sudo -E rm -rf "${images_dir}" @@ -73,8 +75,9 @@ exit_handler() return fi - # The test failed so dump what we can + info "ERROR: test failed" + # The test failed so dump what we can info "AGENT_INIT: '${AGENT_INIT}'" info "images:" @@ -428,12 +431,16 @@ test_single_distro() die "no test for distro '$distro' (try one of $distros)" fi + info "only running tests for distro $distro" + # run the test $defined_func } test_all_distros() { + info "running tests for all distros" + test_distro_fedora test_distro_centos test_distro_alpine @@ -502,6 +509,10 @@ main() else test_all_distros fi + + # We shouldn't really need a message like this but the CI can fail in + # mysterious ways so make it clear! + info "all tests finished successfully" } main "$@"