acceptance: add log method to common.sh
This can be helpful if tests need to output something with a timestamp.
@@ -61,7 +61,7 @@ collect_elem_metrics() {
# Print docker container status
#######################################
docker_status() {
- echo "$(date -u +"%F %T.%6N%z") Docker containers:"
+ log "Docker containers:"
docker ps -a -s
}
@@ -72,3 +72,10 @@ test_teardown() {
docker_status
./tools/dc down
}
+
+#######################################
+# Log: Echo with a timestamp
+#######################################
+log() {
+ echo "$(date -u +"%F %T.%6N%z") $@"
+}
