You can redirect the output of your runTests
command to a file:
cmake CMakeLists.txt && make && ./runTests > test_output.txt
Also, see this which explains why you do not need the &
I had used in my comment. As Awaken's answer says, the &
redirects both the stdout
and stderr
to the same file. But since googletest
output always goes to stdout
you may leave out the &
.