lib-httpd.sh: print error.log on error
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Mon, 13 Jun 2016 12:35:09 +0000 (19:35 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Jun 2016 18:50:44 +0000 (11:50 -0700)
Failure to bring up httpd for testing is not considered an error, so the
trash directory, which contains this error.log file, is removed and we
don't know what made httpd fail to start. Improve the situation a bit,
print error.log but only in verbose mode.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-httpd.sh
index f9f3e5fd82e1b34d87993f750bd05e46e69bd82c..ac2cbee250887759b67898e4a2ce9d9c2708b7bc 100644 (file)
@@ -180,6 +180,7 @@ start_httpd() {
        if test $? -ne 0
        then
                trap 'die' EXIT
+               cat "$HTTPD_ROOT_PATH"/error.log >&4 2>/dev/null
                test_skip_or_die $GIT_TEST_HTTPD "web server setup failed"
        fi
 }