mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Test only patch - Bug 899709 - gIsLessThanMacOSX_10_6 is no longer needed in head_update.js.in. r=bbondy
This commit is contained in:
parent
678304daf8
commit
1fea4216ab
@ -1961,10 +1961,6 @@ function getProcessArgs(aExtraArgs) {
|
||||
launchScript.create(AUS_Ci.nsILocalFile.NORMAL_FILE_TYPE, PERMS_DIRECTORY);
|
||||
|
||||
let scriptContents = "#! /bin/sh\n";
|
||||
// On Mac OS X versions prior to 10.6 the i386 acrhitecture must be used.
|
||||
if (gIsLessThanMacOSX_10_6) {
|
||||
scriptContents += "arch -arch i386 ";
|
||||
}
|
||||
scriptContents += gAppBinPath + " -no-remote -process-updates " +
|
||||
aExtraArgs.join(" ") + " 1> " +
|
||||
appConsoleLogPath + " 2>&1";
|
||||
@ -2034,45 +2030,6 @@ function getLaunchScript() {
|
||||
return launchScript;
|
||||
}
|
||||
|
||||
// A shell script is used to get the OS version due to nsSystemInfo not
|
||||
// returning the actual OS version. It is possible to get the actual OS version
|
||||
// using ctypes but it would be more complicated than using a shell script.
|
||||
XPCOMUtils.defineLazyGetter(this, "gIsLessThanMacOSX_10_6", function test_gMacVer() {
|
||||
if (!IS_MACOSX) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let [versionScript, versionFile] = getVersionScriptAndFile();
|
||||
// Precreate the script with executable permissions
|
||||
versionScript.create(AUS_Ci.nsILocalFile.NORMAL_FILE_TYPE, PERMS_DIRECTORY);
|
||||
let scriptContents = "#! /bin/sh\nsw_vers -productVersion >> " + versionFile.path;
|
||||
writeFile(versionScript, scriptContents);
|
||||
logTestInfo("created " + versionScript.path + " shell script containing:\n" +
|
||||
scriptContents);
|
||||
|
||||
let versionScriptPath = versionScript.path;
|
||||
if (/ /.test(versionScriptPath)) {
|
||||
versionScriptPath = '"' + versionScriptPath + '"';
|
||||
}
|
||||
|
||||
|
||||
let launchBin = getLaunchBin();
|
||||
let args = [versionScriptPath];
|
||||
let process = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
process.init(launchBin);
|
||||
process.run(true, args, args.length);
|
||||
if (process.exitValue != 0) {
|
||||
do_throw("Version script exited with " + process.exitValue + "... unable " +
|
||||
"to get Mac OS X version!");
|
||||
}
|
||||
|
||||
let version = readFile(versionFile).split("\n")[0];
|
||||
logTestInfo("executing on Mac OS X verssion " + version);
|
||||
|
||||
return (Services.vc.compare(version, "10.6") < 0)
|
||||
});
|
||||
|
||||
/**
|
||||
* Checks for the existence of a platform specific application binary that can
|
||||
* be used for the test and gets its path if it is found.
|
||||
@ -2263,30 +2220,6 @@ let gTimerCallback = {
|
||||
QueryInterface: XPCOMUtils.generateQI([AUS_Ci.nsITimerCallback])
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the nsIFile references for the shell script to retrieve the Mac OS X
|
||||
* version and the nsIFile to pipe the output of the shell script. If either of
|
||||
* these files exist they will be removed by this function.
|
||||
*
|
||||
* @return array containing two nsIFile references. The first array member is
|
||||
* the nsIFile for the shell script to launch to get the Mac OS X
|
||||
* version and the second array member is the nsIFile for the piped
|
||||
* output from the shell script.
|
||||
*/
|
||||
function getVersionScriptAndFile() {
|
||||
let versionScript = do_get_file("/", true);
|
||||
let versionFile = versionScript.clone();
|
||||
versionScript.append("get_version.sh");
|
||||
if (versionScript.exists()) {
|
||||
versionScript.remove(false);
|
||||
}
|
||||
versionFile.append("version.out");
|
||||
if (versionFile.exists()) {
|
||||
versionFile.remove(false);
|
||||
}
|
||||
return [versionScript, versionFile];
|
||||
}
|
||||
|
||||
// Environment related globals
|
||||
let gShouldResetEnv = undefined;
|
||||
let gAddedEnvXRENoWindowsCrashDialog = false;
|
||||
|
@ -198,10 +198,6 @@ function end_test() {
|
||||
if (IS_UNIX) {
|
||||
// This will delete the launch script if it exists.
|
||||
getLaunchScript();
|
||||
if (IS_MACOSX) {
|
||||
// This will delete the version script and version file if they exist.
|
||||
getVersionScriptAndFile();
|
||||
}
|
||||
}
|
||||
|
||||
cleanUp();
|
||||
|
@ -257,10 +257,6 @@ function end_test() {
|
||||
if (IS_UNIX) {
|
||||
// This will delete the launch script if it exists.
|
||||
getLaunchScript();
|
||||
if (IS_MACOSX) {
|
||||
// This will delete the version script and version file if they exist.
|
||||
getVersionScriptAndFile();
|
||||
}
|
||||
}
|
||||
|
||||
cleanUp();
|
||||
|
@ -223,10 +223,6 @@ function end_test() {
|
||||
if (IS_UNIX) {
|
||||
// This will delete the launch script if it exists.
|
||||
getLaunchScript();
|
||||
if (IS_MACOSX) {
|
||||
// This will delete the version script and version file if they exist.
|
||||
getVersionScriptAndFile();
|
||||
}
|
||||
}
|
||||
|
||||
cleanUp();
|
||||
|
@ -286,10 +286,6 @@ function end_test() {
|
||||
if (IS_UNIX) {
|
||||
// This will delete the launch script if it exists.
|
||||
getLaunchScript();
|
||||
if (IS_MACOSX) {
|
||||
// This will delete the version script and version file if they exist.
|
||||
getVersionScriptAndFile();
|
||||
}
|
||||
}
|
||||
|
||||
cleanUp();
|
||||
|
@ -263,10 +263,6 @@ function end_test() {
|
||||
if (IS_UNIX) {
|
||||
// This will delete the launch script if it exists.
|
||||
getLaunchScript();
|
||||
if (IS_MACOSX) {
|
||||
// This will delete the version script and version file if they exist.
|
||||
getVersionScriptAndFile();
|
||||
}
|
||||
}
|
||||
|
||||
cleanUp();
|
||||
|
@ -232,10 +232,6 @@ function end_test() {
|
||||
if (IS_UNIX) {
|
||||
// This will delete the launch script if it exists.
|
||||
getLaunchScript();
|
||||
if (IS_MACOSX) {
|
||||
// This will delete the version script and version file if they exist.
|
||||
getVersionScriptAndFile();
|
||||
}
|
||||
}
|
||||
|
||||
cleanUp();
|
||||
|
@ -289,10 +289,6 @@ function end_test() {
|
||||
if (IS_UNIX) {
|
||||
// This will delete the launch script if it exists.
|
||||
getLaunchScript();
|
||||
if (IS_MACOSX) {
|
||||
// This will delete the version script and version file if they exist.
|
||||
getVersionScriptAndFile();
|
||||
}
|
||||
}
|
||||
|
||||
cleanUp();
|
||||
|
Loading…
Reference in New Issue
Block a user