-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mps-cli-gradle-plugin: Abandon COI when solutions deleted (#13)
computeConeOfInfluence: when it detects deleted, moved or renamed solutions gives up computation of cone of influence and returns all existing solutions
- Loading branch information
Showing
8 changed files
with
75 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...src/functionalTest/groovy/org/mps_cli/gradle/plugin/ConeOfInfluenceComputerTest_02.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* This Groovy source file was generated by the Gradle 'init' task. | ||
*/ | ||
package org.mps_cli.gradle.plugin | ||
|
||
class ConeOfInfluenceComputerTest_02 extends TestBase { | ||
|
||
def "cone of influence computer test"() { | ||
given: | ||
settingsFile << "" | ||
buildFile << ''' | ||
plugins { | ||
id('com.mbeddr.mps_cli') | ||
} | ||
buildModuleDependencies { | ||
sourcesDir = ['../../../../../../../../../mps_test_projects/mps_cli_lanuse_file_per_root'] | ||
} | ||
computeConeOfInfluence { | ||
referenceBranchName = "origin/testing/do_not_delete/cone_of_influence_test_02" | ||
gitRepoRootLocation = '../../../../../../../../../' | ||
} | ||
task printConeOfInfluence { | ||
dependsOn computeConeOfInfluence | ||
doLast { | ||
def affectedSolutions = computeConeOfInfluence.affectedSolutions | ||
println "all affected solutions: ${affectedSolutions.collect { it.name }.sort()}" | ||
} | ||
} | ||
''' | ||
|
||
when: | ||
runTask("printConeOfInfluence") | ||
|
||
then: | ||
result.output.contains "Solutions [mps.cli.lanuse.library_top2.msd] do not exist on current branch. The cone of influence is the entire set of solutions." | ||
result.output.contains "all affected solutions: [mps.cli.lanuse.library_second, mps.cli.lanuse.library_top]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters