Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #26905 from RickyChien/bug-1112490
Browse files Browse the repository at this point in the history
Bug 1112490 - Parallel build should output a make error r=@cctuan
  • Loading branch information
Ricky Chien committed Dec 19, 2014
2 parents c6e782e + b36f176 commit 85c5d7d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
28 changes: 24 additions & 4 deletions build/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

/* global require, exports */
/* global require, exports, quit */

var utils = require('utils');
var rebuild = require('rebuild');
Expand Down Expand Up @@ -71,9 +71,15 @@ function buildApps(options) {
// A workaround for bug 1093267
if (appDir.indexOf('communications') !== -1) {
communications = spawnProcess('build-app', appOptions);
processes.push(communications);
processes.push({
name: 'communications',
content: communications
});
} else {
processes.push(spawnProcess('build-app', appOptions));
processes.push({
name: appDirFile.leafName,
content: spawnProcess('build-app', appOptions)
});
}
} else {
require('./build-app').execute(appOptions);
Expand All @@ -98,10 +104,24 @@ function buildApps(options) {
utils.processEvents(function () {
return {
wait: processes.some(function(proc) {
return proc.isRunning;
return proc.content.isRunning;
})
};
});

var failed = false;
processes.forEach(function(proc) {
var exitValue = proc.content.exitValue;
if (exitValue !== 0) {
failed = true;
utils.log('failed', 'building ' + proc.name +
' app failed with exit code ' + exitValue);
}
});

if (failed) {
quit(1);
}
}

exports.execute = function(options) {
Expand Down
3 changes: 3 additions & 0 deletions build/xpcshell-commonjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ var CommonjsRunner = function(module, appOptions) {
if (typeof btoa === 'function') {
globals.btoa = btoa;
}
if (typeof quit === 'function') {
globals.quit = quit;
}

let loader = Loader.Loader({
paths: paths,
Expand Down

0 comments on commit 85c5d7d

Please sign in to comment.