diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ccd853d4045897aa98f639b0fd19893b3be55c08..05354d5753f2ee69ed251414351f78ce2106a2cd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -158,7 +158,7 @@ test:
       - cat hash_pylib
         # Run the actual tests. This starts a new docker container within which
         # the tests run. The return value is stored in .docker/result
-      - /bin/sh ./run.sh
+      - /bin/sh ./run.sh | tee tox_output.log
 
         # Save logs
       - docker logs docker-caosdb-server-1 &> ../caosdb_log.txt
@@ -177,6 +177,9 @@ test:
         # the pyinttest docker writes the return value of the tests into the
         # file result
       - rc=`cat .docker/result`
+      - if [ "$r" != "0" ]; then
+          awk '/=+ FAILURES/, /=+ / && ! /=+ FAILURES/' tox_output.log;
+        fi;
       - exit $rc
   dependencies: [cert]
   timeout: 3h