From 5d9aa42d1a2566fd650e78a81e9aee5b48c74196 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Fri, 9 Oct 2020 11:06:54 +0200 Subject: [PATCH 1/9] Enable Scala.js test --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 43feeebfd74f..04014b9aea9e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -119,9 +119,9 @@ jobs: run: sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test" shell: cmd - # - name: Scala.js Test - # run: sbt ";sjsJUnitTests/test" - # shell: cmd + - name: Scala.js Test + run: sbt ";sjsJUnitTests/test" + shell: cmd community_build: runs-on: [self-hosted, Linux] From 37000c1db8e3d932a65b09cdad9072e1390551d9 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Fri, 9 Oct 2020 11:34:45 +0200 Subject: [PATCH 2/9] Don't create processes unnecessarily The process pool is only needed for run tests. --- compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala index 4fd415a1dcd2..725acc87d3ee 100644 --- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala @@ -49,7 +49,7 @@ trait RunnerOrchestration { def runMain(classPath: String)(implicit summaryReport: SummaryReporting): Status = monitor.runMain(classPath) - private val monitor = new RunnerMonitor + lazy private val monitor = new RunnerMonitor /** The runner monitor object keeps track of child JVM processes by keeping * them in two structures - one for free, and one for busy children. From 7ca6a4742f25910da6ddd9169a6f8ea581aed1a3 Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Fri, 9 Oct 2020 11:39:25 +0200 Subject: [PATCH 3/9] Update .github/workflows/ci.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Doeraene --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 04014b9aea9e..56b0b7457f83 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -120,7 +120,7 @@ jobs: shell: cmd - name: Scala.js Test - run: sbt ";sjsJUnitTests/test" + run: sbt ";sjsJUnitTests/test ;sjsCompilerTests/test" shell: cmd community_build: From 2b9c41ac8ee475080f92fb0500ba9154dec5bf09 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Fri, 9 Oct 2020 12:50:37 +0200 Subject: [PATCH 4/9] Create processes lazily MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As mentioned in [1]: > JUnit creates a new instance of the test class before invoking each > @Test method. This helps provide independence between test methods and > avoids unintentional side effects in the test code. Because each test > method runs on a new test class instance, we can’t reuse instance > variable values across test methods. Each `@Test` method would create a new instance of the test classes, which means each `@Test` method would create N new processes. [1]: https://stackoverflow.com/questions/14010222/junit-new-instance-before-invoking-each-test-method-what-are-the-benefits --- .../dotty/tools/vulpix/RunnerOrchestration.scala | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala index 725acc87d3ee..adeb39c9f583 100644 --- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala @@ -49,7 +49,7 @@ trait RunnerOrchestration { def runMain(classPath: String)(implicit summaryReport: SummaryReporting): Status = monitor.runMain(classPath) - lazy private val monitor = new RunnerMonitor + private val monitor = new RunnerMonitor /** The runner monitor object keeps track of child JVM processes by keeping * them in two structures - one for free, and one for busy children. @@ -167,14 +167,15 @@ trait RunnerOrchestration { .start() } - private val allRunners = List.fill(numberOfSlaves)(new Runner(createProcess)) - private val freeRunners = mutable.Queue(allRunners: _*) + private val freeRunners = mutable.Queue.empty[Runner] private val busyRunners = mutable.Set.empty[Runner] private def getRunner(): Runner = synchronized { - while (freeRunners.isEmpty) wait() + while (freeRunners.isEmpty && busyRunners.size >= numberOfSlaves) wait() - val runner = freeRunners.dequeue() + val runner = + if (freeRunners.isEmpty) new Runner(createProcess) + else freeRunners.dequeue() busyRunners += runner notify() @@ -194,7 +195,9 @@ trait RunnerOrchestration { result } - private def killAll(): Unit = allRunners.foreach(_.kill()) + private def killAll(): Unit = + freeRunners.foreach(_.kill()) + busyRunners.foreach(_.kill()) // On shutdown, we need to kill all runners: sys.addShutdownHook(killAll()) From 89ff3494d091a870350fcfb1a122178fb441843e Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Fri, 9 Oct 2020 13:16:31 +0200 Subject: [PATCH 5/9] Enable more tests --- compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala b/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala index a813138fedba..c76cc41a644f 100644 --- a/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala +++ b/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala @@ -26,7 +26,7 @@ class VulpixUnitTests extends ParallelTesting { // To fail with something else than an AssertionError def fail(): Unit = throw new Exception("didn't fail properly") - @Test def missingFile: Unit = if (!scala.util.Properties.isWin) + @Test def missingFile: Unit = try { compileFile("tests/vulpix-tests/unit/i-dont-exist.scala", defaultOptions).expectFailure.checkExpectedErrors() fail() @@ -64,7 +64,7 @@ class VulpixUnitTests extends ParallelTesting { @Test def runDiffOutput1: Unit = compileFile("tests/vulpix-tests/unit/runDiffOutput1.scala", defaultOptions).expectFailure.checkRuns() - @Test def runStackOverflow: Unit = if (!scala.util.Properties.isWin) + @Test def runStackOverflow: Unit = compileFile("tests/vulpix-tests/unit/stackOverflow.scala", defaultOptions).expectFailure.checkRuns() @Test def runOutRedirects: Unit = @@ -82,7 +82,7 @@ class VulpixUnitTests extends ParallelTesting { @Test def deadlock: Unit = compileFile("tests/vulpix-tests/unit/deadlock.scala", defaultOptions).expectFailure.checkRuns() - @Test def badJava: Unit = if (!scala.util.Properties.isWin) + @Test def badJava: Unit = try { compileFile("tests/vulpix-tests/unit/BadJava.java", defaultOptions).suppressAllOutput.checkCompile() fail() @@ -90,7 +90,7 @@ class VulpixUnitTests extends ParallelTesting { case ae: AssertionError => assertTrue(ae.getMessage.contains("java compilation failed")) } - @Test def runTimeout: Unit = if (!scala.util.Properties.isWin) { + @Test def runTimeout: Unit = { val fileName = s"tests/vulpix-tests/unit/timeout.scala" try { compileFile(fileName, defaultOptions).checkRuns() From c96a0dddf07ebdfaf3ef8762c4207a1cfa3d0529 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Fri, 9 Oct 2020 13:18:37 +0200 Subject: [PATCH 6/9] Try run all bootstrapped tests --- .../tools/dotc/BootstrappedOnlyCompilationTests.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 8682218f9fe2..7577ca411a7a 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -30,7 +30,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { // Positive tests ------------------------------------------------------------ - @Test def posMacros: Unit = if (!scala.util.Properties.isWin) { + @Test def posMacros: Unit = { implicit val testGroup: TestGroup = TestGroup("compilePosMacros") aggregateTests( compileFilesInDir("tests/bench", defaultOptions), @@ -129,7 +129,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { ) }.checkRuns() - @Test def runWithCompiler: Unit = if (!scala.util.Properties.isWin) { + @Test def runWithCompiler: Unit = { implicit val testGroup: TestGroup = TestGroup("runWithCompiler") aggregateTests( compileFilesInDir("tests/run-with-compiler", withCompilerOptions), @@ -139,7 +139,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { ).checkRuns() } - @Test def runBootstrappedOnly: Unit = if (!scala.util.Properties.isWin) { + @Test def runBootstrappedOnly: Unit = { implicit val testGroup: TestGroup = TestGroup("runBootstrappedOnly") aggregateTests( compileFilesInDir("tests/run-bootstrapped", withCompilerOptions), @@ -151,7 +151,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { // Pickling tests are very memory intensive and as such need to be run with a // lower level of concurrency as to not kill their running VMs - @Test def picklingWithCompiler: Unit = if (!scala.util.Properties.isWin) { + @Test def picklingWithCompiler: Unit = { val jvmBackendFilter = FileFilter.exclude(List("BTypes.scala", "Primitives.scala")) // TODO implicit val testGroup: TestGroup = TestGroup("testPicklingWithCompiler") aggregateTests( From f9747071ecf432242a7ba5c4c8824737071261dd Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Fri, 9 Oct 2020 14:14:11 +0200 Subject: [PATCH 7/9] Share process pool for a test suite and clean up properly --- .../dotty/tools/dotc/CompilationTests.scala | 27 ++++++++++--------- .../dotty/tools/dotc/FromTastyTests.scala | 27 ++++++++++--------- .../dotty/tools/dotc/IdempotencyTests.scala | 27 ++++++++++--------- .../tools/vulpix/RunnerOrchestration.scala | 6 ++++- .../dotty/tools/vulpix/VulpixMetaTests.scala | 25 ++++++++++------- .../dotty/tools/vulpix/VulpixUnitTests.scala | 25 ++++++++++------- 6 files changed, 82 insertions(+), 55 deletions(-) diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 036b97dd3581..de9e910cc31a 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -16,21 +16,12 @@ import scala.concurrent.duration._ import TestSources.sources import vulpix._ -class CompilationTests extends ParallelTesting { +class CompilationTests { import ParallelTesting._ import TestConfiguration._ import CompilationTests._ import CompilationTest.aggregateTests - // Test suite configuration -------------------------------------------------- - - def maxDuration = 45.seconds - def numberOfSlaves = 5 - def safeMode = Properties.testsSafeMode - def isInteractive = SummaryReport.isInteractive - def testFilter = Properties.testsFilter - def updateCheckFiles: Boolean = Properties.testsUpdateCheckfile - // Positive tests ------------------------------------------------------------ @Test def pos: Unit = { @@ -333,7 +324,19 @@ class CompilationTests extends ParallelTesting { } -object CompilationTests { +object CompilationTests extends ParallelTesting { + // Test suite configuration -------------------------------------------------- + + def maxDuration = 45.seconds + def numberOfSlaves = 5 + def safeMode = Properties.testsSafeMode + def isInteractive = SummaryReport.isInteractive + def testFilter = Properties.testsFilter + def updateCheckFiles: Boolean = Properties.testsUpdateCheckfile + implicit val summaryReport: SummaryReporting = new SummaryReport - @AfterClass def cleanup(): Unit = summaryReport.echoSummary() + @AfterClass def tearDown(): Unit = { + super.cleanup() + summaryReport.echoSummary() + } } diff --git a/compiler/test/dotty/tools/dotc/FromTastyTests.scala b/compiler/test/dotty/tools/dotc/FromTastyTests.scala index 151d0826a176..3ceef6656d30 100644 --- a/compiler/test/dotty/tools/dotc/FromTastyTests.scala +++ b/compiler/test/dotty/tools/dotc/FromTastyTests.scala @@ -9,19 +9,10 @@ import java.io.{File => JFile} import scala.concurrent.duration._ -class FromTastyTests extends ParallelTesting { +class FromTastyTests { import TestConfiguration._ import FromTastyTests._ - // Test suite configuration -------------------------------------------------- - - def maxDuration = 30.seconds - def numberOfSlaves = 5 - def safeMode = Properties.testsSafeMode - def isInteractive = SummaryReport.isInteractive - def testFilter = Properties.testsFilter - def updateCheckFiles: Boolean = Properties.testsUpdateCheckfile - @Test def posTestFromTasty: Unit = { // Can be reproduced with // > sbt @@ -46,7 +37,19 @@ class FromTastyTests extends ParallelTesting { } } -object FromTastyTests { +object FromTastyTests extends ParallelTesting { + // Test suite configuration -------------------------------------------------- + + def maxDuration = 30.seconds + def numberOfSlaves = 5 + def safeMode = Properties.testsSafeMode + def isInteractive = SummaryReport.isInteractive + def testFilter = Properties.testsFilter + def updateCheckFiles: Boolean = Properties.testsUpdateCheckfile + implicit val summaryReport: SummaryReporting = new SummaryReport - @AfterClass def cleanup(): Unit = summaryReport.echoSummary() + @AfterClass def tearDown(): Unit = { + super.cleanup() + summaryReport.echoSummary() + } } diff --git a/compiler/test/dotty/tools/dotc/IdempotencyTests.scala b/compiler/test/dotty/tools/dotc/IdempotencyTests.scala index 1d8b353152ef..30dbb47475ff 100644 --- a/compiler/test/dotty/tools/dotc/IdempotencyTests.scala +++ b/compiler/test/dotty/tools/dotc/IdempotencyTests.scala @@ -13,20 +13,11 @@ import scala.concurrent.duration._ import vulpix._ -class IdempotencyTests extends ParallelTesting { +class IdempotencyTests { import TestConfiguration._ import IdempotencyTests._ import CompilationTest.aggregateTests - // Test suite configuration -------------------------------------------------- - - def maxDuration = 30.seconds - def numberOfSlaves = 5 - def safeMode = Properties.testsSafeMode - def isInteractive = SummaryReport.isInteractive - def testFilter = Properties.testsFilter - def updateCheckFiles: Boolean = Properties.testsUpdateCheckfile - @Category(Array(classOf[SlowTests])) @Test def idempotency: Unit = { implicit val testGroup: TestGroup = TestGroup("idempotency") @@ -71,7 +62,19 @@ class IdempotencyTests extends ParallelTesting { } -object IdempotencyTests { +object IdempotencyTests extends ParallelTesting { + // Test suite configuration -------------------------------------------------- + + def maxDuration = 30.seconds + def numberOfSlaves = 5 + def safeMode = Properties.testsSafeMode + def isInteractive = SummaryReport.isInteractive + def testFilter = Properties.testsFilter + def updateCheckFiles: Boolean = Properties.testsUpdateCheckfile + implicit val summaryReport: SummaryReporting = new SummaryReport - @AfterClass def cleanup(): Unit = summaryReport.echoSummary() + @AfterClass def tearDown(): Unit = { + super.cleanup() + summaryReport.echoSummary() + } } diff --git a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala index adeb39c9f583..c6be1856564a 100644 --- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala @@ -49,6 +49,9 @@ trait RunnerOrchestration { def runMain(classPath: String)(implicit summaryReport: SummaryReporting): Status = monitor.runMain(classPath) + /** Kill all processes */ + def cleanup() = monitor.killAll() + private val monitor = new RunnerMonitor /** The runner monitor object keeps track of child JVM processes by keeping @@ -195,9 +198,10 @@ trait RunnerOrchestration { result } - private def killAll(): Unit = + def killAll(): Unit = { freeRunners.foreach(_.kill()) busyRunners.foreach(_.kill()) + } // On shutdown, we need to kill all runners: sys.addShutdownHook(killAll()) diff --git a/compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala b/compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala index e79b983c2b83..befb4701f371 100644 --- a/compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala +++ b/compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala @@ -1,7 +1,7 @@ package dotty.tools package vulpix -import org.junit.Test +import org.junit.{ Test, AfterClass } import org.junit.experimental.categories.Category import scala.concurrent.duration._ import TestConfiguration._ @@ -11,14 +11,8 @@ import TestConfiguration._ * output against an expected result. */ @Category(Array(classOf[dotty.VulpixMetaTests])) -class VulpixMetaTests extends ParallelTesting { - def maxDuration = 1.seconds - // Ensure maximum reproducibility. - def numberOfSlaves = 1 - def safeMode = false // Don't fork a new VM after each run test - def isInteractive = false // Don't beautify output for interactive use. - def testFilter = None // Run all the tests. - def updateCheckFiles: Boolean = false +class VulpixMetaTests { + import VulpixMetaTests._ implicit val summaryReport: SummaryReporting = new SummaryReport implicit def testGroup: TestGroup = TestGroup("VulpixMetaTests") @@ -27,3 +21,16 @@ class VulpixMetaTests extends ParallelTesting { @Test def compileNeg: Unit = compileFilesInDir("tests/vulpix-tests/meta/neg", defaultOptions).checkExpectedErrors() @Test def runAll: Unit = compileFilesInDir("tests/vulpix-tests/meta/run", defaultOptions).checkRuns() } + +object VulpixMetaTests extends ParallelTesting { + def maxDuration = 1.seconds + // Ensure maximum reproducibility. + def numberOfSlaves = 1 + def safeMode = false // Don't fork a new VM after each run test + def isInteractive = false // Don't beautify output for interactive use. + def testFilter = None // Run all the tests. + def updateCheckFiles: Boolean = false + + @AfterClass + def tearDown() = this.cleanup() +} \ No newline at end of file diff --git a/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala b/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala index c76cc41a644f..cdbd55af61d4 100644 --- a/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala +++ b/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala @@ -3,26 +3,20 @@ package vulpix import java.io.{File => JFile} import org.junit.Assert._ -import org.junit.Test +import org.junit.{ Test, AfterClass } import scala.concurrent.duration._ import scala.util.control.NonFatal /** Unit tests for the Vulpix test suite */ -class VulpixUnitTests extends ParallelTesting { +class VulpixUnitTests { + import VulpixUnitTests._ import TestConfiguration._ implicit val _: SummaryReporting = new NoSummaryReport implicit def testGroup: TestGroup = TestGroup("VulpixTests") - def maxDuration = 3.seconds - def numberOfSlaves = 5 - def safeMode = sys.env.get("SAFEMODE").isDefined - def isInteractive = !sys.env.contains("DRONE") - def testFilter = None - def updateCheckFiles: Boolean = false - // To fail with something else than an AssertionError def fail(): Unit = throw new Exception("didn't fail properly") @@ -103,3 +97,16 @@ class VulpixUnitTests extends ParallelTesting { } } } + + +object VulpixUnitTests extends ParallelTesting { + def maxDuration = 3.seconds + def numberOfSlaves = 5 + def safeMode = sys.env.get("SAFEMODE").isDefined + def isInteractive = !sys.env.contains("DRONE") + def testFilter = None + def updateCheckFiles: Boolean = false + + @AfterClass + def tearDown() = this.cleanup() +} \ No newline at end of file From 8f1d1a82e763b812c7077f2d8cdb96a014b11de4 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Fri, 9 Oct 2020 14:24:39 +0200 Subject: [PATCH 8/9] Tweak number of processes for run tests --- .../dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala | 2 +- compiler/test/dotty/tools/dotc/CompilationTests.scala | 2 +- compiler/test/dotty/tools/dotc/FromTastyTests.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 7577ca411a7a..9b78369bbf3a 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -22,7 +22,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 60.seconds - def numberOfSlaves = 5 + def numberOfSlaves = Runtime.getRuntime().availableProcessors() def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index de9e910cc31a..ed50b23e9c68 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -328,7 +328,7 @@ object CompilationTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 45.seconds - def numberOfSlaves = 5 + def numberOfSlaves = Runtime.getRuntime().availableProcessors() def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter diff --git a/compiler/test/dotty/tools/dotc/FromTastyTests.scala b/compiler/test/dotty/tools/dotc/FromTastyTests.scala index 3ceef6656d30..4fa7dd016cd8 100644 --- a/compiler/test/dotty/tools/dotc/FromTastyTests.scala +++ b/compiler/test/dotty/tools/dotc/FromTastyTests.scala @@ -41,7 +41,7 @@ object FromTastyTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 30.seconds - def numberOfSlaves = 5 + def numberOfSlaves = Runtime.getRuntime().availableProcessors() def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter From 6e9986d66e8db594c03c395780bc0ccad8cf69f9 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Fri, 9 Oct 2020 14:39:23 +0200 Subject: [PATCH 9/9] Disable tasty interpreter test on Windows The test result differ. Need to investigate and enable later. --- .../tools/dotc/BootstrappedOnlyCompilationTests.scala | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 9b78369bbf3a..74ae28909893 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -131,12 +131,15 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { @Test def runWithCompiler: Unit = { implicit val testGroup: TestGroup = TestGroup("runWithCompiler") - aggregateTests( + val basicTests = List( compileFilesInDir("tests/run-with-compiler", withCompilerOptions), compileFilesInDir("tests/run-staging", withStagingOptions), - compileFilesInDir("tests/run-custom-args/tasty-inspector", withTastyInspectorOptions), - compileDir("tests/run-custom-args/tasty-interpreter", withTastyInspectorOptions), - ).checkRuns() + compileFilesInDir("tests/run-custom-args/tasty-inspector", withTastyInspectorOptions) + ) + val tests = + if (scala.util.Properties.isWin) basicTests + else compileDir("tests/run-custom-args/tasty-interpreter", withTastyInspectorOptions) :: basicTests + aggregateTests(tests: _*).checkRuns() } @Test def runBootstrappedOnly: Unit = {