fix typo in xctool.xcconfig
Merge pull request #400 from facebook/yiding/dev

fix typo in xctool.xcconfig
Fix FakeTask to work with large outputs.

Previously `launch` will wait for child task to complete before
returning. This prevents the pipes from being drained on the current
thread if using RunLoop sources to drain the pipes), and thus cause the
writes on the child to block forever while waiting for the pipe to
empty.
Fix multibyte string handling in LaunchTaskAndFeedOuputLinesToBlock

Fixes #387.

Previously it read bytes from the stream and immediately decode it to
a string before concatenating it into a larger buffer.  If the chunk
ended in the middle of a multibyte character, the string decode would
fail.

This changes the handling to keep the bytes as bytes, and decode it to a
string only after a line has been read, doing the line-breaking on the
raw bytes.  This should work as UTF8 ensures that the '\n' byte is only
used for the newline character and nowhere else, and any multibyte
characters be necessarily complete prior to the newline.

This does not fix malformed UTF8 strings in stdout, should that ever
arise.

This still concatenates and resizes a temporary buffer, a future
refactor could use `dispatch_data` as `read_outputs` in the same file
already does.
Allow swift modules in class name passed to ParseClassAndMethodFromTestName
Merge pull request #402 from facebook/yiding/dev

Fix multibyte string handling in LaunchTaskAndFeedOuputLinesToBlock
Merge pull request #403 from Pretz/master

Allow Swift modules in class name passed to ParseClassAndMethodFromTestName
Xcode now runs these tests, say that Xcode 6 isn't supported yet
Fix typo in GetAvailableSDKsInfo
Set simulator environment provided by CoreSimulator when running logic tests.

In Xcode 6 `sim` doesn't set `CFFIXED_USER_HOME` if simulator is not launched but this environment is used, for example, by NSHomeDirectory().
To avoid similar situations in future let's set all simulator environments provided by CoreSimulator framework before running logic tests.
Always list tests and invert scope when running logic tests in Xcode 6.

For some reason if logic tests are run in parallel under Xcode 6 it happens that none of the tests are run in test bundle and only `{begin,end}-test-suite` events are populated to reporters.
Though the fix looks weird because now it will generate `-SenTest   -SenTestInvertScope YES` it seems to fix the issue and actually work.

The main suspicion is that it happens because of usage of `NSUserDefaults` in SenTesting/XCTest frameworks. Probably logic tests are overlapping at some point though it is not clear why it has started to happen only in Xcode 6.
Performance improvements.

- `ToolchainIsXcodeXOrBetter` methods are going to be called in enough number of places to be finally cached.
- As soon as interacting with CoreSimulator framework is a little bit painful, `simulatedDevice` and `simulatedRuntime` could be cached as soon as they are not changed during tests.
Merge latest clang-as-ios-dylib changes.
Merge pull request #414 from facebook/nekto/clang_update

Merge latest clang-as-ios-dylib changes.
Fix issue with dispatch thread soft limit to avoid potential deadlock.

Though it is not documented but apparently there is dispatch thread soft limit on OS X (and iOS) which is equal to 64. Generation of more then 64 threads could lead to error like this: `Dispatch Thread Soft Limit: 64 reached in 2244 of 2244 samples -- too many dispatch threads blocked in synchronous operations`.

In xctool it is a semaphore which limits number of currently running threads (`jobLimiter`) which value is equal to `[[NSProcessInfo processInfo] processorCount]`. But the problem is that it doesn't limit number of created threads which could easily be more then 64. Everything would be fine if generated threads don't create other threads but it could easily happen when interaction with CoreSimulator framework happens.

So there could be a situation when there is 64 threads created to run logic tests, and every thread wants to access something in CoreSimulator frameworks which tries to dispatch another thread to guard access to shared resources but fails (locks) because there is a 64 dispatch thread soft limit. At that point all threads will be deadlocked.
Merge pull request #409 from facebook/nekto/fix_dispatch_limit

Fix issue with dispatch thread soft limit to avoid potential deadlock.
Merge pull request #410 from facebook/nekto/set_sim_envs

Set simulator environment provided by CoreSimulator when running logic tests.
Append xcodebuild version to xctool build output directory.

After Xcode 6 support was added several macros were introduced to simplify switching between Xcode 5 and Xcode 6 implementations. These macros cause different runtime issues after switching from Xcode 5 to 6 or back that are hard to debug.
Let's improve build scripts so builds for different versions of xcodebuild are saved in different directories.
Merge pull request #412 from facebook/nekto/improve_build_script

Append xcodebuild version to xctool build output directory.
Merge pull request #411 from facebook/nekto/force_passing_tests

Always list tests and invert scope when running logic tests in Xcode 6.