aboutsummaryrefslogtreecommitdiffstats
path: root/buildSrc/src/main/groovy/org.sonar.build/BlackBoxTest.groovy
blob: 46bc9ff0d03fa2f30b37f6fde419092b8a27bd5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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')
    systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver')

    if (!project.version.endsWith("-SNAPSHOT")) {
      systemProperty 'sonar.runtimeVersion', project.version
    }

    testLogging {
      events "skipped", "failed"
      showStandardStreams = true
      exceptionFormat 'full'
    }
  }
}