Skip to content

Commit aae05cf

Browse files
committed
build
1 parent adbfc9b commit aae05cf

File tree

4 files changed

+70
-22
lines changed

4 files changed

+70
-22
lines changed

ui-tests-starter/build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
5+
import software.aws.toolkits.gradle.findFolders
56
import software.aws.toolkits.gradle.intellij.IdeVersions
67

78
plugins {
@@ -11,6 +12,16 @@ plugins {
1112
id("org.jetbrains.intellij.platform")
1213
}
1314

15+
val ideProfile = IdeVersions.ideProfile(project)
16+
17+
// Add our source sets per IDE profile version (i.e. src-211)
18+
sourceSets {
19+
test {
20+
java.srcDirs(findFolders(project, "tst", ideProfile))
21+
resources.srcDirs(findFolders(project, "tst-resources", ideProfile))
22+
}
23+
}
24+
1425
intellijPlatform {
1526
buildSearchableOptions = false
1627
instrumentCode = false
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.uitests
5+
6+
import com.intellij.ide.starter.ci.CIServer
7+
import java.nio.file.Path
8+
9+
object TestCIServer : CIServer {
10+
override val isBuildRunningOnCI: Boolean = System.getenv("CI").toBoolean() == true
11+
override val buildNumber: String = ""
12+
override val branchName: String = ""
13+
override val buildParams: Map<String, String> = mapOf()
14+
15+
override fun publishArtifact(source: Path, artifactPath: String, artifactName: String) {
16+
}
17+
18+
override fun reportTestFailure(testName: String, message: String, details: String) {
19+
println("test: $testName")
20+
println("message: $message")
21+
println("details: $details")
22+
error(message)
23+
}
24+
25+
override fun ignoreTestFailure(testName: String, message: String, details: String) {
26+
}
27+
28+
override fun isTestFailureShouldBeIgnored(message: String) = false
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.uitests
5+
6+
import com.intellij.ide.starter.ci.CIServer
7+
import java.nio.file.Path
8+
9+
object TestCIServer : CIServer {
10+
override val isBuildRunningOnCI: Boolean = System.getenv("CI").toBoolean() == true
11+
override val buildNumber: String = ""
12+
override val branchName: String = ""
13+
override val buildParams: Map<String, String> = mapOf()
14+
15+
override fun publishArtifact(source: Path, artifactPath: String, artifactName: String) {
16+
}
17+
18+
override fun reportTestFailure(testName: String, message: String, details: String, linkToLogs: String?) {
19+
println("test: $testName")
20+
println("message: $message")
21+
println("details: $details")
22+
error(message)
23+
}
24+
25+
override fun ignoreTestFailure(testName: String, message: String) {
26+
}
27+
28+
override fun isTestFailureShouldBeIgnored(message: String) = false
29+
}

ui-tests-starter/tst/OfflineAmazonQInlineCompletionTest.kt renamed to ui-tests-starter/tst/software/aws/toolkits/jetbrains/uitests/OfflineAmazonQInlineCompletionTest.kt

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3+
package software.aws.toolkits.jetbrains.uitests
34

45
import com.intellij.driver.sdk.openFile
56
import com.intellij.driver.sdk.ui.ui
@@ -22,28 +23,6 @@ import java.nio.file.Paths
2223
import kotlin.io.path.createParentDirectories
2324
import kotlin.io.path.writeText
2425

25-
object TestCIServer : CIServer {
26-
override val isBuildRunningOnCI: Boolean = System.getenv("CI").toBoolean() == true
27-
override val buildNumber: String = ""
28-
override val branchName: String = ""
29-
override val buildParams: Map<String, String> = mapOf()
30-
31-
override fun publishArtifact(source: Path, artifactPath: String, artifactName: String) {
32-
}
33-
34-
override fun reportTestFailure(testName: String, message: String, details: String) {
35-
println("test: $testName")
36-
println("message: $message")
37-
println("details: $details")
38-
error(message)
39-
}
40-
41-
override fun ignoreTestFailure(testName: String, message: String, details: String) {
42-
}
43-
44-
override fun isTestFailureShouldBeIgnored(message: String) = false
45-
}
46-
4726
class OfflineAmazonQInlineCompletionTest {
4827
init {
4928
di = DI {

0 commit comments

Comments
 (0)