run-libcore-tests.sh: check for tty
am: fcd5a282ce

Change-Id: Ieff459b20208c2ead7c64d0fc132a253107e9dd1