mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 21:51:21 +00:00
Add diag() for Bash tests. Diag 'ollect_mysql_info.t find_my_cnf_file gets the correct file' when it fails.
This commit is contained in:
@@ -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
|
||||
# ############################################################################
|
||||
|
Reference in New Issue
Block a user