Skip to content

Commit

Permalink
Adding zUnit Support, these changes are paired with dbb v1.0.9 (#26)
Browse files Browse the repository at this point in the history
* Adding zUnit Support, these changes are paired with dbb v1.0.9

This commit adds zUnit support and support for a custom scanner

* Updating documention and cleaning up some of the zUnit work

* Only run zUnit Tests when specified in the applications.properties

* clean up after code review

* removed debug println

* adding runzTests as a cli arg

* allowing for custom jobCards in zUnit

* updating samples REAME.md for jobCard
  • Loading branch information
ricedavida authored Jul 24, 2020
1 parent 50ec6b8 commit a16fb38
Show file tree
Hide file tree
Showing 17 changed files with 488 additions and 96 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The zAppBuild sample provides the following *language* build scripts by default:
* DBDgen.groovy
* PSBgen.groovy
* MFS.groovy
* ZunitConfig.groovy

All language scripts both compile and optionally link-edit programs. The language build scripts are intended to be useful out of the box but depending on the complexity of your applications' build requirements, may require modifications to meet your development team's needs. By following the examples used in the existing language build scripts of keeping all application specific references out of the build scripts and instead using configuration properties with strong default values, the zAppBuild sample can continue to be a generic build solution for all of your specific applications.

Expand Down
15 changes: 15 additions & 0 deletions build-conf/Cobol.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ cobol_cpyPDS=${hlq}.COPY
cobol_objPDS=${hlq}.OBJ
cobol_dbrmPDS=${hlq}.DBRM
cobol_BMS_PDS=${team}.BMS.COPY

#
# COBOL load data sets
cobol_loadPDS=${hlq}.LOAD

#
# COBOL test case source data sets
cobol_testcase_srcPDS=${hlq}.TEST.COBOL

#
# COBOL test case load data sets
cobol_testcase_loadPDS=${hlq}.TEST.LOAD

#
# List the data sets that need to be created and their creation options
cobol_srcDatasets=${cobol_srcPDS},${cobol_cpyPDS},${cobol_objPDS},${cobol_dbrmPDS}
Expand All @@ -36,6 +45,12 @@ cobol_loadOptions=cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(libra
cobol_tempOptions=cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new
cobol_printTempOptions=cyl space(5,5) unit(vio) blksize(133) lrecl(133) recfm(f,b) new

cobol_testsrcDatasets=${cobol_testcase_srcPDS}
cobol_testsrcOptions=cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)

cobol_testloadDatasets=${cobol_testcase_loadPDS}
cobol_testloadOptions=cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(library)

# Allocation of SYSMLSD Dataset used for extracting Compile Messages to Remote Error List
cobol_compileErrorFeedbackXmlOptions=tracks space(200,40) dsorg(PS) blksize(27998) lrecl(16383) recfm(v,b) new keep

Expand Down
22 changes: 22 additions & 0 deletions build-conf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ cobol_srcOptions | BPXWDYN creation options for creating 'source' type data sets
cobol_loadDatasets | Comma separated list of 'load module' type data sets
cobol_loadOptions | BPXWDYN creation options for 'load module' type data sets
cobol_tempOptions | BPXWDYN creation options for temporary data sets
cobol_testcase_srcPDS | Dataset to move COBOL test source files to from USS
cobol_testcase_loadPDS | Dataset to create load modules in from link edit step
cobol_testsrcDatasets | Comma separated list of test 'source' type data sets
cobol_testsrcOptions | BPXWDYN creation options for creating 'source' type data sets
cobol_testloadDatasets | Comma separated list of test 'load module' type data sets
cobol_testloadOptions | BPXWDYN creation options for creating 'load module' type data sets
cobol_compileErrorFeedbackXmlOptions | BPXWDYN creation options for SYSXMLSD data set
cobol_compiler | MVS program name of the COBOL compiler
cobol_linkEditor | MVS program name of the link editor
Expand Down Expand Up @@ -213,3 +219,19 @@ acbgen_loadOptions | BPXWDYN creation options for 'load module' type data sets
acbgen_tempOptions | BPXWDYN creation options for temporary data sets
acbgen_pgm | MVS program name of the acbgen pgm
acbgen_deployType | Deploy Type of build outputs

### ZunitConfig.properties
Build properties used by zAppBuild/language/ZunitConfig.groovy

Property | Description
--- | ---
zunit_bzucfgPDS | Dataset to move BZUCFG files to from USS
zunit_bzureportPDS | Dataset where BZUCRPT files are stored
zunit_bzuplayPDS | Dataset to move zUnit Playback files to from USS
zunit_srcDatasets | Comma separated list of 'source' type data sets
zunit_srcOptions | BPXWDYN creation options for creating 'source' type data sets
zunit_loadDatasets | Comma separated list of 'load module' type data sets
zunit_loadOptions | BPXWDYN creation options for creating 'load module' type data sets
zunit_reportDatasets | Comma separated list of 'report' type data sets
zunit_reportOptions | BPXWDYN creation options for creating 'report' type data sets

14 changes: 14 additions & 0 deletions build-conf/ZunitConfig.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

zunit_bzucfgPDS=${hlq}.BZU.BZUCFG
zunit_bzureportPDS=${hlq}.BZU.BZURPT
zunit_bzuplayPDS=${hlq}.BZU.BZUPLAY

# List the data sets that need to be created and their creation options
zunit_srcDatasets=${zunit_bzucfgPDS}
zunit_srcOptions=cyl space(1,1) lrecl(27998) dsorg(PO) recfm(V,B) dsntype(library)

zunit_loadDatasets=${zunit_bzuplayPDS}
zunit_loadOptions=cyl space(1,1) dsorg(PO) lrecl(256) recfm(F,B) blksize(32512) dsntype(library)

zunit_reportDatasets=${zunit_bzureportPDS}
zunit_reportOptions=tracks space(200,40) dsorg(PO) blksize(32760) lrecl(16383) recfm(v,b) dsntype(library)
4 changes: 2 additions & 2 deletions build-conf/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Comma separated list of additional build property files to load
# Supports both relative path (to zAppBuild/build-conf/) and absolute path
buildPropFiles=datasets.properties,Assembler.properties,BMS.properties,MFS.properties,PSBgen.properties,DBDgen.properties,ACBgen.properties,Cobol.properties,LinkEdit.properties,PLI.properties
buildPropFiles=datasets.properties,Assembler.properties,BMS.properties,MFS.properties,PSBgen.properties,DBDgen.properties,ACBgen.properties,Cobol.properties,LinkEdit.properties,PLI.properties,ZunitConfig.properties

#
# file extension that indicates the build file is really a build list or build list filter
Expand Down Expand Up @@ -67,7 +67,7 @@ dbb.RepositoryClient.url=
dbb.RepositoryClient.userId=ADMIN

# build.groovy option -pw, --pw
#dbb.RepositoryClient.password=
dbb.RepositoryClient.password=

# build.groovy option -pf, --pf
dbb.RepositoryClient.passwordFile=${zAppBuildDir}/utilities/ADMIN.pw
Expand Down
10 changes: 9 additions & 1 deletion build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ if (buildList.size() == 0)
else {
if (!props.scanOnly) {
println("** Invoking build scripts according to build order: ${props.buildOrder}")
String[] buildOrder = props.buildOrder.split(',')
String[] buildOrderList = props.buildOrder.split(',')
String[] testOrderList;
if (props.runzTests == "True") {
println("** Invoking test scripts according to test order: ${props.testOrder}")
testOrderList = props.testOrder.split(',')
}
buildOrder = buildOrderList + testOrderList
buildOrder.each { script ->
scriptPath = script
// Use the ScriptMappings class to get the files mapped to the build script
Expand Down Expand Up @@ -170,6 +176,7 @@ options:
cli.srcDir(longOpt:'sourceDir', args:1, 'Absolute path to workspace (root) directory containing all required source directories for user build')
cli.wrkDir(longOpt:'workDir', args:1, 'Absolute path to the build output root directory for user build')
cli.t(longOpt:'team', args:1, argName:'hlq', 'Team build hlq for user build syslib concatenations')
cli.zTest(longOpt:'runzTests', args:1, 'Specify if zUnit Tests should be run "True", or not run "False"')

// debug option
cli.d(longOpt:'debug', 'Flag to indicate a build for debugging')
Expand Down Expand Up @@ -216,6 +223,7 @@ def populateBuildProperties(String[] args) {
if (opts.wrkDir) props.outDir = opts.wrkDir
buildUtils.assertBuildProperties('workspace,outDir')

if (opts.zTest) props.runzTests = opts.zTest

// load build.properties
def buildConf = "${zAppBuildDir}/build-conf"
Expand Down
Loading

0 comments on commit a16fb38

Please sign in to comment.