facebook/xctool — pull request #258 by fpotter (2013-11-22 19:35:56+00:00)
Title: when tests fail to start, include any output emitted by the test runner.

When test bundles crash on startup, there's often useful information (maybe exception info) printed to STDERR before the test bundle crashes. Let's capture that output and display it in the failure message.

It will look like ...

```
run-test TestThatThrowsExceptionOnStart.octest (macosx10.9, logic-test, GC OFF)
-[FAILED_BEFORE TESTS_RAN]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Test did not run: the test bundle stopped running or crashed before the
test suite started.

2013-11-22 11:23:32.105 otest[22683:303] *** Terminating app due to
uncaught exception 'NSGenericException', reason: 'Let's crash on start!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff95f5e41c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff89ec9e75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff95f5e2cc +[NSException raise:format:] + 204
3 TestThatThrowsExceptionOnStart 0x0000000101bb0c83 Initializer + 115
4 ??? 0x00007fff65991c2e 0x0 + 140734897921070
5 ??? 0x00007fff65991dba 0x0 + 140734897921070921466
6 ??? 0x00007fff6598ea62 0x0 + 140734897908322
7 ??? 0x00007fff6598e8f6 0x0 + 140734897907958
8 ??? 0x0x00007fff684b0e 0x0 + 140734897867534
9 ??? 0x00007fff6598b7cf 0x0 + 140734897895375
10 libdyld.dylib 0x00007fff960757ef dlopen + 59
11 CoreFoundation 0x00007fff95ea7e1a _CFBundleDlfcnLoadBundle + 170
12 CoreFoundation 0x00007fff95ea763b _CFBundleLoadExecutableAndReturnError + 683
13 Foundation 0x00007fff9121cdd0 _NSBundleLoadCode + 548
14 Foundation 0x00007fff9121c9bb -[NSBundle loadAndReturnError:] + 259
15 otest 0x0000000101b13dec otest + 7660
16 otest 0x0000000101b141a1 otest + 8609
17 otestt 0x0000000101b13b46 otest + 6982
18 libdyldbdyld.dylib 0x00007fff960765fd start + 1
19 ???19 0x000000000000000a 0x0 + 10
)
libc++abi.dylib: terminating with uncaught exception of type NSException
━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☂ -[FAILED_BEFORE TESTS_RAN] (0 ms) (0)
```