Merge "Replace very trivial mock builders with createMock()"
[lhc/web/wiklou.git] / tests / selenium / wdio.conf.js
index 11be135..56e4934 100644 (file)
@@ -52,6 +52,7 @@ exports.config = {
 
        // ==================
        // Test Files
+       // FIXME: The non-core patterns to be removed once T199116 is fixed.
        // ==================
        specs: [
                relPath( './tests/selenium/wdio-mediawiki/specs/*.js' ),
@@ -63,7 +64,11 @@ exports.config = {
        ],
        // Patterns to exclude
        exclude: [
-               relPath( './extensions/CirrusSearch/tests/selenium/specs/**/*.js' )
+               relPath( './extensions/CirrusSearch/tests/selenium/specs/**/*.js' ),
+               // Disabled because these tests modify LocalSettings.php, see T199116 for the long-term fix.
+               relPath( './extensions/FileImporter/tests/selenium/specs/**/*.js' ),
+               // Disabled per T222517
+               relPath( './skins/MinervaNeue/tests/selenium/specs/**/*.js' )
        ],
 
        // ============
@@ -154,6 +159,7 @@ exports.config = {
        */
        beforeTest: function ( test ) {
                if ( process.env.DISPLAY && process.env.DISPLAY.startsWith( ':' ) ) {
+                       var logBuffer;
                        let videoPath = filePath( test, logPath, 'mp4' );
                        const { spawn } = require( 'child_process' );
                        ffmpeg = spawn( 'ffmpeg', [
@@ -166,17 +172,29 @@ exports.config = {
                                videoPath // output file
                        ] );
 
+                       logBuffer = function ( buffer, prefix ) {
+                               let lines = buffer.toString().trim().split( '\n' );
+                               lines.forEach( function ( line ) {
+                                       console.log( prefix + line );
+                               } );
+                       };
+
                        ffmpeg.stdout.on( 'data', ( data ) => {
-                               console.log( `ffmpeg stdout: ${data}` );
+                               logBuffer( data, 'ffmpeg stdout: ' );
                        } );
 
                        ffmpeg.stderr.on( 'data', ( data ) => {
-                               console.log( `ffmpeg stderr: ${data}` );
+                               logBuffer( data, 'ffmpeg stderr: ' );
                        } );
 
-                       ffmpeg.on( 'close', ( code ) => {
+                       ffmpeg.on( 'close', ( code, signal ) => {
                                console.log( '\n\tVideo location:', videoPath, '\n' );
-                               console.log( `ffmpeg exited with code ${code}` );
+                               if ( code !== null ) {
+                                       console.log( `\tffmpeg exited with code ${code} ${videoPath}` );
+                               }
+                               if ( signal !== null ) {
+                                       console.log( `\tffmpeg received signal ${signal} ${videoPath}` );
+                               }
                        } );
                }
        },