title: xctool error with running test
body: <p>I have a simple Xcode project with a few tests. When I use xctool to build with simple command:</p>
  
  <pre><code>path/to/xctool.sh \
    -project YourProject.xcodeproj \
    -scheme YourScheme \
    build
  </code></pre>
  
  <p>it works just fine. However, when I try to build &amp; run my tests, I get an error when trying to run them.</p>
  
  <p>I build test with:</p>
  
  <pre><code>path/to/xctool.sh \
    -project YourProject.xcodeproj \
    -scheme YourScheme \
    build-tests
  </code></pre>
  
  <p>I run tests with:</p>
  
  <pre><code>path/to/xctool.sh \
    -workspace YourProject.xcodeproj \
    -scheme YourScheme \
    run-tests
  </code></pre>
  
  <p>This complains that I need to specify SDK, so I append the <code>-sdk iphonesimulator</code>. Then I get the following error: </p>
  
  <pre><code>    Failed to query the list of test cases in the test bundle: sh: /Applications/Xcode.app/usr/bin/xcodebuild: No such file or directory
      /Applications/Xcode.app/usr/bin/xcodebuild fails with 32512 - Unknown error: 32512
  2015-03-16 09:53:52.953 sim[15747:4298865] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'launch path not accessible'
  *** First throw call stack:
  (
      0   CoreFoundation                      0x00007fff8d0fa66c __exceptionPreprocess + 172
      1   libobjc.A.dylib                     0x00007fff86cc776e objc_exception_throw + 43
      2   CoreFoundation                      0x00007fff8d0fa51d +[NSException raise:format:] + 205
      3   Foundation                          0x00007fff8b7186ac -[NSConcreteTask launchWithDictionary:] + 444
      4   sim                                 0x000000010f713584 sim + 5508
      5   sim                                 0x000000010f714a3a sim + 10810
      6   libdyld.dylib                       0x00007fff86eea5c9 start + 1
      7   ???                                 0x0000000000000005 0x0 + 5
  )
  libc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>
  
  <p>I don't get why xctool looks for test cases in  /Applications/Xcode.app/usr/bin/xcodebuild?</p>