Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Bednarz committed Nov 5, 2020
1 parent a975db3 commit 2a85db2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ scala:

jobs:
include:
- name: test-probe @ scala-2.12
script: ci/tests/run probe 2.12.10
- name: test-probe @ scala-2.13
script: ci/tests/run probe 2.13.1
- name: test-scala @ scala-2.13
script: ci/tests/run scala 2.13.1
# - name: test-probe @ scala-2.12
# script: ci/tests/run probe 2.12.10
# - name: test-probe @ scala-2.13
# script: ci/tests/run probe 2.13.1
# - name: test-scala @ scala-2.13
# script: ci/tests/run scala 2.13.1
- name: test-examples @ scala-2.13
script: ci/tests/run examples 2.13.1
- stage: Release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,26 @@ final class IntelliJFactory(
})

val distinctPlugins = archives.reverse.distinctBy(_.rootEntries).reverse

superUltraPrint("Distinct plugins", distinctPlugins.toString)
parallel(distinctPlugins).forEach { pluginArchive =>
superUltraPrint("Before", pluginArchive.plugin.toString)
pluginArchive.archive.extractTo(targetDir)
println(s"Installed ${pluginArchive.plugin}")
}
}

private def superUltraPrint(before: String, after: String): Unit = {
println(s"!!!!!\n$before")
println(Thread.currentThread().toString)
try {
throw new Exception()
} catch { case e: Exception =>
val trace = e.getStackTrace
trace.foreach(println)
}
println(s"$after\n!!!!!")
}

private def toArchive(resource: Path): Resource.Archive = {
resource match {
case Resource.Archive(archive) => archive
Expand Down
13 changes: 7 additions & 6 deletions examples/src/test/scala/org/virtuslab/ideprobe/ModuleTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import org.virtuslab.ideprobe.scala.protocol.SbtProjectSettingsChangeRequest

class ModuleTest extends IdeProbeFixture with ScalaPluginExtension with RobotPluginExtension {

registerFixtureTransformer(_.withAfterIntelliJStartup((fixture, intelliJ) => {
deleteIdeaSettings(intelliJ)
intelliJ.probe.withRobot.openProject(intelliJ.workspace)
useSbtShell(intelliJ)
}))

@ParameterizedTest
@ValueSource(
strings = Array(
Expand All @@ -20,9 +26,6 @@ class ModuleTest extends IdeProbeFixture with ScalaPluginExtension with RobotPlu
)
)
def runTestsInDifferentScopes(configName: String): Unit = fixtureFromConfig(configName).run { intelliJ =>
deleteIdeaSettings(intelliJ)
intelliJ.probe.withRobot.openProject(intelliJ.workspace)
useSbtShell(intelliJ)
val runnerToSelect = intelliJ.config.get[String]("runner")
val modulesToTest = intelliJ.config[Seq[String]]("modules.test")
intelliJ.probe.build().assertSuccess()
Expand All @@ -42,9 +45,7 @@ class ModuleTest extends IdeProbeFixture with ScalaPluginExtension with RobotPlu
)
)
def verifyModulesPresent(configName: String): Unit = fixtureFromConfig(configName).run { intelliJ =>
deleteIdeaSettings(intelliJ)
intelliJ.probe.withRobot.openProject(intelliJ.workspace)
useSbtShell(intelliJ)
intelliJ.probe.build().assertSuccess()
val project = intelliJ.probe.projectModel()
val expectedModules = intelliJ.config[Seq[String]]("modules.verify")
val missingModules = expectedModules.diff(project.moduleNames)
Expand Down

0 comments on commit 2a85db2

Please sign in to comment.