From 11b0ff0d7741ce889d59997f8805fe58a04a7666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Chlup?= Date: Thu, 10 Aug 2023 15:18:24 +0200 Subject: [PATCH] test: Add httpd's access_log among test outputs --- test/includes/common.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/includes/common.sh b/test/includes/common.sh index 65ea9b232..58ef0bb44 100644 --- a/test/includes/common.sh +++ b/test/includes/common.sh @@ -24,7 +24,9 @@ run_test() { fi # preserve httpd's logs too if DEBUG if [ $DEBUG ]; then - docker logs $(docker ps -a | grep $HTTPD_IMG | cut -f 1 -d' ') > "logs/${2:-$1}-httpd.log" 2>&1 + local httpd_cont=$(docker ps -a | grep $HTTPD_IMG | cut -f 1 -d' ') + docker logs $httpd_cont > "logs/${2:-$1}-httpd.log" 2>&1 + docker cp ${httpd_cont}:/usr/local/apache2/logs/access_log "logs/${2:-$1}-httpd_access.log" > /dev/null fi # Clean all after run httpd_shutdown > /dev/null 2>&1