forked from mirrors/gecko-dev
Bug 1898801 - Fix tests on mac which use python2 to use python3 on macosx 14.x+. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D211604
This commit is contained in:
parent
c143f86d86
commit
15a6a58ab8
2 changed files with 11 additions and 2 deletions
|
|
@ -5,7 +5,12 @@ const NS_OSX_PICTURE_DOCUMENTS_DIR = "Pct";
|
|||
// 1) check the desktop background image matches what we set it to via
|
||||
// nsIShellService::setDesktopBackground() and
|
||||
// 2) revert the desktop background image to the OS default
|
||||
const kPythonPath = "/usr/bin/python";
|
||||
|
||||
let kPythonPath = "/usr/bin/python";
|
||||
if (AppConstants.isPlatformAndVersionAtLeast("macosx", 23.0)) {
|
||||
kPythonPath = "/usr/local/bin/python3";
|
||||
}
|
||||
|
||||
const kDesktopCheckerScriptPath =
|
||||
"browser/browser/components/shell/test/mac_desktop_image.py";
|
||||
const kDefaultBackgroundImage_10_14 =
|
||||
|
|
@ -19,6 +24,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
|
||||
function getPythonExecutableFile() {
|
||||
let python = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
|
||||
info(`Using python at location ${kPythonPath}`);
|
||||
python.initWithPath(kPythonPath);
|
||||
return python;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ const kPageURL =
|
|||
"http://example.com/browser/security/sandbox/test/bug1393259.html";
|
||||
|
||||
// Parameters for running the python script that registers/unregisters fonts.
|
||||
const kPythonPath = "/usr/bin/python";
|
||||
let kPythonPath = "/usr/bin/python";
|
||||
if (AppConstants.isPlatformAndVersionAtLeast("macosx", 23.0)) {
|
||||
kPythonPath = "/usr/local/bin/python3";
|
||||
}
|
||||
const kFontInstallerPath = "browser/security/sandbox/test/mac_register_font.py";
|
||||
const kUninstallFlag = "-u";
|
||||
const kVerboseFlag = "-v";
|
||||
|
|
|
|||
Loading…
Reference in a new issue