Michael van der Westhuizen: Improve support for testing on Linux.  Fixes http://llvm.org/bugs/show_bug.cgi?id=14892.