Skip to content

Commit

Permalink
sweet labels forgot to implement shell script
Browse files Browse the repository at this point in the history
generation.

See also #70
  • Loading branch information
samrocketman committed Oct 30, 2015
1 parent cbb85c9 commit 3924f99
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,12 @@ env:
if(!toolchain_obj.supportedTool(toolchain, tempchain)) {
throw new UnsupportedToolException("${toolchain}: ${tempchain}")
}
output += " ${toolchain}${i})\n"
if(toolchain_obj.isFriendlyLabel(toolchain)) {
output += " ${toolchain}:${tempchain})\n"
}
else {
output += " ${toolchain}${i})\n"
}
if(tempchain in toolchain_keys) {
output += ' ' + toolchain_obj.toolchains[toolchain][tempchain].join('\n ') + '\n ;;\n'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ class lifecycleGeneratorTest extends GroovyTestCase {
shouldFail(UnsupportedToolException) {
generator.generateToolchainSection()
}
//test for friendly labels
URL url = this.getClass().getResource('/good_toolchains_friendly.json');
generator.loadToolchains(url.getFile())
generator.loadYamlString('language: ruby\njdk: [openjdk6, openjdk7]')
assert '#\n# TOOLCHAINS SECTION\n#\n#gemfile toolchain section\nexport BUNDLE_GEMFILE="${PWD}/Gemfile"\n#env toolchain section\n#rvm toolchain section\nsome commands\n#jdk toolchain section\ncase ${jdk} in\n jdk:openjdk6)\n more commands\n ;;\n jdk:openjdk7)\n some commands\n ;;\nesac\n' == generator.generateToolchainSection()
}
@Test public void test_lifecycleGenerator_generateToolchainSection_nonmatrix() {
//basic language test
Expand Down

0 comments on commit 3924f99

Please sign in to comment.