Skip to content

chore: increase the duration of compilation tests #22959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/dotc/CompilationTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class CompilationTests {
object CompilationTests extends ParallelTesting {
// Test suite configuration --------------------------------------------------

def maxDuration = 45.seconds
def maxDuration = 100.seconds
def numberOfSlaves = Runtime.getRuntime().availableProcessors()
def safeMode = Properties.testsSafeMode
def isInteractive = SummaryReport.isInteractive
Expand Down
8 changes: 7 additions & 1 deletion compiler/test/dotty/tools/vulpix/ParallelTesting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
/** Entry point: runs the test */
final def encapsulatedCompilation(testSource: TestSource) = new LoggedRunnable { self =>
def checkTestSource(): Unit = tryCompile(testSource) {
registerStart
val reportersOrCrash = compileTestSource(testSource)
onComplete(testSource, reportersOrCrash, self)
registerCompletion()
Expand Down Expand Up @@ -395,9 +396,14 @@ trait ParallelTesting extends RunnerOrchestration { self =>
/** Total amount of test sources being compiled by this test */
val sourceCount = filteredSources.length

private var testSourcesStarted = 0

private var _testSourcesCompleted = 0
private def testSourcesCompleted: Int = _testSourcesCompleted

protected final def registerStart = synchronized:
testSourcesStarted += 1

/** Complete the current compilation with the amount of errors encountered */
protected final def registerCompletion() = synchronized {
_testSourcesCompleted += 1
Expand Down Expand Up @@ -473,7 +479,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
val past = "=" * math.max(progress - 1, 0)
val curr = if progress > 0 then ">" else ""
val next = " " * (40 - progress)
s"[$past$curr$next] completed ($tCompiled/$sourceCount, $failureCount failed, ${timestamp}s)"
s"[$past$curr$next] completed ($tCompiled/$sourceCount, ${testSourcesStarted} started, $failureCount failed, ${timestamp}s)"

/** Wrapper function to make sure that the compiler itself did not crash -
* if it did, the test should automatically fail.
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/vulpix/SummaryReport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@ final class SummaryReport extends SummaryReporting {
}

object SummaryReport {
val isInteractive = Properties.testsInteractive && !Properties.isRunByCI
val isInteractive = true //Properties.testsInteractive && !Properties.isRunByCI
}
Loading