Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | |
michael@0 | 5 | [ ] |
michael@0 | 6 | [ ] use 'property.inc' |
michael@0 | 7 | [ ] |
michael@0 | 8 | [-] testcase LoadURL () appstate none |
michael@0 | 9 | [ ] // The first few constants are to be changed according to how your machine is setup |
michael@0 | 10 | [ ] // - strPerfToolsDrive is the drive letter corresponding to the script directory |
michael@0 | 11 | [ ] // - strViewerDrive is the drive letter where the Viewer.exe is installed |
michael@0 | 12 | [ ] // - strURLPath is the full path to the file that has the URLs to process |
michael@0 | 13 | [ ] // - strPerfToolsDir is the directory where the perf tools are installed |
michael@0 | 14 | [ ] // (no drive, no trailing '\') |
michael@0 | 15 | [ ] // - strBuildBaseDir is the directory which contains the bin-directory where viewer.exe is installed |
michael@0 | 16 | [ ] // (no drive, no trailing '\') i.e. \Mozilla\dist\Win32_o.obj for a build-tree |
michael@0 | 17 | [ ] // - strMilestoneOrPull is the milestone or date of source pull if not a milestone |
michael@0 | 18 | [ ] // (this is the text put into the header of the HTML table: i.e. 'Milestone M13' or 'Pulled: 1/31/00') |
michael@0 | 19 | [ ] // - numSlashes is the number of '/' characters in the URL up to the site name |
michael@0 | 20 | [ ] // (should not change unless you move the WebSites folder) |
michael@0 | 21 | [ ] // |
michael@0 | 22 | [ ] STRING strPerfToolsDrive = "s:" |
michael@0 | 23 | [ ] STRING strViewerDrive = "d:" |
michael@0 | 24 | [ ] STRING strURLPath = "s:\Mozilla\Tools\performance\layout\40-url.txt" |
michael@0 | 25 | [ ] STRING strPerfToolsDir = "\Mozilla\Tools\Performance\layout" |
michael@0 | 26 | [ ] STRING strBuildBaseDir = "\Moz-0225" |
michael@0 | 27 | [ ] STRING strMilestoneOrPull = "Daily:022500 " |
michael@0 | 28 | [ ] INTEGER numSlashes = 10 |
michael@0 | 29 | [ ] INTEGER sleepBetweenSites = 5 |
michael@0 | 30 | [ ] |
michael@0 | 31 | [ ] STRING strViewerDir = strBuildBaseDir + "\bin" |
michael@0 | 32 | [ ] HFILE inputFile |
michael@0 | 33 | [ ] STRING sLine |
michael@0 | 34 | [ ] STRING quotedURL |
michael@0 | 35 | [ ] STRING logFile = "" |
michael@0 | 36 | [ ] STRING site |
michael@0 | 37 | [ ] INTEGER NumOfSites = 0 |
michael@0 | 38 | [ ] STRING strPerfToolsDriveCmd = strPerfToolsDrive + " <ENTER>" |
michael@0 | 39 | [ ] STRING strViewerDriveCmd = strViewerDrive + " <ENTER>" |
michael@0 | 40 | [ ] STRING strBuildIDBase = strViewerDrive + strBuildBaseDir |
michael@0 | 41 | [ ] STRING strLogPath = strPerfToolsDrive + strPerfToolsDir + "\logs" |
michael@0 | 42 | [ ] |
michael@0 | 43 | [ ] // make the logs directory (in case it does note exist already) |
michael@0 | 44 | [+] if ( !SYS_DirExists( strLogPath ) ) |
michael@0 | 45 | [ ] SYS_MakeDir( strLogPath ) |
michael@0 | 46 | [ ] // remove any ABORT.TXT file that may be around |
michael@0 | 47 | [+] if ( SYS_FileExists( strPerfToolsDrive + strPerfToolsDir + "\abort.txt" ) ) |
michael@0 | 48 | [ ] SYS_RemoveFile( strPerfToolsDrive + strPerfToolsDir + "\abort.txt" ) |
michael@0 | 49 | [ ] // Copy the history file in case there are problems |
michael@0 | 50 | [-] if( SYS_FileExists( strPerfToolsDrive + strPerfToolsDir + "\history.txt" ) ) |
michael@0 | 51 | [ ] SYS_CopyFile( strPerfToolsDrive + strPerfToolsDir + "\History.txt", strPerfToolsDrive + strPerfToolsDir + "\History_prev.txt" ) |
michael@0 | 52 | [ ] // |
michael@0 | 53 | [ ] // Start processing |
michael@0 | 54 | [ ] // |
michael@0 | 55 | [ ] inputFile = FileOpen (strURLPath, FM_READ) |
michael@0 | 56 | [ ] CommandPrompt.Invoke () |
michael@0 | 57 | [ ] sleep (2) |
michael@0 | 58 | [ ] // move to the PerfTools directory |
michael@0 | 59 | [ ] CommandPrompt.TypeKeys (strPerfToolsDriveCmd) |
michael@0 | 60 | [ ] CommandPrompt.TypeKeys ("cd " + strPerfToolsDir + " <Enter>") |
michael@0 | 61 | [ ] // process the page-header |
michael@0 | 62 | [ ] CommandPrompt.TypeKeys ("perl " + strPerfToolsDrive + strPerfToolsDir +"\Header.pl {strBuildIDBase} {strMilestoneOrPull} <Enter>") |
michael@0 | 63 | [ ] sleep (1) |
michael@0 | 64 | [ ] // go through each URI and process it |
michael@0 | 65 | [-] while (FileReadLine (inputFile, sLine)) |
michael@0 | 66 | [ ] CommandPrompt.SetActive () |
michael@0 | 67 | [ ] site = GetField (sLine, '/', numSlashes) |
michael@0 | 68 | [ ] logFile = site + "-log.txt" |
michael@0 | 69 | [ ] logFile = strLogPath + "\" + logFile |
michael@0 | 70 | [ ] CommandPrompt.TypeKeys (strViewerDrive + strViewerDir + "\viewer > {logFile}<Enter>") |
michael@0 | 71 | [ ] sleep (5) |
michael@0 | 72 | [ ] Raptor.SetActive () |
michael@0 | 73 | [ ] Raptor.TextField1.SetText (sLine) |
michael@0 | 74 | [ ] Raptor.TextField1.TypeKeys ("<Enter>") |
michael@0 | 75 | [ ] sleep (sleepBetweenSites) |
michael@0 | 76 | [-] if Raptor.Exists () |
michael@0 | 77 | [ ] Raptor.SetActive () |
michael@0 | 78 | [ ] Raptor.Close () |
michael@0 | 79 | [+] if RaptorSecondWindow.Exists () |
michael@0 | 80 | [ ] RaptorSecondWindow.SetActive () |
michael@0 | 81 | [ ] RaptorSecondWindow.Close () |
michael@0 | 82 | [ ] CommandPrompt.SetActive () |
michael@0 | 83 | [ ] CommandPrompt.TypeKeys( "<Ctrl-C><Enter>" ) |
michael@0 | 84 | [ ] NumOfSites = NumOfSites + 1 |
michael@0 | 85 | [ ] quotedURL = """" + sLine + """" |
michael@0 | 86 | [ ] CommandPrompt.TypeKeys ("perl "+ strPerfToolsDrive + strPerfToolsDir + "\AverageTable2.pl {site} {logFile} {NumOfSites} {strBuildIDBase} {quotedURL} <Enter>") |
michael@0 | 87 | [ ] sleep (2) |
michael@0 | 88 | [-] if ( SYS_FileExists( strPerfToolsDrive + strPerfToolsDir + "\abort.txt" ) ) |
michael@0 | 89 | [ ] break |
michael@0 | 90 | [ ] CommandPrompt.TypeKeys ("perl "+ strPerfToolsDrive + strPerfToolsDir + "\Footer.pl {strBuildIDBase} {strMilestoneOrPull} <Enter>") |
michael@0 | 91 | [ ] sleep (1) |
michael@0 | 92 | [ ] CommandPrompt.Close() |