about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-12-21 17:04:22 +0100
committerGitHub <noreply@github.com>2020-12-21 17:04:22 +0100
commit19dc630ce8d8ab6d8b266ff9f429fb7650e4d76a (patch)
tree2a68ca171f378a8732f0d3bd8e326065fb4ee55d
parent910512a9207880312f357640d9f851fb16e73fc7 (diff)
parent2ee883aa1a3bae8fc38fefa4a67b021924be8cc7 (diff)
downloadprofani-tty-19dc630ce8d8ab6d8b266ff9f429fb7650e4d76a.tar.gz
Merge pull request #1465 from wstrm/fix-print-logs-in-ci
Print logs on error in CI
-rwxr-xr-xci-build.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/ci-build.sh b/ci-build.sh
index 0a42e099..2d615a9a 100755
--- a/ci-build.sh
+++ b/ci-build.sh
@@ -1,8 +1,19 @@
 #!/usr/bin/env bash
 
+log_content()
+{
+    echo
+    echo "Content of $1:"
+    cat "$1"
+}
+
 error_handler()
 {
     ERR_CODE=$?
+
+    log_content ./config.log
+    log_content ./test-suite.log
+
     echo
     echo "Error ${ERR_CODE} with command '${BASH_COMMAND}' on line ${BASH_LINENO[0]}. Exiting."
     echo
@@ -114,10 +125,6 @@ do
     $MAKE CC="${CC}"
     $MAKE check
 
-    if [ $? -eq 1 ]; then
-        cat ./test-suite.log
-    fi
-
     ./profanity -v
     $MAKE clean
 done