diff --git a/t/lib/bash/collect_mysql_info.sh b/t/lib/bash/collect_mysql_info.sh index 4bb4557d..6bdfc5c2 100644 --- a/t/lib/bash/collect_mysql_info.sh +++ b/t/lib/bash/collect_mysql_info.sh @@ -85,6 +85,7 @@ is \ "$cnf_file" \ "/tmp/12345/my.sandbox.cnf" \ "find_my_cnf_file gets the correct file" +[ $? -ne 0 ] && diag "$p/mysqld-instances" res=$(find_my_cnf_file "$samples/ps-mysqld-001.txt") is "$res" "/tmp/12345/my.sandbox.cnf" "ps-mysqld-001.txt" diff --git a/util/test-bash-functions b/util/test-bash-functions index f456a4cb..2616c7c8 100755 --- a/util/test-bash-functions +++ b/util/test-bash-functions @@ -211,6 +211,17 @@ wait_for_files() { done } +diag() { + if [ $# -eq 1 -a -f "$1" ]; then + echo "# $1:" + awk '{print "# " $0}' "$1" + else + for line in "$@"; do + echo "# $line" + done + fi +} + # ############################################################################ # Script starts here # ############################################################################