-
Notifications
You must be signed in to change notification settings - Fork 185
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
Refactor test execution #1756
Refactor test execution #1756
Conversation
5542a7b
to
29af940
Compare
d54a069
to
5b712f4
Compare
@@ -34,7 +34,7 @@ class RuleDecoderSuite extends AnyFunSuite { | |||
assert(expectedName == rules.name.value) | |||
} | |||
|
|||
test("relative resolves from custom working directory") { | |||
test("relative resolves from custom working directory", SkipWindows) { |
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.
integration3/test
fails on windows because of this
[info] - relative resolves from custom working directory *** FAILED *** (34 milliseconds)
[info] java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/a/scalafix/scalafix/scalafix-tests/integration/target/jvm-3/test-classes/
[info] at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
[info] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
[info] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
[info] at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
[info] at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
[info] at java.base/java.nio.file.Path.of(Path.java:147)
[info] at java.base/java.nio.file.Paths.get(Paths.java:69)
[info] at dotty.tools.dotc.core.MacroClassLoader$.$anonfun$1(MacroClassLoader.scala:25)
[info] at scala.collection.immutable.List.map(List.scala:246)
[info] at dotty.tools.dotc.core.MacroClassLoader$.makeMacroClassLoader(MacroClassLoader.scala:25)
18f178d
to
d821d0f
Compare
// TODO: switch defaults to rely on much more simple test input/rules so | ||
// that we don't need to hardcode a scala version here. | ||
val sourceDir = "scalafix-tests/input/src/main/scala-2" |
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.
removing this unlocks #1728
// There is flakyness in CliGitDiffTests and CliSemanticTests | ||
Test / parallelExecution := false, |
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.
I only observed flakiness in integration
(expected because we have side effects), so I disabled parallel execution there specifically
|
||
lazy val docs = projectMatrix | ||
.in(file("scalafix-docs")) | ||
.settings( | ||
noPublishAndNoMima, | ||
fork := true, |
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.
prevents
[error] scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
[error] at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:24)
[error] at scala.reflect.internal.Mirrors$RootsBase.$anonfun$getModuleOrClass$6(Mirrors.scala:63)
[error] at scala.reflect.internal.Mirrors$RootsBase.getPackage(Mirrors.scala:63)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage$lzycompute(Definitions.scala:200)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage(Definitions.scala:200)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass$lzycompute(Definitions.scala:201)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass(Definitions.scala:201)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr$lzycompute(Definitions.scala:1389)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr(Definitions.scala:1388)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses$lzycompute(Definitions.scala:1553)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses(Definitions.scala:1552)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1596)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1596)
[error] at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1652)
[error] at scala.tools.nsc.Global$Run.<init>(Global.scala:1236)
[error] at scala.tools.nsc.interactive.Global$TyperRun.<init>(Global.scala:1351)
[error] at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:1374)
[error] at scala.tools.nsc.interactive.Global.<init>(Global.scala:294)
[error] at scala.meta.interactive.InteractiveSemanticdb$.newCompiler(InteractiveSemanticdb.scala:34)
[error] at scalafix.docs.PatchDocs$.compiler$lzycompute(PatchDocs.scala:118)
[error] at scalafix.docs.PatchDocs$.compiler(PatchDocs.scala:117)
[error] at docs.Main$.main(Main.scala:59)
[error] at docs.Main.main(Main.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] stack trace is suppressed; run last docs2_13 / Compile / run for the full output
4049325
to
2494b7f
Compare
ec8c956
to
85b867e
Compare
- integration: seggregate slow, I/O tests (`shared` folded into it) - expect: stop building & running target-independant suites twice - BaseCliSuite no longer relies on teskit (except for basic diff features), to focus on actual CLI interactions rather than input/output checks handled in `expect`
- make all expect tests explicit with sbt-projectmatrix - keep only the 3 latest patch versions as targets (instead of 7) - run tests for all scala versions on windows - move away from one command per scala version - run docs checks in a separate CI job - speed up test execution by removing forking and limiting sequential run to `integration` suites - speed up windows test execution by avoiding compiling upfront scala 3 projects as part of publishLocalTransitive (`publishLocal / skip`) and by expressing the dependency to `publishLocalTransitive` only where needed by hooking into the task graph (`testWindows`) instead of using a sequential command
publishLocal / skip := (if ((publishLocal / skip).value) true | ||
else scalaBinaryVersion.value == "3"), |
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.
this turned out to have no effect as its intent is already achieved by the line just above, see #1776
Closes #1593
Unlocks #1728 (see comment)
On the
projectsGraphPng
belowinterface
tocliA_B
is not visible