facebook/xctool — pull request #166 by ryanrhee (2013-09-17 10:02:51+00:00)
Title: Adding support for the XCTest framework.

What a merge ...
This is the fix for #115.

**Changes**
* Because XCTest doesn't expose the `NSException`, all references to `kReporter_EndTest_Exception_NameKey` are now gone. This means that the exception message will no longer be visible.
* To continue to use iOS 5.0 in `buid.sh`, the XCTest framework is not explicitly being linked. Instead, the file `XCTest.h` generated by `class-dump` is being used.
* `otest-query` decides which class to search for using the test bundle's file extension.
* `xctool` itself also decides which test executable to use depending on the test bundle's file extension.
* Certain flags are being stripped out when clang is called to compile source into object files, similar to how linker flags are being stripped.

There are a ton of renamings that are necessary, since many of the functions are no longer `SenTestingKit` specific, and should not be named as such. For the sake of sanity, the names have been kept. Perhaps the renaming should be scheduled so there aren't any epic merge conflicts that result.

There's also a peculiar behavior I'm noticing when testing this against the previous version. When using this version of `xctool` to test the `TestProject-Library-OSX` project, this is the resulting stack trace:

```
0 TestProject-Library-OSXTests 0x000000010ef64a71 -[TestProject_Library_OSXTests testOutput] + 209
1 CoreFoundation 0x00007fff96f9adec __invoking___ + 140
2 CoreFoundation 0x00007fff96f9ac54 -[NSInvocation invoke] + 308
3 SenTestingKit 0x000000010ef6bafa -[SenTestCase invokeTest] + 159
4 SenTestingKit 0x000000010ef6bc29 -[SenTestCase performTest:] + 142
5 SenTestingKit 0x000000010ef6b55b -[SenTest run] + 65
6 SenTestingKit 0x000000010ef6ef3f -[SenTestSuite performTest:] + 125
7 SenTestingKit 0x000000010ef6b55b -[SenTest run] + 65
8 SenTestingKit 0x000000010ef6ef3f -[SenTestSuite performTest:] + 125
9 SenTestingKit 0x000000010ef6b55b -[SenTest run] + 65
10 SenTestingKit 0x000000010ef6dc85 +[SenTestProbe runTests:] + 153
11 otest 0x000000010edd0e22 otest + 7714
12 otest 0x000000010edd11a1 otest + 8609
13 otest 0x000000010edd0b46 otest + 6982
14 libdyld.dylib 0x00007fff94a505fd start + 1
15 ??? 0x000000000000000a 0x0 + 10
```

That last line shouldn't be there. It seems like changes in this pull request introduces this, but I've yet to figure out why this happens. (This doesn't affect the actual usage of the tool though.)