21 %MACRO _reportJUnitXML(o_file =
32 CREATE TABLE Work.Combined AS
35 , 0 AS failures FORMAT = best12.
36 , LEFT(PUT(scn_id,z3.)) AS
id LENGTH = 7 FORMAT = $7.
40 , scn_path AS classname
41 , scn_start AS timestamp FORMAT = e8601dt.
42 , (scn_end-scn_start) AS time
47 UPDATE Work.Combined SET time = 0 WHERE time = .;
48 UPDATE Work.Combined SET tests = (SELECT COUNT(DISTINCT(cas_id)) FROM &d_rep. WHERE scn_id = Combined.scn_id);
49 UPDATE Work.Combined SET failures = (SELECT COUNT(*) FROM &d_rep. (where=(tst_res = &_SU_Error.)) WHERE scn_id = Combined.scn_id);
52 INSERT INTO Work.Combined
55 , cas_res = &_SU_Error. AS failures FORMAT = best12.
56 , put (scn_id,z3.) !! "-" !! put(cas_id,z3.)
57 AS
id LENGTH = 7 FORMAT = $7.
61 , cas_pgm AS classname
62 , cas_start AS timestamp FORMAT = e8601dt.
63 , (cas_end-cas_start) AS time
104 CREATE TABLE Work.Junit AS
106 , F.tst_errmsg AS message
108 FROM Work.Combined AS C
109 LEFT JOIN Work.Failures AS F
110 ON ( C.SCN_ID = F.SCN_ID
111 AND C.CAS_ID = F.CAS_ID )
115 UPDATE Work.Junit SET name = TRANWRD(name, '&', '&' );
116 UPDATE Work.Junit SET name = TRANWRD(name, '<', '<' );
117 UPDATE Work.Junit SET name = TRANWRD(name, '>', '>' );
118 UPDATE Work.Junit SET name = TRANWRD(name, '"', '"');
120 UPDATE Work.Junit SET message = TRANWRD(message, '&', '&' );
121 UPDATE Work.Junit SET message = TRANWRD(message, '<', '<' );
122 UPDATE Work.Junit SET message = TRANWRD(message, '>', '>' );
123 UPDATE Work.Junit SET message = TRANWRD(message, '"', '"');
124 UPDATE Work.Junit SET message = '&
#160;' where message = "";
126 UPDATE Work.Junit SET classname = TRANWRD(classname,
'^_',
' ');
127 UPDATE Work.Junit SET type = put (TRANWRD(type,
'^_',
' '),$32.);
132 options linesize=256;
134 ods tagsets.JUnit_XML file=
"&o_file.";
135 PROC PRINT data = Work.JUnit;
140 %MEND _reportJUnitXML;