forked from mirrors/gecko-dev
Bug 1506559 - Enable ESLint for memory/replace/dmd/test/. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D11619 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8d34d6b733
commit
50fbf54ef3
3 changed files with 14 additions and 11 deletions
|
|
@ -26,7 +26,6 @@ gfx/tests/chrome/**
|
||||||
gfx/tests/mochitest/**
|
gfx/tests/mochitest/**
|
||||||
image/**
|
image/**
|
||||||
layout/**
|
layout/**
|
||||||
memory/replace/dmd/test/**
|
|
||||||
modules/**
|
modules/**
|
||||||
netwerk/cookie/test/browser/**
|
netwerk/cookie/test/browser/**
|
||||||
netwerk/test/browser/**
|
netwerk/test/browser/**
|
||||||
|
|
|
||||||
7
memory/replace/dmd/test/.eslintrc.js
Normal file
7
memory/replace/dmd/test/.eslintrc.js
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
"extends": [
|
||||||
|
"plugin:mozilla/xpcshell-test"
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
@ -6,9 +6,8 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var {classes: Cc, interfaces: Ci, utils: Cu} = Components
|
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
|
||||||
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
// The xpcshell test harness sets PYTHON so we can read it here.
|
// The xpcshell test harness sets PYTHON so we can read it here.
|
||||||
var gEnv = Cc["@mozilla.org/process/environment;1"]
|
var gEnv = Cc["@mozilla.org/process/environment;1"]
|
||||||
|
|
@ -30,8 +29,7 @@ function getExecutable(aFilename) {
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
var gIsWindows = Cc["@mozilla.org/xre/app-info;1"]
|
var gIsWindows = Services.appinfo.OS === "WINNT";
|
||||||
.getService(Ci.nsIXULRuntime).OS === "WINNT";
|
|
||||||
var gDmdTestFile = getExecutable("SmokeDMD" + (gIsWindows ? ".exe" : ""));
|
var gDmdTestFile = getExecutable("SmokeDMD" + (gIsWindows ? ".exe" : ""));
|
||||||
|
|
||||||
var gDmdScriptFile = getExecutable("dmd.py");
|
var gDmdScriptFile = getExecutable("dmd.py");
|
||||||
|
|
@ -78,7 +76,7 @@ function test(aPrefix, aArgs) {
|
||||||
let args = [
|
let args = [
|
||||||
gDmdScriptFile.path,
|
gDmdScriptFile.path,
|
||||||
"--filter-stacks-for-testing",
|
"--filter-stacks-for-testing",
|
||||||
"-o", actualFile.path
|
"-o", actualFile.path,
|
||||||
].concat(aArgs);
|
].concat(aArgs);
|
||||||
|
|
||||||
runProcess(new FileUtils.File(gPythonName), args);
|
runProcess(new FileUtils.File(gPythonName), args);
|
||||||
|
|
@ -136,7 +134,7 @@ function run_test() {
|
||||||
// in-place (to fix stacks) when it runs dmd.py, and that's not safe to do
|
// in-place (to fix stacks) when it runs dmd.py, and that's not safe to do
|
||||||
// asynchronously.
|
// asynchronously.
|
||||||
|
|
||||||
gEnv.set('DMD', '1');
|
gEnv.set("DMD", "1");
|
||||||
|
|
||||||
runProcess(gDmdTestFile, []);
|
runProcess(gDmdTestFile, []);
|
||||||
|
|
||||||
|
|
@ -165,8 +163,7 @@ function run_test() {
|
||||||
jsonFile = FileUtils.getFile("CurWorkD", ["basic-scan.json"]);
|
jsonFile = FileUtils.getFile("CurWorkD", ["basic-scan.json"]);
|
||||||
ok(scanTest(jsonFile.path), "Basic scan test");
|
ok(scanTest(jsonFile.path), "Basic scan test");
|
||||||
|
|
||||||
let is64Bit = Cc["@mozilla.org/xre/app-info;1"]
|
let is64Bit = Services.appinfo.is64Bit;
|
||||||
.getService(Ci.nsIXULRuntime).is64Bit;
|
|
||||||
let basicScanFileName = "basic-scan-" + (is64Bit ? "64" : "32");
|
let basicScanFileName = "basic-scan-" + (is64Bit ? "64" : "32");
|
||||||
test(basicScanFileName, ["--clamp-contents", jsonFile.path]);
|
test(basicScanFileName, ["--clamp-contents", jsonFile.path]);
|
||||||
ok(scanTest(jsonFile.path, ["--clamp-contents"]), "Scan with address clamping");
|
ok(scanTest(jsonFile.path, ["--clamp-contents"]), "Scan with address clamping");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue