Skip to content

Commit 977aab3

Browse files
committed
[NO JIRA] Extract Kotlin compiler ruling test to a separate task
1 parent 50bfe56 commit 977aab3

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.cirrus.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,28 @@ qa_ruling_kotlin_task:
198198
<<: *LINUX_6_CPU_12G_JAVA_17
199199
<<: *GRADLE_ITS_TEMPLATE
200200

201+
qa_ruling_kotlin_compiler_task:
202+
<<: *QA_TASK_FILTER
203+
env:
204+
KOTLIN_COMPILER_IT_ENABLED: "true"
205+
SQ_VERSION: "LATEST_RELEASE"
206+
GIT_SUB_MODULE: "its/sources"
207+
<<: *LINUX_6_CPU_12G_JAVA_17
208+
<<: *SETUP_GRADLE_CACHE
209+
run_its_script:
210+
- |
211+
if [ -n "${GIT_SUB_MODULE}" ]; then
212+
git submodule update --init --depth 1 "${GIT_SUB_MODULE}"
213+
fi
214+
- source cirrus-env QA
215+
- ./gradlew :its:ruling:test --tests "org.sonarsource.slang.SlangRulingTest.test_kotlin_compiler" -Pruling
216+
"-Dsonar.runtimeVersion=${SQ_VERSION}"
217+
"-Dorchestrator.configUrl=https://repox.jfrog.io/repox/orchestrator.properties/orch-h2.properties"
218+
"-Dorchestrator.artifactory.accessToken=${ARTIFACTORY_ACCESS_TOKEN}"
219+
"-DbuildNumber=$BUILD_NUMBER"
220+
-Pqa --info --console plain --no-daemon --build-cache
221+
<<: *CLEANUP_GRADLE_CACHE_SCRIPT
222+
201223
build_win_task:
202224
<<: *QA_TASK_FILTER
203225
<<: *WINDOWS_4_CPU_15G
@@ -218,6 +240,7 @@ promote_task:
218240
- qa_plug_pub_lin
219241
- qa_plug_pub_win
220242
- qa_ruling_kotlin
243+
- qa_ruling_kotlin_compiler
221244
- build_win
222245
- ws_scan
223246
<<: *ONLY_IF_SONARSOURCE_QA

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.junit.jupiter.api.AfterAll;
4444
import org.junit.jupiter.api.BeforeAll;
4545
import org.junit.jupiter.api.Test;
46+
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
4647
import org.slf4j.Logger;
4748
import org.slf4j.LoggerFactory;
4849
import org.sonarsource.analyzer.commons.ProfileGenerator;
@@ -102,6 +103,7 @@ private static void addLanguagePlugins(OrchestratorBuilder builder) {
102103
}
103104

104105
@Test
106+
@EnabledIfEnvironmentVariable(named = "KOTLIN_COMPILER_IT_ENABLED", matches = "true")
105107
void test_kotlin_compiler() throws IOException {
106108
List<String> exclusions = List.of(
107109
"**/testData/**/*",

0 commit comments

Comments
 (0)