Update README.md for link to known issues
Limit travis status in README to the master branch
Merge pull request #259 from zlandau/travisicon

Limit travis status in README to the master branch
SenTestListener.m -> Initializer.m

I'm going to add some other generic initializer stuff here.
change iOS-Simulator-Dylib.xcconfig to not overwrite OTHER_[C|LD]FLAGS

Instead, let's set XT_IOS_SIMULATOR_[C|LD]FLAGS and let the targets
actually copy those into OTHER_[C|LD]FLAGS.
don't use LaunchTaskAndCaptureOutputInCombinedStream to query build settings

The problem is that xcodebuild will occasionally spew NSLog messages on
STDERR, which will break the parser.  Let's keep the streams separate.
in OtestShimTests, add functions for interacting with OSX tests.
in OTestShimTests, don't assert on expected number of tests.

We're about to add more events to the stream, and these tests don't need
to be this specific.
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)
```
only enable the interposed write() functions after the initializer runs.

This fixes a crash bug I've been hitting, where libSystem's intializer
ends up calling into our interposed functions.
fix for the race condition bug in `-[SenTestClassEnumerator init]`

The implementation for `-[SenTestClassEnumerator init]` uses objc_getClassList
to retrieve the list of Obj-C classes.  It first calls objc_getClassList to
get the count of classes, then allocates a buffer of that size, then calls
objc_getClassList again to retrieve all the classes (and that's the problem).

In between `-[SenTestClassEnumerator init]`'s two calls to objc_getClassList,
background threads can trigger more classes to be registered.  Unfortunately,
the implementation throws an exception if the two counts returned by
objc_getClassList don't match.

Let's swizzle `init` and provide our own impementation that uses
objc_copyClassList instead, which will return the class list in one shot.
This is exactly what XCTest now does.

More info:
https://github.com/facebook/xctool/issues/257
change `-[SenTestCase invokeTest]` to create an inner autorelease pool.

This replaces the implementation of `-[SenTestCase invokeTest]` with our
own implementation that creates a new autorelease pool around the invocation
of setUp, <test method>, tearDown.

SenTestingKit *does* wrap test executions in autorelease pools, but it does it
like this...

   1a. pool = [[NSAutoreleasePool alloc] init]
   2a. Announce test case started with: "Test Case '...' started."
   3a. Call setUp
   4a. Call the [test method]
   5a. Call tearDown
   6a. Announce test case ended with: "Test Case '...' failed (0.000 seconds)."
   7a. [pool drain]

We're modifying it to be ...

   1b. pool = [[NSAutoreleasePool alloc] init]
   2b. Announce test case started with: "Test Case '...' started."
>  3b. innerPool = [[NSAutoreleasePool alloc] init]
   4b. Call setUp
   5b. Call the [test method]
   6b. Call tearDown
>  7b. [innerPool drain]
   8b. Announce test case ended with: "Test Case '...' failed (0.000 seconds)."
   9b. [pool drain]

This gives us two benefits...

1. When an over-release bug occurs (i.e. when the autorelease pool drains and
   tries to free an already released object), the crash will appear to happen
   DURING the test rather than AFTER the test.  This is because we'll drain
   the pool before emitting the "Test Case '...' failed (0.000 seconds)."
   message.

2. It insulates otest-shim from brokenness by letting the test run completely
   in a different autorelease pool.  The whole situation that prompted this was
   a test that mock'ed `[NSDate date]` via `[OCMockObject niceMockForClass:[NSDate class]]`.
   OCMock works by swizzling, and it will automatically undo its swizzle when
   the mock object is released.

   The problem was that otest-shim's code was getting called in step [6a] above
   (inside of our swizzle of `+[SenTestLog testCaseDidStop:]`), and our swizzle
   needed to call `[NSDate date]`.  But, since we were running in the same
   autorelease pool as the test, the OCMockObject for NSDate hadn't yet been
   released and so the swizzle was still live.

   otest-shim's code was trying to call the real NSDate, but getting the
   swizzled version instead.

   By creating an inner pool for the test code, we can make sure the mock
   object + swizzle get released.
Merge pull request #250 from raven/patch-1

Update README.md for link to known issues
don't crash running tests for OS X framework target.

The "Cocoa Framework" Xcode template sets TEST_HOST to `$(BUNDLE_LOADER)`, the
framework executable, which is unsuitable for running tests.

These test targets are effectively logic tests, so let's run them as such. This
correctly invokes `xctest` as the test host.

Fixes #251.
adding TestableSettingsIndicatesApplicationTest()

Let's use this to check if a test target is actually an application test
or not.  This replaces all the instance where we would blindly check to
see if the TEST_HOST key was non-nil.
fixing testTestSpecifierIsAllWhenRunningAllTestsInApplicationTestBundle

This test was only passing for me because the build settings file (from
my local machine) happened to refer to a path that existed on my local
machine.

Let's commit the TEST_HOST binary so it can pass on Travis CI, too.
bumping to 0.1.14
build commands are only successful if resultCode == 0 and they have no errors

This fixes #262.

Tested by changing a Run Script to emit strings in the form of "error:
blah" and "warning: "blah", and verified that xctool reported failure
and warnings correctly.
when running ios app tests, don't let stderr output get into the stream

This fixes the problem identified in:
https://github.com/facebook/xctool/issues/224#issuecomment-29288004

Normally, otest-shim would be capturing and rerouting STDERR to STDOUT
in packaged JSON objects.  But, in this case, the objc runtime was
emitting warnings to STDERR before otest-shim even loaded.

It's safe to just ignore all STDERR here when launching the sim.  The
only thing we'll be missing is whatever comes before otest-shim loads.
Add archivePath option to ArchiveAction