merge b2g-inbound to m-c to fix merge conflicts a=merge

This commit is contained in:
Carsten "Tomcat" Book 2015-11-05 13:38:39 +01:00
commit 34e1d53123
47 changed files with 356 additions and 176 deletions

View File

@ -693,6 +693,7 @@ pref("layout.css.scroll-snap.enabled", true);
pref("dom.ipc.processPriorityManager.enabled", true);
pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000);
pref("dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS", 5000);
pref("dom.ipc.processPriorityManager.memoryPressureGracePeriodMS", 3000);
pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000);
// Number of different background/foreground levels for background/foreground

View File

@ -745,19 +745,21 @@ developerHUD.registerWatcher(eventLoopLagWatcher);
/*
* The performanceEntriesWatcher determines the delta between the epoch
* of an app's launch time and the app's performance entry marks.
* of an app's launch time and the epoch of the app's performance entry marks.
* When it receives an "appLaunch" performance entry mark it records the
* name of the app being launched and the epoch of when the launch ocurred.
* When it receives subsequent performance entry events for the app being
* launched, it records the delta of the performance entry opoch compared
* to the app-launch epoch and emits an "app-start-time-<performance mark name>"
* event containing the delta.
*
* Additionally, while recording the "app-start-time" for a performance mark,
* USS memory at the time of the performance mark is also recorded.
*/
var performanceEntriesWatcher = {
_client: null,
_fronts: new Map(),
_appLaunchName: null,
_appLaunchStartTime: null,
_appLaunch: new Map(),
_supported: [
'contentInteractive',
'navigationInteractive',
@ -800,17 +802,14 @@ var performanceEntriesWatcher = {
let name = detail.name;
let epoch = detail.epoch;
// FIXME There is a potential race condition that can result
// in some performance entries being disregarded. See bug 1189942.
//
// If this is an "app launch" mark, record the app that was
// launched and the epoch of when it was launched.
if (name.indexOf('appLaunch') !== -1) {
let CHARS_UNTIL_APP_NAME = 7; // '@app://'
let startPos = name.indexOf('@app') + CHARS_UNTIL_APP_NAME;
let endPos = name.indexOf('.');
this._appLaunchName = name.slice(startPos, endPos);
this._appLaunchStartTime = epoch;
let appName = name.slice(startPos, endPos);
this._appLaunch.set(appName, epoch);
return;
}
@ -822,13 +821,15 @@ var performanceEntriesWatcher = {
let origin = detail.origin;
origin = origin.slice(0, origin.indexOf('.'));
// Continue if the performance mark corresponds to the app
// for which we have recorded app launch information.
if (this._appLaunchName !== origin) {
let appLaunchTime = this._appLaunch.get(origin);
// Sanity check: ensure we have an app launch time for the app
// corresponding to this performance mark.
if (!appLaunchTime) {
return;
}
let time = epoch - this._appLaunchStartTime;
let time = epoch - appLaunchTime;
let eventName = 'app_startup_time_' + name;
// Events based on performance marks are for telemetry only, they are

View File

@ -11,13 +11,15 @@
"upload_files": [
"{objdir}/dist/b2g-*.crashreporter-symbols.zip",
"{objdir}/dist/b2g-*.tar.gz",
"{workdir}/sources.xml"
"{workdir}/sources.xml",
"{workdir}/out/target/product/aries/fota-*-update-*.mar"
],
"public_upload_files": [
"{objdir}/dist/b2g-*.crashreporter-symbols.zip",
"{objdir}/dist/b2g-*.tar.gz",
"{workdir}/sources.xml",
"{objdir}/dist/b2g-update/*.mar"
"{objdir}/dist/b2g-update/*.mar",
"{workdir}/out/target/product/aries/fota-*-update.mar"
],
"zip_files": [
["{workdir}/out/target/product/aries/*.img", "out/target/product/aries/"],

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -19,12 +19,12 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->

View File

@ -17,9 +17,9 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="638ec448619fda80fcb439b1747af62169d05548"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -15,11 +15,11 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -15,11 +15,11 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -19,12 +19,12 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "607b9c5db7fdbbafc16a572e7c319baa266a3372",
"git_revision": "c3be747b993f0c70e7b93a709ef691383c88fc01",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "7136753530b8af60e42417fc73356ba17971141b",
"revision": "5718aa1b0322ec35435fcd253eedeb91e3f7872c",
"repo_path": "integration/gaia-central"
}

View File

@ -17,7 +17,8 @@
"{objdir}/dist/b2g-*.crashreporter-symbols.zip",
"{objdir}/dist/b2g-*.tar.gz",
"{workdir}/sources.xml",
"{objdir}/dist/b2g-update/*.mar"
"{objdir}/dist/b2g-update/*.mar",
"{workdir}/mako.zip"
],
"zip_files": [
["{workdir}/out/target/product/mako/*.img", "out/target/product/mako/"],

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -18,9 +18,9 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="638ec448619fda80fcb439b1747af62169d05548"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -17,7 +17,8 @@
"{objdir}/dist/b2g-*.crashreporter-symbols.zip",
"{objdir}/dist/b2g-*.tar.gz",
"{workdir}/sources.xml",
"{objdir}/dist/b2g-update/*.mar"
"{objdir}/dist/b2g-update/*.mar",
"{workdir}/hammerhead.zip"
],
"zip_files": [
["{workdir}/out/target/product/hammerhead/*.img", "out/target/product/hammerhead/"],

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -44,7 +44,7 @@ var SimulatorEditor = {
Simulators.on("configure", (e, simulator) => { this.edit(simulator) });
// Extract the list of device simulation options we'll support.
let deviceFields = form.querySelectorAll("*[data-device]");
this._deviceOptions = [].map.call(deviceFields, field => field.name);
this._deviceOptions = Array.map(deviceFields, field => field.name);
}
// Append a new <option> to a <select> (or <optgroup>) element.
@ -172,7 +172,7 @@ var SimulatorEditor = {
// TODO (Bug 1146531) Indicate that a custom profile is now required.
}
// If `form.name` contains the old version, update its last occurrence.
if (form.name.value.contains(oldVer) && simulator.version !== oldVer) {
if (form.name.value.includes(oldVer) && simulator.version !== oldVer) {
let regex = new RegExp("(.*)" + oldVer);
let name = form.name.value.replace(regex, "$1" + simulator.version);
simulator.options.name = form.name.value = Simulators.uniqueName(name);

View File

@ -139,8 +139,16 @@ var Simulators = {
if (matching.length > 0) {
return promise.resolve();
}
let name = addon.name.replace(" Simulator", "");
return this.add(new Simulator({name}, addon), silently);
let options = {};
options.name = addon.name.replace(" Simulator", "");
// Some addons specify a simulator type at the end of their version string,
// e.g. "2_5_tv".
let type = this.simulatorAddonVersion(addon).split("_")[2];
if (type) {
// "tv" is shorthand for type "television".
options.type = (type === "tv" ? "television" : type);
}
return this.add(new Simulator(options, addon), silently);
},
// TODO (Bug 1146521) Maybe find a better way to deal with removed addons?
@ -199,11 +207,28 @@ var Simulators = {
return unique;
},
/**
* Compare an addon's ID against the expected form of a simulator addon ID,
* and try to extract its version if there is a match.
*
* Note: If a simulator addon is recognized, but no version can be extracted
* (e.g. custom RegExp pref value), we return "Unknown" to keep the returned
* value 'truthy'.
*/
simulatorAddonVersion(addon) {
let match = SimulatorRegExp.exec(addon.id);
if (!match) {
return null;
}
let version = match[1];
return version || "Unknown";
},
/**
* Detect simulator addons, including "unofficial" ones.
*/
isSimulatorAddon(addon) {
return SimulatorRegExp.exec(addon.id);
return !!this.simulatorAddonVersion(addon);
},
emitUpdated() {
@ -250,7 +275,7 @@ function Simulator(options = {}, addon = null) {
this.options = options;
// Fill `this.options` with default values where needed.
let defaults = this._defaults;
let defaults = this.defaults;
for (let option in defaults) {
if (this.options[option] == null) {
this.options[option] = defaults[option];
@ -259,16 +284,26 @@ function Simulator(options = {}, addon = null) {
}
Simulator.prototype = {
// Default simulation options, based on the Firefox OS Flame.
// Default simulation options.
_defaults: {
width: 320,
height: 570,
pixelRatio: 1.5
// Based on the Firefox OS Flame.
phone: {
width: 320,
height: 570,
pixelRatio: 1.5
},
// Based on a 720p HD TV.
television: {
width: 1280,
height: 720,
pixelRatio: 1,
}
},
_defaultType: "phone",
restoreDefaults() {
let defaults = this.defaults;
let options = this.options;
let defaults = this._defaults;
for (let option in defaults) {
options[option] = defaults[option];
}
@ -307,6 +342,11 @@ Simulator.prototype = {
return process.kill();
},
get defaults() {
let defaults = this._defaults;
return defaults[this.type] || defaults[this._defaultType];
},
get id() {
return this.name;
},
@ -315,6 +355,10 @@ Simulator.prototype = {
return this.options.name;
},
get type() {
return this.options.type || this._defaultType;
},
get version() {
return this.options.b2gBinary ? "Custom" : this.addon.name.match(/\d+\.\d+/)[0];
},

View File

@ -1,4 +1,4 @@
{
"stable": ["1.0", "2.0"],
"unstable": ["3.0"]
"unstable": ["3.0", "3.0_tv"]
}

View File

@ -18,6 +18,10 @@ support-files =
addons/fxos_3_0_simulator-linux64.xpi
addons/fxos_3_0_simulator-win32.xpi
addons/fxos_3_0_simulator-mac64.xpi
addons/fxos_3_0_tv_simulator-linux.xpi
addons/fxos_3_0_tv_simulator-linux64.xpi
addons/fxos_3_0_tv_simulator-win32.xpi
addons/fxos_3_0_tv_simulator-mac64.xpi
addons/adbhelper-linux.xpi
addons/adbhelper-linux64.xpi
addons/adbhelper-win32.xpi

View File

@ -101,13 +101,13 @@
let params = yield runSimulator(0);
ok(params.path.contains(sim10.addonID) && params.path.contains("b2g-bin"), "Simulator binary path looks right");
ok(params.path.includes(sim10.addonID) && params.path.includes("b2g-bin"), "Simulator binary path looks right");
let pid = params.args.indexOf("-profile");
ok(pid > -1, "Simulator process arguments have --profile");
let profilePath = params.args[pid + 1];
ok(profilePath.contains(sim10.addonID) && profilePath.contains("profile"), "Simulator profile path looks right");
ok(profilePath.includes(sim10.addonID) && profilePath.includes("profile"), "Simulator profile path looks right");
ok(params.args.indexOf("-dbgport") > -1 || params.args.indexOf("-start-debugger-server") > -1, "Simulator process arguments have a debugger port");
@ -234,8 +234,8 @@
let defaults = Simulator.prototype._defaults;
for (let param in defaults) {
is(form[param].value, String(defaults[param]), "Default value for device " + param);
for (let param in defaults.phone) {
is(form[param].value, String(defaults.phone[param]), "Default phone value for device " + param);
}
let width = 5000, height = 4000;
@ -248,7 +248,7 @@
let sid = params.args.indexOf("-screen");
ok(sid > -1, "Simulator process arguments have --screen");
ok(params.args[sid + 1].contains(width + "x" + height), "Simulator screen resolution looks right");
ok(params.args[sid + 1].includes(width + "x" + height), "Simulator screen resolution looks right");
yield set(form.version, sim10.addonID);
@ -277,8 +277,8 @@
// Test `device`.
for (let param in defaults) {
is(form[param].value, String(defaults[param]), "Default value for device " + param);
for (let param in defaults.phone) {
is(form[param].value, String(defaults.phone[param]), "Default phone value for device " + param);
}
let devices = yield GetDevices();
@ -294,15 +294,32 @@
params = yield runSimulator(1);
sid = params.args.indexOf("-screen");
ok(params.args[sid + 1].contains(device.width + "x" + device.height), "Simulator screen resolution looks right");
ok(params.args[sid + 1].includes(device.width + "x" + device.height), "Simulator screen resolution looks right");
// Restore default simulator options.
doc.querySelector("#reset").click();
yield nextTick();
for (let param in defaults) {
is(form[param].value, String(defaults[param]), "Default value for device " + param);
for (let param in defaults.phone) {
is(form[param].value, String(defaults.phone[param]), "Default phone value for device " + param);
}
// Install and configure the fake "Firefox OS 3.0 TV" simulator addon.
let sim30tv = addons.simulators.filter(a => a.version == "3.0_tv")[0];
sim30tv.install();
yield addonStatus(sim30tv, "installed");
is(findAll(".runtime-panel-item-simulator").length, 3, "Three simulators in runtime panel");
simulatorList.querySelectorAll(".configure-button")[2].click();
yield nextTick();
for (let param in defaults.television) {
is(form[param].value, String(defaults.television[param]), "Default TV value for device " + param);
}
// Force reload the list of simulators.
@ -312,9 +329,15 @@
yield Simulators._load();
yield nextTick();
is(findAll(".runtime-panel-item-simulator").length, 2, "Two simulators saved and reloaded " + Simulators._simulators.map(s => s.name).join(','));
is(findAll(".runtime-panel-item-simulator").length, 3, "Three simulators saved and reloaded " + Simulators._simulators.map(s => s.name).join(','));
// Uninstall the 2.0 addon and watch its Simulator object disappear.
// Uninstall the 3.0 TV and 2.0 addons, and watch their Simulator objects disappear.
sim30tv.uninstall();
yield addonStatus(sim30tv, "uninstalled");
is(findAll(".runtime-panel-item-simulator").length, 2, "Two simulators left in runtime panel");
sim20.uninstall();

View File

@ -38,7 +38,10 @@ IccContactToMozContact(JSContext* aCx, GlobalObject& aGlobal,
if (count > 0) {
Sequence<nsString>& nameSeq = properties.mName.Construct().SetValue();
for (uint32_t i = 0; i < count; i++) {
nameSeq.AppendElement(nsDependentString(rawStringArray[i]), fallible);
nameSeq.AppendElement(
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: EmptyString(),
fallible);
}
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
}
@ -52,7 +55,9 @@ IccContactToMozContact(JSContext* aCx, GlobalObject& aGlobal,
Sequence<ContactTelField>& numberSeq = properties.mTel.Construct().SetValue();
for (uint32_t i = 0; i < count; i++) {
ContactTelField number;
number.mValue.Construct() = nsDependentString(rawStringArray[i]);
number.mValue.Construct() =
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: EmptyString();
numberSeq.AppendElement(number, fallible);
}
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
@ -67,7 +72,9 @@ IccContactToMozContact(JSContext* aCx, GlobalObject& aGlobal,
Sequence<ContactField>& emailSeq = properties.mEmail.Construct().SetValue();
for (uint32_t i = 0; i < count; i++) {
ContactField email;
email.mValue.Construct() = nsDependentString(rawStringArray[i]);
email.mValue.Construct() =
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: EmptyString();
emailSeq.AppendElement(email, fallible);
}
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);

View File

@ -129,6 +129,11 @@ NS_IMETHODIMP IccContact::Get##_field(uint32_t* aCount, char16_t*** a##_field)
return NS_ERROR_OUT_OF_MEMORY; \
} \
for (uint32_t i = 0; i < count; i++) { \
if(m##_field[i].IsVoid()) { \
(temp)[i] = nullptr; \
continue; \
} \
\
(temp)[i] = ToNewUnicode(m##_field[i]); \
if (!(temp)[i]) { \
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(i, temp); \

View File

@ -86,13 +86,8 @@ function IccContact(aContact) {
this._numbers = [];
this._emails = [];
if (aContact.alphaId) {
this._names.push(aContact.alphaId);
}
if (aContact.number) {
this._numbers.push(aContact.number);
}
this._names.push(aContact.alphaId);
this._numbers.push(aContact.number);
let anrLen = aContact.anr ? aContact.anr.length : 0;
for (let i = 0; i < anrLen; i++) {

View File

@ -51,7 +51,9 @@ IccIPCUtils::GetIccContactDataFromIccContact(nsIIccContact* aContact,
NS_ENSURE_SUCCESS_VOID(rv);
if (count > 0) {
for (uint32_t i = 0; i < count; i++) {
aOutData.names().AppendElement(nsDependentString(rawStringArray[i]));
aOutData.names().AppendElement(
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: NullString());
}
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
}
@ -63,7 +65,9 @@ IccIPCUtils::GetIccContactDataFromIccContact(nsIIccContact* aContact,
NS_ENSURE_SUCCESS_VOID(rv);
if (count > 0) {
for (uint32_t i = 0; i < count; i++) {
aOutData.numbers().AppendElement(nsDependentString(rawStringArray[i]));
aOutData.numbers().AppendElement(
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: NullString());
}
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
}
@ -75,7 +79,9 @@ IccIPCUtils::GetIccContactDataFromIccContact(nsIIccContact* aContact,
NS_ENSURE_SUCCESS_VOID(rv);
if (count > 0) {
for (uint32_t i = 0; i < count; i++) {
aOutData.emails().AppendElement(nsDependentString(rawStringArray[i]));
aOutData.emails().AppendElement(
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: NullString());
}
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
}

View File

@ -30,6 +30,14 @@ var TEST_ADD_DATA = [{
name: ["add6"],
tel: [{value: "01234567890123456789"}, {value: "123456"}, {value: "123"}],
email:[{value: "test@mozilla.com"}],
}, {
// a contact without number.
name: ["add7"],
tel: [{value: ""}],
}, {
// a contact without name.
name: [""],
tel: [{value: "0987654321"}],
}];
function testAddContact(aIcc, aType, aMozContact, aPin2) {

View File

@ -25,7 +25,7 @@ const TEST_UPDATE_DATA = [{
name: ["Fire 火"],
tel: [{value: ""}]},
expect: {
number: null}
number: ""}
}, {
id: 5,
data: {
@ -52,12 +52,8 @@ function testUpdateContact(aIcc, aType, aContactId, aMozContact, aExpect, aPin2)
return aIcc.updateContact(aType, contact, aPin2)
.then((aResult) => {
if (aExpect.number === null) {
is(aResult.tel, null);
} else {
is(aResult.tel[0].value, aExpect.number);
ok(aResult.tel.length == 1);
}
is(aResult.tel[0].value, aExpect.number);
ok(aResult.tel.length == 1);
// We only support SIM in emulator, so we don't have anr and email field.
ok(!aResult.email);
is(contact.id, aIcc.iccInfo.iccid + aContactId);
@ -101,11 +97,7 @@ function testUpdateContacts(aIcc, aType, aCacheContacts, aPin2) {
is(contact.name[0], expectedResult.data.name[0]);
is(contact.id, aIcc.iccInfo.iccid + expectedResult.id);
if (expectedResult.expect.number === null) {
is(contact.tel, null);
} else {
is(contact.tel[0].value, expectedResult.expect.number);
}
is(contact.tel[0].value, expectedResult.expect.number);
}
return revertContacts(aIcc, aCacheContacts, aType, aPin2);
});

View File

@ -346,6 +346,7 @@ public:
private:
static uint32_t sBackgroundPerceivableGracePeriodMS;
static uint32_t sBackgroundGracePeriodMS;
static uint32_t sMemoryPressureGracePeriodMS;
void FireTestOnlyObserverNotification(
const char* aTopic,
@ -370,6 +371,7 @@ private:
nsAutoCString mNameWithComma;
nsCOMPtr<nsITimer> mResetPriorityTimer;
nsCOMPtr<nsITimer> mMemoryPressureTimer;
};
/* static */ bool ProcessPriorityManagerImpl::sInitialized = false;
@ -382,6 +384,7 @@ private:
ProcessPriorityManagerImpl::sSingleton;
/* static */ uint32_t ParticularProcessPriorityManager::sBackgroundPerceivableGracePeriodMS = 0;
/* static */ uint32_t ParticularProcessPriorityManager::sBackgroundGracePeriodMS = 0;
/* static */ uint32_t ParticularProcessPriorityManager::sMemoryPressureGracePeriodMS = 0;
NS_IMPL_ISUPPORTS(ProcessPriorityManagerImpl,
nsIObserver,
@ -701,6 +704,8 @@ ParticularProcessPriorityManager::StaticInit()
"dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS");
Preferences::AddUintVarCache(&sBackgroundGracePeriodMS,
"dom.ipc.processPriorityManager.backgroundGracePeriodMS");
Preferences::AddUintVarCache(&sMemoryPressureGracePeriodMS,
"dom.ipc.processPriorityManager.memoryPressureGracePeriodMS");
}
void
@ -1014,10 +1019,21 @@ ParticularProcessPriorityManager::ScheduleResetPriority(TimeoutPref aTimeoutPref
NS_IMETHODIMP
ParticularProcessPriorityManager::Notify(nsITimer* aTimer)
{
LOGP("Reset priority timer callback; about to ResetPriorityNow.");
ResetPriorityNow();
mResetPriorityTimer = nullptr;
return NS_OK;
if (mResetPriorityTimer == aTimer) {
LOGP("Reset priority timer callback; about to ResetPriorityNow.");
ResetPriorityNow();
mResetPriorityTimer = nullptr;
return NS_OK;
}
if (mContentParent && mMemoryPressureTimer == aTimer) {
Unused << mContentParent->SendFlushMemory(NS_LITERAL_STRING("lowering-priority"));
mMemoryPressureTimer = nullptr;
return NS_OK;
}
NS_WARNING("Unexpected timer!");
return NS_ERROR_INVALID_POINTER;
}
bool
@ -1142,10 +1158,18 @@ ParticularProcessPriorityManager::SetPriorityNow(ProcessPriority aPriority,
NotifyProcessPriorityChanged(this, oldPriority);
Unused << mContentParent->SendNotifyProcessPriorityChanged(mPriority);
}
if (aPriority < PROCESS_PRIORITY_FOREGROUND) {
Unused << mContentParent->SendFlushMemory(NS_LITERAL_STRING("lowering-priority"));
if (mMemoryPressureTimer) {
mMemoryPressureTimer->Cancel();
mMemoryPressureTimer = nullptr;
}
if (aPriority < PROCESS_PRIORITY_FOREGROUND) {
mMemoryPressureTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
mMemoryPressureTimer->InitWithCallback(this,
sMemoryPressureGracePeriodMS,
nsITimer::TYPE_ONE_SHOT);
}
}
FireTestOnlyObserverNotification("process-priority-set",

View File

@ -8689,7 +8689,7 @@ ICCPDUHelperObject.prototype = {
* 0xff.
* @param str String to be written. Could be null.
*
* @return The string has been written into Buf.
* @return The string has been written into Buf. "" if str is null.
*/
writeStringTo8BitUnpacked: function(numOctets, str) {
const langTable = PDU_NL_LOCKING_SHIFT_TABLES[PDU_NL_IDENTIFIER_DEFAULT];
@ -8729,7 +8729,7 @@ ICCPDUHelperObject.prototype = {
GsmPDUHelper.writeHexOctet(0xff);
}
return (str) ? str.substring(0, i) : null;
return (str) ? str.substring(0, i) : "";
},
/**
@ -9090,7 +9090,7 @@ ICCPDUHelperObject.prototype = {
*/
writeAlphaIdentifier: function(numOctets, alphaId) {
if (numOctets === 0) {
return null;
return "";
}
// If alphaId is empty or it's of GSM 8 bit.
@ -9222,7 +9222,7 @@ ICCPDUHelperObject.prototype = {
for (let i = 0; i < ADN_MAX_BCD_NUMBER_BYTES + 1; i++) {
GsmPDUHelper.writeHexOctet(0xff);
}
return null;
return "";
}
}
};

View File

@ -367,7 +367,7 @@ add_test(function test_write_alpha_identifier() {
// Removal
let writenAlphaId = iccHelper.writeAlphaIdentifier(10, null);
equal(writenAlphaId, null);
equal(writenAlphaId, "");
equal(iccHelper.readAlphaIdentifier(10), "");
// GSM 8 bit
@ -401,7 +401,7 @@ add_test(function test_write_alpha_identifier() {
// Write 0 octet.
writenAlphaId = iccHelper.writeAlphaIdentifier(0, "1");
helper.writeHexOctet(0xff); // dummy octet.
equal(writenAlphaId, null);
equal(writenAlphaId, "");
equal(iccHelper.readAlphaIdentifier(1), "");
run_next_test();
@ -490,8 +490,8 @@ add_test(function test_write_alpha_id_dialling_number() {
writtenContact = helper.writeAlphaIdDiallingNumber(recordSize);
contactR = helper.readAlphaIdDiallingNumber(recordSize);
equal(contactR, null);
equal(writtenContact.alphaId, null);
equal(writtenContact.number, null);
equal(writtenContact.alphaId, "");
equal(writtenContact.number, "");
// Write a longer alphaId/dialling number
// Dialling Number : Maximum 20 digits(10 octets).

View File

@ -38,6 +38,7 @@ config = {
"GAIA_OPTIMIZE": "1",
"WGET_OPTS": "-c -q"
},
"update_types": [ "ota", "fota" ],
"is_automation": True,
"repo_remote_mappings": {
'https://android.googlesource.com/': 'https://git.mozilla.org/external/aosp',

View File

@ -7,10 +7,8 @@ config = {
'build',
'build-symbols',
'make-updates',
'prep-upload',
'submit-to-balrog'
'prep-upload'
],
"balrog_credentials_file": "balrog_credentials",
"nightly_build": True,
"env": {
"GAIA_OPTIMIZE": "1",
@ -21,8 +19,10 @@ config = {
"BOWER_FLAGS": "--allow-root",
"B2G_PATH": "%(work_dir)s",
"GAIA_DISTRIBUTION_DIR": "%(work_dir)s/gaia/distros/spark",
"WGET_OPTS": "-c -q"
"WGET_OPTS": "-c -q",
"B2G_FOTA_FULLIMG_PARTS": "/boot:boot.img /system:system.img /recovery:recovery.img"
},
"update_types": [ "ota", "fota", "fota:fullimg" ],
"is_automation": True,
"repo_remote_mappings": {
'https://android.googlesource.com/': 'https://git.mozilla.org/external/aosp',

View File

@ -165,14 +165,16 @@ class B2GBuild(LocalesMixin, PurgeMixin,
self.objdir = self.config.get("gecko_objdir",
os.path.join(dirs['work_dir'], 'objdir-gecko'))
self.abs_dirs['abs_obj_dir'] = self.objdir
if self.config.get("update_type", "ota") == "fota":
self.make_updates_cmd = ['./build.sh', 'gecko-update-fota']
self.extra_update_attrs = 'isOsUpdate="true"'
self.isOSUpdate = True
# Evaluating the update type to build.
# Default is OTA if config do not specifies anything
if "update_types" in self.config:
self.update_types = self.config["update_types"]
elif "update_type" in self.config:
self.update_types = [self.config["update_type"]]
else:
self.make_updates_cmd = ['./build.sh', 'gecko-update-full']
self.extra_update_attrs = None
self.isOSUpdate = False
self.update_types = ["ota"]
self.package_urls = {}
# We need to create the virtualenv directly (without using an action) in
@ -306,31 +308,55 @@ class B2GBuild(LocalesMixin, PurgeMixin,
output_dir = os.path.join(dirs['work_dir'], 'out', 'target', 'product', devicedir)
return output_dir
def query_device_name(self):
return os.path.basename(self.query_device_outputdir())
def query_application_ini(self):
return os.path.join(self.query_device_outputdir(), 'system', 'b2g', 'application.ini')
def query_marfile_path(self):
if self.config.get("update_type", "ota") == "fota":
def query_marfile_path(self, update_type):
if update_type.startswith("fota"):
mardir = self.query_device_outputdir()
else:
mardir = "%s/dist/b2g-update" % self.objdir
device_name = self.query_device_name()
update_type_files = {
'ota': 'b2g-%s-gecko-update.mar' % device_name,
'fota': 'fota-%s-update.mar' % device_name,
'fota:full': 'fota-%s-update-full.mar' % device_name,
'fota:fullimg': 'fota-%s-update-fullimg.mar' % device_name
}
mars = []
for f in os.listdir(mardir):
if f.endswith(".mar"):
if f.endswith(update_type_files[update_type]):
mars.append(f)
if len(mars) != 1:
if len(mars) < 1:
self.fatal("Found none or too many marfiles in %s, don't know what to do:\n%s" % (mardir, mars), exit_code=1)
return "%s/%s" % (mardir, mars[0])
def query_complete_mar_url(self):
def query_complete_mar_url(self, marfile=None):
mar_url = None
if "complete_mar_url" in self.config:
return self.config["complete_mar_url"]
if "completeMarUrl" in self.package_urls:
return self.package_urls["completeMarUrl"]
self.fatal("Couldn't find complete mar url in config or package_urls")
mar_url = self.config["complete_mar_url"]
elif "completeMarUrl" in self.package_urls:
mar_url = self.package_urls["completeMarUrl"]
else:
self.fatal("Couldn't find complete mar url in config or package_urls")
# To support OTA and FOTA update payload, we cannot rely on the filename
# being computed before we get called since we will determine the filename
# ourselves. Let's detect when the URL does not ends with ".mar" and in
# this case, we append the MAR file we just collected
if not mar_url.endswith(".mar"):
if marfile is not None:
self.fatal("URL does not contains a MAR file and none found")
mar_url = os.path.join(mar_url, os.path.basename(marfile))
return mar_url
# Actions {{{2
def clobber(self):
@ -613,36 +639,39 @@ class B2GBuild(LocalesMixin, PurgeMixin,
self.fatal("failed to upload symbols", exit_code=2)
def make_updates(self):
if not self.query_is_nightly():
self.info("Not a nightly build. Skipping...")
return
if not self.update_types:
self.fatal("No update types defined. We should have had at least defaulted to OTA ...")
dirs = self.query_abs_dirs()
self.load_gecko_config()
cmd = self.make_updates_cmd[:]
env = self.query_build_env()
self.enable_mock()
retval = self.run_command(cmd, cwd=dirs['work_dir'], env=env, error_list=B2GMakefileErrorList)
self.disable_mock()
for update_type in self.update_types:
# Defaulting to OTA
make_target = "gecko-update-full"
if retval != 0:
self.fatal("failed to create complete update", exit_code=2)
# Building a FOTA with only Gecko/Gaia (+ a few redistribuable)
if update_type == "fota":
make_target = "gecko-update-fota"
# Sign the updates
self.sign_updates()
# Building a FOTA with all system partition files
if update_type == "fota:full":
make_target = "gecko-update-fota-full"
def sign_updates(self):
if 'MOZ_SIGNING_SERVERS' not in os.environ:
self.info("Skipping signing since no MOZ_SIGNING_SERVERS set")
return
# Building a FOTA with full partitions images
if update_type == "fota:fullimg":
make_target = "gecko-update-fota-fullimg"
self.checkout_tools()
cmd = self.query_moz_sign_cmd(formats=['b2gmar'])
cmd.append(self.query_marfile_path())
cmd = ['./build.sh', make_target]
retval = self.run_command(cmd)
if retval != 0:
self.fatal("failed to sign complete update", exit_code=2)
self.enable_mock()
retval = self.run_command(cmd, cwd=dirs['work_dir'], env=env, error_list=B2GMakefileErrorList)
self.disable_mock()
if retval != 0:
self.fatal("failed to create update", exit_code=2)
def prep_upload(self):
if not self.query_do_upload():
@ -722,8 +751,7 @@ class B2GBuild(LocalesMixin, PurgeMixin,
if base_pattern in public_upload_patterns:
public_files.append(f)
device_name = os.path.basename(output_dir)
blobfree_dist = device_name + '.blobfree-dist.zip'
blobfree_dist = self.query_device_name() + '.blobfree-dist.zip'
blobfree_zip = os.path.join(output_dir, blobfree_dist)
if os.path.exists(blobfree_zip):
@ -1081,32 +1109,34 @@ class B2GBuild(LocalesMixin, PurgeMixin,
self.checkout_tools()
marfile = self.query_marfile_path()
# Need to update the base url to point at FTP, or better yet, read post_upload.py output?
mar_url = self.query_complete_mar_url()
for update_type in self.update_types:
marfile = self.query_marfile_path(update_type)
# Need to update the base url to point at FTP, or better yet, read
# post_upload.py output?
mar_url = self.query_complete_mar_url(marfile)
# Set other necessary properties for Balrog submission. None need to
# be passed back to buildbot, so we won't write them to the properties
# files.
# Locale is hardcoded to en-US, for silly reasons
self.set_buildbot_property("locale", "en-US")
self.set_buildbot_property("appVersion", self.query_version())
# The Balrog submitter translates this platform into a build target
# via https://github.com/mozilla/build-tools/blob/master/lib/python/release/platforms.py#L23
if "platform" in self.config:
self.set_buildbot_property("platform", self.config["platform"])
else:
self.set_buildbot_property("platform", self.buildbot_config["properties"]["platform"])
# TODO: Is there a better way to get this?
self.set_buildbot_property("appName", "B2G")
# TODO: don't hardcode
self.set_buildbot_property("hashType", "sha512")
self.set_buildbot_property("completeMarSize", self.query_filesize(marfile))
self.set_buildbot_property("completeMarHash", self.query_sha512sum(marfile))
self.set_buildbot_property("completeMarUrl", mar_url)
self.set_buildbot_property("isOSUpdate", self.isOSUpdate)
# Set other necessary properties for Balrog submission. None need to
# be passed back to buildbot, so we won't write them to the properties
# files.
# Locale is hardcoded to en-US, for silly reasons
self.set_buildbot_property("locale", "en-US")
self.set_buildbot_property("appVersion", self.query_version())
# The Balrog submitter translates this platform into a build target
# via https://github.com/mozilla/build-tools/blob/master/lib/python/release/platforms.py#L23
if "platform" in self.config:
self.set_buildbot_property("platform", self.config["platform"])
else:
self.set_buildbot_property("platform", self.buildbot_config["properties"]["platform"])
# TODO: Is there a better way to get this?
self.set_buildbot_property("appName", "B2G")
# TODO: don't hardcode
self.set_buildbot_property("hashType", "sha512")
self.set_buildbot_property("completeMarSize", self.query_filesize(marfile))
self.set_buildbot_property("completeMarHash", self.query_sha512sum(marfile))
self.set_buildbot_property("completeMarUrl", mar_url)
self.set_buildbot_property("isOSUpdate", update_type.startswith("fota"))
self.submit_balrog_updates(product='b2g')
self.submit_balrog_updates(product='b2g')
@PostScriptRun
def _remove_userconfig(self):

View File

@ -11,7 +11,6 @@ fi
PLATFORM=${TARGET%%-*}
aws s3 cp s3://b2g-nightly-credentials/balrog_credentials .
mar_file=b2g-$PLATFORM-gecko-update.mar
# We need different platform names for each variant (user, userdebug and
# eng). We do not append variant suffix for "user" to keep compability with
@ -41,6 +40,6 @@ $WORKSPACE/gecko/testing/mozharness/scripts/b2g_build.py \
--repo=$WORKSPACE/gecko \
--platform $PLATFORM \
--gecko-objdir=$gecko_objdir \
--complete-mar-url https://queue.taskcluster.net/v1/task/$TASK_ID/runs/$RUN_ID/artifacts/public/build/$mar_file
--complete-mar-url https://queue.taskcluster.net/v1/task/$TASK_ID/runs/$RUN_ID/artifacts/public/build/
. post-build.sh

View File

@ -17,6 +17,11 @@ mv $WORKSPACE/B2G/upload/b2g-*.android-arm.tar.gz $HOME/artifacts/b2g-android-ar
mv $WORKSPACE/B2G/upload/${TARGET}.zip $HOME/artifacts/${TARGET}.zip
mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip
# Upload public images as public artifacts on Nexus 4 KK and Nexus 5 L
if [ "${TARGET}" = "nexus-4-kk" -o "${TARGET}" = "nexus-5-l" ]; then
mv $HOME/artifacts/${TARGET}.zip $HOME/artifacts-public/
fi
if [ -f $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip ]; then
mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip
fi
@ -25,8 +30,19 @@ if [ -f $WORKSPACE/B2G/upload-public/*.blobfree-dist.zip ]; then
mv $WORKSPACE/B2G/upload-public/*.blobfree-dist.zip $HOME/artifacts-public/
fi
if [ -f $WORKSPACE/B2G/upload-public/$mar_file ]; then
mv $WORKSPACE/B2G/upload-public/$mar_file $HOME/artifacts-public/
# FOTA full and fullimg might contain blobs
if [ -f $WORKSPACE/B2G/upload/fota-*-update-*.mar ]; then
mv $WORKSPACE/B2G/upload/fota-*-update-*.mar $HOME/artifacts/
fi
# Gecko/Gaia OTA is clean
if [ -f $WORKSPACE/B2G/upload-public/b2g-*-gecko-update.mar ]; then
mv $WORKSPACE/B2G/upload-public/b2g-*-gecko-update.mar $HOME/artifacts-public/
fi
# Gecko/Gaia FOTA is clean
if [ -f $WORKSPACE/B2G/upload-public/fota-*-update.mar ]; then
mv $WORKSPACE/B2G/upload-public/fota-*-update.mar $HOME/artifacts-public/
fi
ccache -s

View File

@ -61,6 +61,7 @@ flags:
- flame-kk # b2g flame kitkat
- flame-kk-eng # b2g flame eng build
- flame-kk-spark-eng
- flame-kk-ota
- nexus-4
- nexus-4-eng
- nexus-4-kk

View File

@ -31,6 +31,14 @@ builds:
task: tasks/builds/b2g_aries_spark_ota_opt.yml
debug:
task: tasks/builds/b2g_aries_spark_ota_debug.yml
flame-kk-ota:
platforms:
- b2g
types:
opt:
task: tasks/builds/b2g_flame_kk_ota_opt.yml
debug:
task: tasks/builds/b2g_flame_kk_ota_debug.yml
post-build:
simulator:

View File

@ -16,7 +16,6 @@ task:
env:
VARIANT: userdebug
DOGFOOD: 1
HARDWARE_COMPOSER: 0
MOZHARNESS_CONFIG: b2g/taskcluster-spark-dogfood.py
extra:
treeherderEnv:

View File

@ -1,5 +1,8 @@
$inherits:
from: 'tasks/builds/b2g_dolphin_base.yml'
variables:
build_name: 'dolphin-512-eng'
build_type: 'opt'
task:
scopes:
- 'docker-worker:cache:build-dolphin-512-eng'

View File

@ -1,5 +1,8 @@
$inherits:
from: 'tasks/builds/b2g_dolphin_base.yml'
variables:
build_name: 'dolphin-512'
build_type: 'opt'
task:
scopes:
- 'docker-worker:cache:build-dolphin-512-opt'

View File

@ -1,5 +1,8 @@
$inherits:
from: 'tasks/builds/b2g_dolphin_base.yml'
variables:
build_name: 'dolphin-eng'
build_type: 'opt'
task:
scopes:
- 'docker-worker:cache:build-dolphin-eng'

View File

@ -1,5 +1,8 @@
$inherits:
from: 'tasks/builds/b2g_dolphin_base.yml'
variables:
build_name: 'dolphin'
build_type: 'opt'
task:
scopes:
- 'docker-worker:cache:build-dolphin-opt'