diff --git a/plugin/src/test/groovy/org/openbakery/XcodeBuildTaskSpecification.groovy b/plugin/src/test/groovy/org/openbakery/XcodeBuildTaskSpecification.groovy index c75abcc7..08dea5ef 100644 --- a/plugin/src/test/groovy/org/openbakery/XcodeBuildTaskSpecification.groovy +++ b/plugin/src/test/groovy/org/openbakery/XcodeBuildTaskSpecification.groovy @@ -50,7 +50,6 @@ class XcodeBuildTaskSpecification extends Specification { def expectedDefaultDirectories() { return [ - "-derivedDataPath", new File(project.buildDir, "derivedData").absolutePath, "DSTROOT=" + new File(project.buildDir,"dst").absolutePath, "OBJROOT=" + new File(project.buildDir,"obj").absolutePath, "SYMROOT=" + new File(project.buildDir,"sym").absolutePath, @@ -58,6 +57,13 @@ class XcodeBuildTaskSpecification extends Specification { ] } + def expectedDerivedDataPath() { + return [ + "-derivedDataPath", new File(project.buildDir, "derivedData").absolutePath + ] + + } + def createCommand(String... commands) { def command = [] command.addAll(commands) @@ -66,6 +72,7 @@ class XcodeBuildTaskSpecification extends Specification { def createCommandWithDefaultDirectories(String... commands) { def command = createCommand(commands) + command.addAll(expectedDerivedDataPath()) command.addAll(expectedDefaultDirectories()) return command } @@ -194,6 +201,7 @@ class XcodeBuildTaskSpecification extends Specification { "CODE_SIGN_IDENTITY=", "CODE_SIGNING_REQUIRED=NO" ] + expectedCommandList.addAll(expectedDerivedDataPath()) expectedCommandList.addAll(expectedDefaultDirectories()) } commandList == expectedCommandList @@ -220,6 +228,7 @@ class XcodeBuildTaskSpecification extends Specification { "CODE_SIGN_IDENTITY=", "CODE_SIGNING_REQUIRED=NO" ] + expectedCommandList.addAll(expectedDerivedDataPath()) expectedCommandList.addAll(expectedDefaultDirectories()) expectedCommandList << "-destination" << "platform=OS X,arch=x86_64" @@ -250,6 +259,7 @@ class XcodeBuildTaskSpecification extends Specification { "-configuration", "Debug", "ARCHS=myarch" ] + expectedCommandList.addAll(expectedDerivedDataPath()) expectedCommandList.addAll(expectedDefaultDirectories()) expectedCommandList << "-destination" << "platform=iOS Simulator,id=5F371E1E-AFCE-4589-9158-8C439A468E61" @@ -284,6 +294,7 @@ class XcodeBuildTaskSpecification extends Specification { "CODE_SIGNING_REQUIRED=NO", "ARCHS=armv armv7s" ] + expectedCommandList.addAll(expectedDerivedDataPath()) expectedCommandList.addAll(expectedDefaultDirectories()) } commandList == expectedCommandList @@ -309,6 +320,7 @@ class XcodeBuildTaskSpecification extends Specification { "-workspace", 'myworkspace', "-configuration", "Debug", ] + expectedCommandList.addAll(expectedDerivedDataPath()) expectedCommandList.addAll(expectedDefaultDirectories()) expectedCommandList << "-destination" << "platform=iOS Simulator,id=5F371E1E-AFCE-4589-9158-8C439A468E61" @@ -363,6 +375,7 @@ class XcodeBuildTaskSpecification extends Specification { "-workspace", 'myworkspace', "-configuration", 'Debug', ] + expectedCommandList.addAll(expectedDerivedDataPath()) expectedCommandList.addAll(expectedDefaultDirectories()) expectedCommandList << "-destination" << "platform=iOS Simulator,id=5F371E1E-AFCE-4589-9158-8C439A468E61" } @@ -392,6 +405,7 @@ class XcodeBuildTaskSpecification extends Specification { "-configuration", 'Debug', "ARCHS=i386" ] + expectedCommandList.addAll(expectedDerivedDataPath()) expectedCommandList.addAll(expectedDefaultDirectories()) expectedCommandList << "-destination" << "platform=iOS Simulator,id=5F371E1E-AFCE-4589-9158-8C439A468E61" } diff --git a/plugin/src/test/groovy/org/openbakery/XcodeTestTaskSpecification.groovy b/plugin/src/test/groovy/org/openbakery/XcodeTestTaskSpecification.groovy index 369c7cd3..26da4982 100644 --- a/plugin/src/test/groovy/org/openbakery/XcodeTestTaskSpecification.groovy +++ b/plugin/src/test/groovy/org/openbakery/XcodeTestTaskSpecification.groovy @@ -285,8 +285,12 @@ class XcodeTestTaskSpecification extends Specification { "CODE_SIGN_IDENTITY=", "CODE_SIGNING_REQUIRED=NO", "-destination", - "platform=OS X,arch=x86_64"] - expectedCommandList.addAll(expectedDefaultDirectories()) + "platform=OS X,arch=x86_64", + "DSTROOT=" + new File(project.buildDir, "dst").absolutePath, + "OBJROOT=" + new File(project.buildDir, "obj").absolutePath, + "SYMROOT=" + new File(project.buildDir, "sym").absolutePath, + "SHARED_PRECOMPS_DIR=" + new File(project.buildDir, "shared").absolutePath + ] expectedCommandList << "-enableCodeCoverage" << "yes" expectedCommandList << "test" }