Explorar o código

print stderr on the fly also to console

Steffen Jaeckel %!s(int64=8) %!d(string=hai) anos
pai
achega
c5caac505b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      valgrind.sh

+ 1 - 1
valgrind.sh

@@ -28,6 +28,6 @@ echo "Run tests with valgrind..."
 for i in `seq 1 10` ; do sleep 300 && echo "Valgrind tests in Progress..."; done &
 alive_pid=$!
 
-valgrind --error-exitcode=666 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all ./test 1>test_std.txt 2>test_err.txt || { kill $alive_pid; echo "Valgrind failed"; exit 1; }
+valgrind --error-exitcode=666 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all ./test >test_std.txt 2> >(tee -a test_err.txt >&2) || { kill $alive_pid; echo "Valgrind failed"; exit 1; }
 
 kill $alive_pid