diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 3eba2b1e7e8a..cc2a99d3a2b2 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -4,6 +4,7 @@ package dotc import org.junit.{ Test, BeforeClass, AfterClass } import org.junit.Assert._ +import org.junit.Assume._ import java.nio.file._ import java.util.stream.{ Stream => JStream } @@ -295,6 +296,7 @@ class CompilationTests extends ParallelTesting { } @Test def testOptimised: Unit = { + assumeTrue("Only executes on Drone", dotty.Properties.isRunByDrone) val outputDir = defaultOutputDir + "optimised/" compileFilesInDir("../tests/pos", defaultOptimised, outputDir).checkCompile() compileFilesInDir("../tests/run", defaultOptimised, outputDir).checkRuns() diff --git a/compiler/test/dotty/tools/dotc/IdempotencyTests.scala b/compiler/test/dotty/tools/dotc/IdempotencyTests.scala index de3ac3407ad6..96a7b1356dc8 100644 --- a/compiler/test/dotty/tools/dotc/IdempotencyTests.scala +++ b/compiler/test/dotty/tools/dotc/IdempotencyTests.scala @@ -2,14 +2,14 @@ package dotty package tools package dotc -import java.io.{ File => JFile } -import java.nio.file.{ Files, Paths, Path } +import java.io.{File => JFile} +import java.nio.file.{Files, Path, Paths} -import org.junit.{ Test, AfterClass } +import org.junit.Assume.assumeTrue +import org.junit.{AfterClass, Test} import scala.concurrent.duration._ - -import vulpix.{ ParallelTesting, SummaryReport, SummaryReporting, TestConfiguration } +import vulpix.{ParallelTesting, SummaryReport, SummaryReporting, TestConfiguration} class IdempotencyTests extends ParallelTesting { @@ -26,6 +26,8 @@ class IdempotencyTests extends ParallelTesting { /* TODO: Only run them selectively? */ @Test def idempotency: Unit = { + assumeTrue("Only executes on Drone", dotty.Properties.isRunByDrone) + val opt = defaultOptions.and("-YemitTasty") def sourcesFrom(dir: Path) = CompilationTests.sources(Files.walk(dir))