-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new test-runner project that will run tests.
- Loading branch information
1 parent
3dd5e9a
commit c961f6a
Showing
9 changed files
with
406 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import org.gradle.tooling.GradleConnector | ||
|
||
plugins { | ||
kotlin("jvm") version "1.9.20" | ||
} | ||
|
||
dependencies { | ||
testImplementation(kotlin("test")) | ||
testImplementation(gradleTestKit()) | ||
} | ||
|
||
val smokeTestRepository = layout.buildDirectory.dir("smokeTestRepo") | ||
|
||
val publishSkieToTempMaven by tasks.registering { | ||
doLast { | ||
GradleConnector.newConnector() | ||
.forProjectDirectory(rootDir.resolve("../SKIE")) | ||
.connect() | ||
.use { projectConnection -> | ||
projectConnection.newBuild() | ||
.forTasks("publishAllPublicationsToSmokeTestTmpRepositoryRepository") | ||
.setStandardInput(System.`in`) | ||
.setStandardOutput(System.out) | ||
.setStandardError(System.err) | ||
.addArguments("-PsmokeTestTmpRepositoryPath=${smokeTestRepository.get().asFile.absolutePath}") | ||
.run() | ||
} | ||
} | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
|
||
dependsOn(publishSkieToTempMaven) | ||
|
||
systemProperty("smokeTestRepository", smokeTestRepository.get().asFile.absolutePath) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common-gradle/gradle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common-gradle/gradle.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common-gradle/gradlew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common-gradle/gradlew.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
rootProject.name = "test-runner" | ||
|
||
dependencyResolutionManagement { | ||
repositories { | ||
mavenCentral() | ||
google() | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
test-runner/src/test/kotlin/co/touchlab/skie/test/GradleTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package co.touchlab.skie.test | ||
|
||
import kotlin.test.assertEquals | ||
|
||
class GradleTests { | ||
|
||
@Smoke | ||
@SkieTest | ||
@OnlyFor(configurations = [BuildConfiguration.Debug]) | ||
@OnlyIos | ||
fun `basic project`(target: BinaryTarget, config: BuildConfiguration, linkage: LinkMode) { | ||
println("Hello $target, $config!") | ||
assertEquals(BinaryTarget.IOS_X64, target) | ||
assertEquals(BuildConfiguration.Debug, config) | ||
// Run tests with param target | ||
} | ||
|
||
} |
Oops, something went wrong.