You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
I have a scheme for a framework target (TestFramework) that also has a test target (TestFrameworkTests) set for running tests against the framework target. There is also a scheme created for the test target.
invoking xcodebuild -scheme TestFramework[Tests] -sdk iphonesimulator test runs the tests fine, but xctool -scheme TestFramework[Tests] -sdk iphonesimulator test fails. I noticed by using -showTasks that the xctool invocation generates the following xcodebuild invocation:
// For Xcode 6, we can pass `test -showBuildSettings` to xcodebuild and get
// build settings that are specific to the `test` action. But in Xcode 7
// `-scheme` should be passed along with `test` action which isn't always
// defined. So we are using `build` action which doesn't require to specify
// scheme.
NSString *action = ToolchainIsXcode7OrBetter() ? @"build" : @"test";
If there were a way to find if a scheme exists for the target (I'm sure there is somewhere in the project), I wonder if it would then be as easy as always providing test as the action and swapping out the @"-target", target with @"-scheme", <corresponding name of scheme>, and fall back to the current logic otherwise?
I have a scheme for a framework target (
TestFramework
) that also has a test target (TestFrameworkTests
) set for running tests against the framework target. There is also a scheme created for the test target.invoking
xcodebuild -scheme TestFramework[Tests] -sdk iphonesimulator test
runs the tests fine, butxctool -scheme TestFramework[Tests] -sdk iphonesimulator test
fails. I noticed by using-showTasks
that the xctool invocation generates the following xcodebuild invocation:simply replacing the
-target
with-scheme
fixes the issue. Is there a reason this doesn't happen?Test project can be downloaded from: https://www.dropbox.com/s/ulq1433uhcm9euw/TestFramework.zip?dl=0
The invocations I used are in
xcodebuild-test.sh
andxctool-test.sh
The text was updated successfully, but these errors were encountered: