aboutsummaryrefslogtreecommitdiffstats
path: root/buildSrc/src/main/groovy/org.sonar.build
diff options
context:
space:
mode:
Diffstat (limited to 'buildSrc/src/main/groovy/org.sonar.build')
-rw-r--r--buildSrc/src/main/groovy/org.sonar.build/BlackBoxTest.groovy25
1 files changed, 25 insertions, 0 deletions
diff --git a/buildSrc/src/main/groovy/org.sonar.build/BlackBoxTest.groovy b/buildSrc/src/main/groovy/org.sonar.build/BlackBoxTest.groovy
new file mode 100644
index 00000000000..e80468a1dc5
--- /dev/null
+++ b/buildSrc/src/main/groovy/org.sonar.build/BlackBoxTest.groovy
@@ -0,0 +1,25 @@
+package org.sonar.build
+
+import org.gradle.api.tasks.testing.Test
+
+class BlackBoxTest extends Test {
+ BlackBoxTest() {
+ def branch = System.getenv('GITHUB_BRANCH')
+ if (branch != null && Set.of("branch-nightly-build", "master").contains(branch)) {
+ jvmArgs("-javaagent:" + System.getenv('ASPECTJ_WEAVER_PATH'))
+ }
+
+ systemProperty 'java.awt.headless', 'true'
+ systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
+
+ if (!project.version.endsWith("-SNAPSHOT")) {
+ systemProperty 'sonar.runtimeVersion', project.version
+ }
+
+ testLogging {
+ events "skipped", "failed"
+ showStandardStreams = true
+ exceptionFormat 'full'
+ }
+ }
+}