Keep the test log and cat it if it's not /dev/null

Previously we simpley dump to /dev/null. This will show no fail details
on the Travis CI alike auto machines. We need to see the make log if we
set the env TEST_LOG.