Bug 1151184 - Don't run test_load_modules and bagheera* tests for builds without MOZ_SERVICES_HEALTHREPORT. r=rnewman

This commit is contained in:
Sebastian Hengst 2015-04-04 17:37:30 +02:00
parent 8d104e86c2
commit 976fb13bd7
2 changed files with 16 additions and 4 deletions

View File

@ -13,20 +13,26 @@ const shared_modules = [
];
const non_android_modules = [
"bagheeraclient.js",
"tokenserverclient.js",
];
const non_android_healthreport_modules = [
"bagheeraclient.js",
];
const TEST_BASE = "resource://testing-common/services/common/";
const shared_test_modules = [
"logging.js",
];
const non_android_test_modules = [
"bagheeraserver.js",
"storageserver.js",
];
const non_android_healthreport_test_modules = [
"bagheeraserver.js",
];
function expectImportsToSucceed(mm, base=MODULE_BASE) {
for each (let m in mm) {
let resource = base + m;
@ -56,8 +62,14 @@ function run_test() {
if (AppConstants.platform != "android") {
expectImportsToSucceed(non_android_modules);
expectImportsToSucceed(non_android_test_modules, base=TEST_BASE);
if (AppConstants.MOZ_SERVICES_HEALTHREPORT) {
expectImportsToSucceed(non_android_healthreport_modules);
expectImportsToSucceed(non_android_healthreport_test_modules, base=TEST_BASE);
}
} else {
expectImportsToFail(non_android_modules);
expectImportsToFail(non_android_test_modules, base=TEST_BASE);
expectImportsToFail(non_android_healthreport_modules);
expectImportsToFail(non_android_healthreport_test_modules, base=TEST_BASE);
}
}

View File

@ -27,10 +27,10 @@ skip-if = toolkit == 'gonk'
[test_async_querySpinningly.js]
[test_bagheera_server.js]
skip-if = os == "android"
skip-if = (os == "android" || !healthreport)
[test_bagheera_client.js]
skip-if = os == "android"
skip-if = (os == "android" || !healthreport)
[test_hawkclient.js]
skip-if = os == "android"