bug 414056 Allow Minotaur to run back to back r=alice

This commit is contained in:
ctalbert@mozilla.com 2008-03-04 15:16:55 -08:00
parent 3083a3051f
commit 4876bdca7c
4 changed files with 21 additions and 48 deletions

View File

@ -95,16 +95,19 @@ then
usage
fi
# Get our OS and Executable name
# Get our OS and Executable and profile directory names
OS=$(python getOsInfo.py)
FFX_EXE=$(python getOsInfo.py -o $OS -f)
profileName=minotaur-"`uuidgen`"
cp ${minotaurdir}/tests.manifest $fxdir/chrome/.
cp ${minotaurdir}/tests.manifest $fxdir/chrome/tests.manifest
# Use the default profile location because Ffx 3 can't hack non-default profiles
$fxdir/$FFX_EXE -CreateProfile minotaurTestProfile
profileDir=`$fxdir/$FFX_EXE -CreateProfile $profileName 2>&1 | sed -e "s/.*at '\(.*\)[\/|\\]prefs\.js.*/\1/"`
$fxdir/$FFX_EXE -P minotaurTestProfile -chrome chrome://minotaur/content/quit.xul
# Seed that profile with our preferences
cp ${minotaurdir}/user.js "$profileDir"/user.js
$fxdir/$FFX_EXE -no-remote -P $profileName -chrome chrome://minotaur/content/quit.xul
sleep 10
# create verification repository
@ -123,7 +126,7 @@ if [ -f $resultsdir/http.log ]; then
fi
#run the extraction
$fxdir/$FFX_EXE -P minotaurTestProfile -chrome chrome://minotaur/content
$fxdir/$FFX_EXE -P $profileName -chrome chrome://minotaur/content
cp ./test-output.xml $resultsdir/test-output.xml
cp ./test-bookmarks.html $resultsdir/test-bookmarks.html
@ -137,10 +140,10 @@ else
rm $fxname/$fxver/$locale/results.log
#Perform the output.xml diff
diff $resultsdir/test-output.xml $outputVerify >> $resultsdir/results.log
diff -u $outputVerify $resultsdir/test-output.xml >> $resultsdir/results.log
# Check the Bookmarks file
python diffBookmarks.py -l $resultsdir/test-bookmarks.html -r $bookmarksVerify -f $resultsdir/results.log
python diffBookmarks.py -l $bookmarksVerify -r $resultsdir/test-bookmarks.html -f $resultsdir/results.log
# Check the Http Debug Log to catch the release channel
python checkReleaseChannel.py -d $resultsdir/http.log -r $releaseVerify -l $resultsdir/results.log
@ -162,7 +165,6 @@ rm $fxdir/chrome/tests.manifest
if [ -f ${minotaurdir}/EULA.txt ]; then
rm ${minotaurdir}/EULA.txt
fi
if [ -f ${minotaurdir}/profile.txt ]; then
python mozInstall.py -o d -d "`cat profile.txt`"
rm profile.txt
fi
# Delete the profile directory
python mozInstall.py -o d -d "$profileDir"

View File

@ -10,5 +10,4 @@
<script type="text/javascript" src="quit.js" />
<script type="text/javascript">goQuitApplication();</script>
</window>

View File

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Dave Liebreich <davel@mozilla.com>
* Clint Talbert <ctalbert@mozilla.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -92,40 +93,6 @@ function closeOutputFile() {
gConvStream.close();
}
// Print out the profile directory so that it can be deleted later
function outputProfileDir() {
// We don't want failing to write the profile stop the test, so try...catch it
try {
var dirServices = Cc["@mozilla.org/file/directory_service;1"]
.createInstance(Ci.nsIProperties);
var file = dirServices.get("CurWorkD", Components.interfaces.nsIFile);
file.append("profile.txt");
if (file.exists()) {
file.remove(false);
}
var outFile = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
const MODE_WRONLY = 0x02;
const MODE_CREATE = 0x08;
const MODE_TRUNCATE = 0x20;
const MODE_APPEND = 0x10;
outFile.init(file, MODE_WRONLY | MODE_CREATE | MODE_APPEND | MODE_TRUNCATE,
0600, 0);
// Need to create the converterStream
var convStream = Cc["@mozilla.org/intl/converter-output-stream;1"]
.createInstance(Ci.nsIConverterOutputStream);
convStream.init(outFile, "UTF-8", 0, 0x0000);
// Get the profile directory
var profD = dirServices.get("ProfD", Ci.nsIFile);
convStream.writeString(profD.path);
convStream.close();
} catch (ex) {
dump("Could not write profile directory path to profiles.txt");
}
}
function listEngines() {
// search field
var submission = null;
@ -301,7 +268,6 @@ function listUpdates() {
prompter.checkForUpdates();
}
outputProfileDir();
createOutputFile();
listEngines();
listPrefs();

View File

@ -1,2 +1,8 @@
user_pref("browser.dom.window.dump.enabled", true);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("app.update.silent", true);
user_pref("app.update.enabled", false);
user_pref("app.update.auto", false);
user_pref("extensions.update.notifyUser", false);
user_pref("extensions.checkCompatibility", false);
user_pref("browser.warnOnQuit", false);