@@ -61,12 +61,37 @@ const conf = YAML.parse(fs.readFileSync(config).toString());
6161
6262
6363const main = async ( ) => {
64+ const results = [ ] ;
6465 for ( const mountpoint of conf . mountpoints ) {
65- // console.log(`Testing ${ mountpoint.path}` );
66- await test ( { mountpoint } ) ;
66+ const result = await test ( { mountpoint } ) ;
67+ results . push ( ... result ) ;
6768 }
69+
70+ let tbl = { } ;
71+ for ( const result of results ) {
72+ tbl [ result . name + ' - ' + result . settings ] = {
73+ passed : result . caseCount - result . failCount ,
74+ failed : result . failCount ,
75+ total : result . caseCount ,
76+ }
77+ }
78+
79+ // hard-coded identifier for ci script
80+ console . log ( "==================== nightly build results begin ====================" )
81+
82+ console . table ( tbl ) ;
83+
84+ // hard-coded identifier for ci script
85+ console . log ( "==================== nightly build results end ====================" )
6886}
6987
88+ /**
89+ * Run test using the given config, and return the test results
90+ *
91+ * @param {Object } options
92+ * @param {Object } options.mountpoint
93+ * @returns {Promise<Object> }
94+ */
7095async function test ( { mountpoint } ) {
7196 const context = {
7297 mountpoint
@@ -106,6 +131,8 @@ async function test({ mountpoint }) {
106131 const all = unit && bench ;
107132 if ( all || unit ) ts . printTestResults ( ) ;
108133 if ( all || bench ) ts . printBenchmarkResults ( ) ;
134+
135+ return ts . packageResults ;
109136}
110137
111138const main_e = async ( ) => {
0 commit comments