Skip to content

Commit 50bfe56

Browse files
committed
[NO JIRA] Remove the Ktor project IT from ruling tests
1 parent 86f2713 commit 50bfe56

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+9
-11651
lines changed

.cirrus.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,6 @@ gradle_its_template: &GRADLE_ITS_TEMPLATE
9595
-Pqa --info --console plain --no-daemon --build-cache
9696
<<: *CLEANUP_GRADLE_CACHE_SCRIPT
9797

98-
kotlin_its_template: &KOTLIN_ITS_TEMPLATE
99-
<<: *SETUP_GRADLE_CACHE
100-
run_its_script:
101-
- |
102-
if [ -n "${GIT_SUB_MODULE}" ]; then
103-
git submodule update --init --depth 1 "${GIT_SUB_MODULE}"
104-
fi
105-
- source cirrus-env QA
106-
- bash ./build-ktor.sh
107-
- ./gradlew "${GRADLE_TASK}" "-P${ITS_PROJECT}"
108-
"-Dsonar.runtimeVersion=${SQ_VERSION}"
109-
"-Dorchestrator.configUrl=https://repox.jfrog.io/repox/orchestrator.properties/orch-h2.properties"
110-
"-Dorchestrator.artifactory.accessToken=${ARTIFACTORY_ACCESS_TOKEN}"
111-
"-DbuildNumber=$BUILD_NUMBER"
112-
-Pqa --info --console plain --no-daemon --build-cache
113-
<<: *CLEANUP_GRADLE_CACHE_SCRIPT
114-
11598
only_if_sonarsource_qa_template: &ONLY_IF_SONARSOURCE_QA
11699
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BRANCH =~ "dogfood-on-.*")
117100

@@ -213,7 +196,7 @@ qa_ruling_kotlin_task:
213196
ITS_PROJECT: "ruling"
214197
GIT_SUB_MODULE: "its/sources"
215198
<<: *LINUX_6_CPU_12G_JAVA_17
216-
<<: *KOTLIN_ITS_TEMPLATE
199+
<<: *GRADLE_ITS_TEMPLATE
217200

218201
build_win_task:
219202
<<: *QA_TASK_FILTER
@@ -231,6 +214,7 @@ build_win_task:
231214
promote_task:
232215
depends_on:
233216
- build
217+
- build_test_analyze
234218
- qa_plug_pub_lin
235219
- qa_plug_pub_win
236220
- qa_ruling_kotlin

build-ktor.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

its/ruling/src/test/java/org/sonarsource/slang/SlangRulingTest.java

Lines changed: 7 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,16 @@
3333
import java.io.IOException;
3434
import java.nio.file.Files;
3535
import java.nio.file.Path;
36-
import java.util.Arrays;
3736
import java.util.Collections;
3837
import java.util.HashMap;
3938
import java.util.HashSet;
4039
import java.util.List;
4140
import java.util.Map;
4241
import java.util.Set;
4342
import java.util.concurrent.TimeUnit;
44-
import java.util.stream.Collectors;
4543
import org.junit.jupiter.api.AfterAll;
4644
import org.junit.jupiter.api.BeforeAll;
4745
import org.junit.jupiter.api.Test;
48-
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
49-
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
5046
import org.slf4j.Logger;
5147
import org.slf4j.LoggerFactory;
5248
import org.sonarsource.analyzer.commons.ProfileGenerator;
@@ -106,62 +102,7 @@ private static void addLanguagePlugins(OrchestratorBuilder builder) {
106102
}
107103

108104
@Test
109-
public void test_kotlin_ktor() throws IOException {
110-
List<String> ktorDirs = Arrays.asList(
111-
"",
112-
"ktor-client/ktor-client-winhttp/",
113-
"ktor-client/ktor-client-tests/",
114-
"ktor-client/ktor-client-plugins/ktor-client-websockets/",
115-
"ktor-client/ktor-client-plugins/ktor-client-tracing/",
116-
"ktor-client/ktor-client-plugins/ktor-client-resources/",
117-
"ktor-client/ktor-client-plugins/ktor-client-logging/",
118-
"ktor-client/ktor-client-plugins/ktor-client-json/",
119-
"ktor-client/ktor-client-plugins/ktor-client-encoding/",
120-
"ktor-client/ktor-client-plugins/ktor-client-content-negotiation/",
121-
"ktor-client/ktor-client-plugins/ktor-client-auth/",
122-
"ktor-client/ktor-client-plugins/",
123-
"ktor-client/ktor-client-okhttp/",
124-
"ktor-client/ktor-client-mock/",
125-
"ktor-client/ktor-client-js/",
126-
"ktor-client/ktor-client-jetty-jakarta/",
127-
"ktor-client/ktor-client-jetty/",
128-
"ktor-client/ktor-client-java/",
129-
"ktor-client/ktor-client-ios/",
130-
"ktor-client/ktor-client-darwin-legacy/",
131-
"ktor-client/ktor-client-darwin/",
132-
"ktor-client/ktor-client-curl/",
133-
"ktor-client/ktor-client-core/",
134-
"ktor-client/ktor-client-cio/",
135-
"ktor-client/ktor-client-apache5/",
136-
"ktor-client/ktor-client-apache/",
137-
"ktor-client/ktor-client-android/",
138-
"ktor-client/",
139-
"ktor-http/",
140-
"ktor-io/",
141-
"ktor-java-modules-test/",
142-
"ktor-network/",
143-
"ktor-server/",
144-
"ktor-shared/",
145-
"ktor-test-dispatcher/",
146-
"ktor-utils/");
147-
148-
String binaries = ktorDirs.stream().map(dir -> FileLocation.of("../sources/kotlin/ktor/" + dir + "build/classes"))
149-
.map(SlangRulingTest::getFileLocationAbsolutePath)
150-
.collect(Collectors.joining(","));
151-
152-
String libraries = ktorDirs.stream().map(dir -> FileLocation.of("../sources/kotlin/ktor/" + dir + "build/libs"))
153-
.map(SlangRulingTest::getFileLocationAbsolutePath)
154-
.collect(Collectors.joining(","));
155-
156-
executeSonarScannerAndAssertDifferences("kotlin/ktor", Map.of(
157-
"sonar.inclusions", "sources/kotlin/ktor/**/*.kt",
158-
"sonar.exclusions", "**/testData/**/*,**/Win*.kt,**/PrimitiveArraysTest.kt,**/ContentTestSuite.kt",
159-
"sonar.java.binaries", binaries,
160-
"sonar.java.libraries", libraries));
161-
}
162-
163-
@Test
164-
public void test_kotlin_compiler() throws IOException {
105+
void test_kotlin_compiler() throws IOException {
165106
List<String> exclusions = List.of(
166107
"**/testData/**/*",
167108
"sources/kotlin/kotlin/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt",
@@ -174,46 +115,46 @@ public void test_kotlin_compiler() throws IOException {
174115
}
175116

176117
@Test
177-
public void test_resources_sources() throws IOException {
118+
void test_resources_sources() throws IOException {
178119
executeSonarScannerAndAssertDifferences("kotlin/test-resources-sources", Map.of(
179120
"sonar.inclusions", "ruling/src/test/resources/sources/kotlin/**/*.kt",
180121
"sonar.java.libraries", System.getProperty("gradle.main.compile.classpath").replace(File.pathSeparatorChar, ',')
181122
));
182123
}
183124

184125
@Test
185-
public void test_kotlin_android() throws IOException {
126+
void test_kotlin_android() throws IOException {
186127
executeSonarScannerAndAssertDifferences("kotlin/android-architecture-components", Map.of(
187128
"sonar.inclusions", "sources/kotlin/android-architecture-components/**/*.kt",
188129
"sonar.exclusions", "**/testData/**/*"
189130
));
190131
}
191132

192133
@Test
193-
public void test_kotlin_corda() throws IOException {
134+
void test_kotlin_corda() throws IOException {
194135
executeSonarScannerAndAssertDifferences("kotlin/corda", Map.of(
195136
"sonar.inclusions", "sources/kotlin/corda/**/*.kt",
196137
"sonar.exclusions", "**/testData/**/*"
197138
));
198139
}
199140

200141
@Test
201-
public void test_kotlin_intellij_rust() throws IOException {
142+
void test_kotlin_intellij_rust() throws IOException {
202143
executeSonarScannerAndAssertDifferences("kotlin/intellij-rust", Map.of(
203144
"sonar.inclusions", "sources/kotlin/intellij-rust/**/*.kt",
204145
"sonar.exclusions", "**/testData/**/*"
205146
));
206147
}
207148

208149
@Test
209-
public void test_kotlin_okio() throws IOException {
150+
void test_kotlin_okio() throws IOException {
210151
executeSonarScannerAndAssertDifferences("kotlin/okio", Map.of(
211152
"sonar.inclusions", "sources/kotlin/okio/**/*.kt",
212153
"sonar.exclusions", "**/testData/**/*"));
213154
}
214155

215156
@Test
216-
public void test_kotlin_language_server() throws IOException {
157+
void test_kotlin_language_server() throws IOException {
217158
executeGradleBuildAndAssertDifferences("kotlin/kotlin-language-server", Map.of());
218159
}
219160

0 commit comments

Comments
 (0)