-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Revert "Revert "Add regression tests on optimise"" #3164
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ import dotty.tools.io.JFile | |
|
||
|
||
class CompilationTests extends ParallelTesting { | ||
import ParallelTesting._ | ||
import TestConfiguration._ | ||
import CompilationTests._ | ||
|
||
|
@@ -68,7 +69,6 @@ class CompilationTests extends ParallelTesting { | |
compileFilesInDir("../tests/pos-special/strawman-collections", defaultOptions) + | ||
compileFile("../scala2-library/src/library/scala/collection/immutable/IndexedSeq.scala", defaultOptions) + | ||
compileFile("../scala2-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala", defaultOptions) + | ||
compileFile("../tests/pos/t2171.scala", defaultOptimised) + | ||
compileList( | ||
"parSetSubset", | ||
List( | ||
|
@@ -159,6 +159,7 @@ class CompilationTests extends ParallelTesting { | |
|
||
@Test def compileNeg: Unit = { | ||
compileShallowFilesInDir("../tests/neg", defaultOptions) + | ||
compileShallowFilesInDir("../tests/neg/no-optimise", defaultOptions) + | ||
compileFile("../tests/neg/customArgs/typers.scala", allowDoubleBindings) + | ||
compileFile("../tests/neg/customArgs/overrideClass.scala", scala2Mode) + | ||
compileFile("../tests/neg/customArgs/autoTuplingTest.scala", defaultOptions.and("-language:noAutoTupling")) + | ||
|
@@ -186,12 +187,7 @@ class CompilationTests extends ParallelTesting { | |
|
||
@Test def runAll: Unit = { | ||
compileFilesInDir("../tests/run", defaultOptions) + | ||
compileFile("../tests/run/i3018.scala", defaultOptimised) + | ||
compileFile("../tests/run/blame_eye_triple_eee-double.scala", defaultOptimised) + | ||
compileFile("../tests/run/blame_eye_triple_eee-float.scala", defaultOptimised) + | ||
compileFile("../tests/run/run-bug4840.scala", defaultOptimised) + | ||
compileFile("../tests/run/optimizer-array-load.scala", defaultOptimised) + | ||
compileFile("../tests/run/constant-optimization.scala", defaultOptimised) | ||
compileFilesInDir("../tests/run-no-optimise", defaultOptions) | ||
}.checkRuns() | ||
|
||
// Pickling Tests ------------------------------------------------------------ | ||
|
@@ -298,6 +294,13 @@ class CompilationTests extends ParallelTesting { | |
tests.foreach(_.delete()) | ||
} | ||
|
||
@Test def testOptimised: Unit = { | ||
val outputDir = defaultOutputDir + "optimised/" | ||
compileFilesInDir("../tests/pos", defaultOptimised, outputDir).checkCompile() | ||
compileFilesInDir("../tests/run", defaultOptimised, outputDir).checkRuns() | ||
compileShallowFilesInDir("../tests/neg", defaultOptimised, outputDir).checkExpectedErrors() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we move each test in its corresponding test group (i.e. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer to keep the separated for now because I going to start modifying stuff in the local optimizations. It will be clearer to see where the failures occurred if they happen. There are enough tests in each one to take advantage of parallelism, we can improve it later. |
||
} | ||
|
||
private val (compilerSources, backendSources, backendJvmSources) = { | ||
val compilerDir = Paths.get("../compiler/src") | ||
val compilerSources0 = sources(Files.walk(compilerDir)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outputDir
is never usedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supposed to be used in the tree lines bellow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed