Skip to content

Commit

Permalink
Add file count and progress indicators to language scripts. (#336)
Browse files Browse the repository at this point in the history
* Add file count and progress indicators to language scripts.

Signed-off-by: Marc Bauer <[email protected]>
  • Loading branch information
MarcBauer-LM authored May 3, 2023
1 parent 66489c6 commit 04e6118
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 36 deletions.
7 changes: 4 additions & 3 deletions languages/Assembler.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.ibm.dbb.build.report.records.*
@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy"))
@Field def impactUtils= loadScript(new File("${props.zAppBuildDir}/utilities/ImpactUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.assembler_requiredBuildProperties)
Expand All @@ -21,11 +21,12 @@ def langQualifier = "assembler"
buildUtils.createLanguageDatasets(langQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'assembler_fileBuildRank')
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'assembler_fileBuildRank')
int currentBuildFileNumber = 1

// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"

// Configure dependency resolution
String dependencySearch = props.getFileProperty('assembler_dependencySearch', buildFile)
Expand Down
8 changes: 4 additions & 4 deletions languages/BMS.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import groovy.transform.*
@Field BuildProperties props = BuildProperties.getInstance()
@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.bms_requiredBuildProperties)
Expand All @@ -18,11 +18,11 @@ def langQualifier = "bms"
buildUtils.createLanguageDatasets(langQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'bms_fileBuildRank')

List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'bms_fileBuildRank')
int currentBuildFileNumber = 1
// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"

// copy build file to input data set
buildUtils.copySourceFiles(buildFile, props.bms_srcPDS, null, null, null)
Expand Down
7 changes: 4 additions & 3 deletions languages/Cobol.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.ibm.dbb.build.report.records.*
@Field def impactUtils= loadScript(new File("${props.zAppBuildDir}/utilities/ImpactUtilities.groovy"))
@Field def bindUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BindUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.cobol_requiredBuildProperties)
Expand All @@ -24,7 +24,8 @@ def langQualifier = "cobol"
buildUtils.createLanguageDatasets(langQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'cobol_fileBuildRank')
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'cobol_fileBuildRank')
int currentBuildFileNumber = 1

if (buildListContainsTests(sortedList)) {
langQualifier = "cobol_test"
Expand All @@ -33,7 +34,7 @@ if (buildListContainsTests(sortedList)) {

// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"

// Check if this a testcase
isZUnitTestCase = (props.getFileProperty('cobol_testcase', buildFile).equals('true')) ? true : false
Expand Down
7 changes: 4 additions & 3 deletions languages/DBDgen.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import groovy.transform.*
@Field BuildProperties props = BuildProperties.getInstance()
@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.dbdgen_requiredBuildProperties)
Expand All @@ -17,11 +17,12 @@ def langQualifier = "dbdgen"
buildUtils.createLanguageDatasets(langQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'dbdgen_fileBuildRank')
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'dbdgen_fileBuildRank')
int currentBuildFileNumber = 1

// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"

// copy build file to input data set
buildUtils.copySourceFiles(buildFile, props.dbdgen_srcPDS, null, null, null)
Expand Down
7 changes: 4 additions & 3 deletions languages/LinkEdit.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import groovy.transform.*
@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy"))
@Field def impactUtils= loadScript(new File("${props.zAppBuildDir}/utilities/ImpactUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.linkedit_requiredBuildProperties)
Expand All @@ -19,11 +19,12 @@ def langQualifier = "linkedit"
buildUtils.createLanguageDatasets(langQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'linkedit_fileBuildRank')
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'linkedit_fileBuildRank')
int currentBuildFileNumber = 1

// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"

// copy build file to input data set
buildUtils.copySourceFiles(buildFile, props.linkedit_srcPDS, null, null, null)
Expand Down
7 changes: 4 additions & 3 deletions languages/MFS.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import groovy.transform.*
@Field BuildProperties props = BuildProperties.getInstance()
@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.mfs_requiredBuildProperties)
Expand All @@ -19,11 +19,12 @@ def langQualifier = "mfs"
buildUtils.createLanguageDatasets(langQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'mfs_fileBuildRank')
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'mfs_fileBuildRank')
int currentBuildFileNumber = 1

// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"

// copy build file to input data set
buildUtils.copySourceFiles(buildFile, props.mfs_srcPDS, null, null, null)
Expand Down
7 changes: 4 additions & 3 deletions languages/PLI.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import com.ibm.dbb.build.report.records.*
@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy"))
@Field def impactUtils= loadScript(new File("${props.zAppBuildDir}/utilities/ImpactUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.pli_requiredBuildProperties)
Expand All @@ -22,7 +22,8 @@ def langQualifier = "pli"
buildUtils.createLanguageDatasets(langQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'pli_fileBuildRank')
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'pli_fileBuildRank')
int currentBuildFileNumber = 1

if (buildListContainsTests(sortedList)) {
langQualifier = "pli_test"
Expand All @@ -31,7 +32,7 @@ if (buildListContainsTests(sortedList)) {

// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"

// Check if this a testcase
isZUnitTestCase = (props.getFileProperty('pli_testcase', buildFile).equals('true')) ? true : false
Expand Down
7 changes: 4 additions & 3 deletions languages/PSBgen.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import groovy.transform.*
@Field BuildProperties props = BuildProperties.getInstance()
@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.psbgen_requiredBuildProperties)
Expand All @@ -20,11 +20,12 @@ def acbgenLangQualifier = "acbgen"
buildUtils.createLanguageDatasets(acbgenLangQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'psbgen_fileBuildRank')
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'psbgen_fileBuildRank')
int currentBuildFileNumber = 1

// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"

// copy build file to input data set
buildUtils.copySourceFiles(buildFile, props.psbgen_srcPDS, null, null, null)
Expand Down
7 changes: 4 additions & 3 deletions languages/REXX.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import groovy.transform.*
@Field def bindUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BindUtilities.groovy"))


println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.rexx_requiredBuildProperties)
Expand All @@ -21,11 +21,12 @@ def langQualifier = "rexx"
buildUtils.createLanguageDatasets(langQualifier)

// sort the build list based on build file rank if provided
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList, 'rexx_fileBuildRank')
List<String> sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'rexx_fileBuildRank')
int currentBuildFileNumber = 1

// iterate through build list
sortedList.each { buildFile ->
println "*** Building file $buildFile"
println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile"


// configure dependency resolution and create logical file
Expand Down
8 changes: 4 additions & 4 deletions languages/Transfer.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ import groovy.transform.*
// Set to keep information about which datasets where already checked/created
@Field HashSet<String> verifiedBuildDatasets = new HashSet<String>()

println("** Building files mapped to ${this.class.getName()}.groovy script")

println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")
// verify required build properties
buildUtils.assertBuildProperties(props.transfer_requiredBuildProperties)

List<String> buildList = argMap.buildList
List<String> buildList = argMap.buildList.sort()
int currentBuildFileNumber = 1

// iterate through build list
buildList.each { buildFile ->
println "*** Transferring file $buildFile"
println "*** (${currentBuildFileNumber++}/${buildList.size()}) Transferring file $buildFile"

// local variables and log file
String member = CopyToPDS.createMemberName(buildFile)
Expand Down
8 changes: 4 additions & 4 deletions languages/ZunitConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ import groovy.xml.*
@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy"))
@Field def impactUtils= loadScript(new File("${props.zAppBuildDir}/utilities/ImpactUtilities.groovy"))

println("** Building files mapped to ${this.class.getName()}.groovy script")
println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script")

// verify required build properties
buildUtils.assertBuildProperties(props.cobol_requiredBuildProperties)
buildUtils.assertBuildProperties(props.zunit_requiredBuildProperties)

def langQualifier = "zunit"
buildUtils.createLanguageDatasets(langQualifier)

int currentBuildFileNumber = 1

// iterate through build list
(argMap.buildList).each { buildFile ->
println "*** Building file $buildFile"
(argMap.buildList.sort()).each { buildFile ->
println "*** (${currentBuildFileNumber++}/${argMap.buildList.size()}) Building file $buildFile"

String member = CopyToPDS.createMemberName(buildFile)

Expand Down

0 comments on commit 04e6118

Please sign in to comment.