@@ -9,7 +9,6 @@ import groovy.json.StringEscapeUtils
9
9
import org.gradle.api.logging.LogLevel.INFO
10
10
import org.gradle.internal.os.OperatingSystem
11
11
import org.jetbrains.kotlin.commonizer.CommonizerTarget
12
- import org.jetbrains.kotlin.gradle.testbase.TestVersions
13
12
import org.jetbrains.kotlin.gradle.util.reportSourceSetCommonizerDependencies
14
13
import org.jetbrains.kotlin.incremental.testingUtils.assertEqualDirectories
15
14
import org.jetbrains.kotlin.konan.target.HostManager
@@ -171,33 +170,13 @@ open class CommonizerIT : BaseGradleIT() {
171
170
assertSuccessful()
172
171
}
173
172
174
- if (CommonizableTargets .targetA.isCompilable) {
175
- // targetA will be macos
176
- build(" :targetABinaries" ) {
177
- assertSuccessful()
178
- }
179
- }
180
- if (CommonizableTargets .targetB.isCompilable) {
181
- // targetB will be linuxArm64
182
- build(" :targetBBinaries" ) {
183
- assertSuccessful()
184
- }
185
- }
186
- }
187
- }
188
-
189
- @Test
190
- fun `test commonizeCurlInterop execution` () {
191
- with (preparedProject(" commonizeCurlInterop" )) {
192
- if (CommonizableTargets .targetA.isExecutable) {
193
- build(" :targetATest" ) {
194
- assertSuccessful()
195
- }
173
+ // targetA will be macos
174
+ build(" :compileTestKotlinTargetA" ) {
175
+ assertSuccessful()
196
176
}
197
- if (CommonizableTargets .targetB.isExecutable) {
198
- build(" :targetBTest" ) {
199
- assertSuccessful()
200
- }
177
+ // targetB will be linuxArm64
178
+ build(" :compileTestKotlinTargetB" ) {
179
+ assertSuccessful()
201
180
}
202
181
}
203
182
}
@@ -721,24 +700,24 @@ open class CommonizerIT : BaseGradleIT() {
721
700
}
722
701
}
723
702
724
- private data class TargetSubstitution (val value : String , val isCompilable : Boolean , val isExecutable : Boolean ) {
703
+ private data class TargetSubstitution (val value : String ) {
725
704
override fun toString (): String = value
726
705
}
727
706
728
707
private object CommonizableTargets {
729
708
private val os = OperatingSystem .current()
730
709
731
710
val targetA = when {
732
- os.isMacOsX -> TargetSubstitution (" macosX64" , isCompilable = true , isExecutable = true )
733
- os.isLinux -> TargetSubstitution (" linuxX64" , isCompilable = true , isExecutable = true )
734
- os.isWindows -> TargetSubstitution (" mingwX64" , isCompilable = true , isExecutable = false )
711
+ os.isMacOsX -> TargetSubstitution (" macosX64" )
712
+ os.isLinux -> TargetSubstitution (" linuxX64" )
713
+ os.isWindows -> TargetSubstitution (" mingwX64" )
735
714
else -> fail(" Unsupported os: ${os.name} " )
736
715
}
737
716
738
717
val targetB = when {
739
- os.isMacOsX -> TargetSubstitution (" linuxX64" , isCompilable = true , isExecutable = false )
740
- os.isLinux -> TargetSubstitution (" linuxArm64" , isCompilable = true , isExecutable = false )
741
- os.isWindows -> TargetSubstitution (" mingwX86 " , isCompilable = true , isExecutable = false )
718
+ os.isMacOsX -> TargetSubstitution (" linuxX64" )
719
+ os.isLinux -> TargetSubstitution (" linuxArm64" )
720
+ os.isWindows -> TargetSubstitution (" linuxX64 " )
742
721
else -> fail(" Unsupported os: ${os.name} " )
743
722
}
744
723
}
0 commit comments