зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1541508 - Use Services.env in tools/ r=marco
Differential Revision: https://phabricator.services.mozilla.com/D160150
This commit is contained in:
Родитель
c69d38ba19
Коммит
bff6b9dd65
|
@ -8,17 +8,14 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["PerTestCoverageUtils"];
|
||||
|
||||
const env = Cc["@mozilla.org/process/environment;1"].getService(
|
||||
Ci.nsIEnvironment
|
||||
);
|
||||
// This is the directory where gcov is emitting the gcda files.
|
||||
const gcovPrefixPath = env.get("GCOV_PREFIX");
|
||||
const gcovPrefixPath = Services.env.get("GCOV_PREFIX");
|
||||
// This is the directory where codecoverage.py is expecting to see the gcda files.
|
||||
const gcovResultsPath = env.get("GCOV_RESULTS_DIR");
|
||||
const gcovResultsPath = Services.env.get("GCOV_RESULTS_DIR");
|
||||
// This is the directory where the JS engine is emitting the lcov files.
|
||||
const jsvmPrefixPath = env.get("JS_CODE_COVERAGE_OUTPUT_DIR");
|
||||
const jsvmPrefixPath = Services.env.get("JS_CODE_COVERAGE_OUTPUT_DIR");
|
||||
// This is the directory where codecoverage.py is expecting to see the lcov files.
|
||||
const jsvmResultsPath = env.get("JSVM_RESULTS_DIR");
|
||||
const jsvmResultsPath = Services.env.get("JSVM_RESULTS_DIR");
|
||||
|
||||
const gcovPrefixDir = Cc["@mozilla.org/file/local;1"].createInstance(
|
||||
Ci.nsIFile
|
||||
|
|
|
@ -7,11 +7,8 @@ var { AppConstants } = ChromeUtils.importESModule(
|
|||
);
|
||||
|
||||
function getFiles() {
|
||||
const env = Cc["@mozilla.org/process/environment;1"].getService(
|
||||
Ci.nsIEnvironment
|
||||
);
|
||||
// This is the directory where gcov is emitting the gcda files.
|
||||
const jsCoveragePath = env.get("JS_CODE_COVERAGE_OUTPUT_DIR");
|
||||
const jsCoveragePath = Services.env.get("JS_CODE_COVERAGE_OUTPUT_DIR");
|
||||
|
||||
const jsCoverageDir = Cc["@mozilla.org/file/local;1"].createInstance(
|
||||
Ci.nsIFile
|
||||
|
|
|
@ -121,10 +121,7 @@ function findServiceWorkerThreads(profile) {
|
|||
allThreads.forEach(logInformationForThread.bind(null, ""));
|
||||
|
||||
// Let's write the profile on disk if MOZ_UPLOAD_DIR is present
|
||||
const env = Cc["@mozilla.org/process/environment;1"].getService(
|
||||
Ci.nsIEnvironment
|
||||
);
|
||||
const path = env.get("MOZ_UPLOAD_DIR");
|
||||
const path = Services.env.get("MOZ_UPLOAD_DIR");
|
||||
if (path) {
|
||||
const profileName = `profile_${Date.now()}.json`;
|
||||
const profilePath = PathUtils.join(path, profileName);
|
||||
|
|
Загрузка…
Ссылка в новой задаче