diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-07-16 13:36:50 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-07-16 13:36:50 +0000 |
commit | 172ad8fa2d6fa3ec927db1b4948d634ccda63f17 (patch) | |
tree | ef5628c6a2d7be88abbf11918a23327a1a773bad /testautomation/global/system | |
parent | e796d331e88d4dbb1442a49905c054b52a66987e (diff) |
CWS-TOOLING: integrate CWS tbo07
2009-07-15 12:50:18 +0200 tbo r274002 : #ii97838# fine tuning of text
2009-07-09 11:58:53 +0200 tbo r273855 : #i102592# add configur switch --enable-hids
2009-07-07 18:37:46 +0200 tbo r273812 : last fixes
2009-06-30 17:44:03 +0200 tbo r273527 : #i97838# dynamik hid.lst found
2009-06-30 12:53:57 +0200 tbo r273503 : #i100285# use other name of dialog
2009-06-25 18:56:33 +0200 tbo r273390 : CWS-TOOLING: rebase CWS tbo07 to trunk@272827 (milestone: DEV300:m50)
2009-06-25 15:31:23 +0200 tbo r273383 : #i100285# use other name of dialog
2009-06-25 14:15:33 +0200 tbo r273381 : #i100285# use other name of dialog + context problem with macos
2009-05-20 16:36:54 +0200 tbo r272140 : readme.txt fot the lost hid.lst file
2009-05-20 16:30:31 +0200 tbo r272139 : removal of hid.lst file
2009-05-20 16:28:26 +0200 tbo r272138 : corrections
2009-05-16 19:27:00 +0200 tbo r271982 : #i# copy hid.lst from OOo installation to global/hid
2009-04-21 13:36:36 +0200 tbo r271034 : #i101044#
2009-04-20 18:49:50 +0200 tbo r271009 : #i101044#
2009-04-20 18:47:35 +0200 tbo r271008 : #i100909#
Diffstat (limited to 'testautomation/global/system')
-rwxr-xr-x | testautomation/global/system/includes/master.inc | 106 |
1 files changed, 100 insertions, 6 deletions
diff --git a/testautomation/global/system/includes/master.inc b/testautomation/global/system/includes/master.inc index 745381b6f2fb..84bc3ed7f201 100755 --- a/testautomation/global/system/includes/master.inc +++ b/testautomation/global/system/includes/master.inc @@ -82,13 +82,15 @@ sub GetUseFiles use "global\system\includes\status.inc" '///+ status.inc : all routines to put the status-info into database '/// Call important system- and start-routines. - Call LoadDeclaration '///+<ul><li><b>LoadDeclaration</b>: Load all declaration files (master.inc)</li> Call LoadGlobalIncludeFiles '///+<li><b>LoadGlobalIncludeFiles</b>: Include file with global routines (master.inc)</li> - Call GetToolPlatform '///+<li><b>GetToolPlatform</b>: Detect operating environment for the Testtool (sysinfo.inc)</li> Call GetOfficePlatform '///+<li><b>GetOfficePlatform</b>: Detect operating environment for the office (sysinfo.inc)</li> Call GetIniInformation '///+<li><b>GetIniInformation</b>: Get all information out of the <i>testtool.ini/.testtoolrc</i> and set it on global variables (iniinfo.inc)</li> Call GetOfficeInformation '///+<li><b>GetOfficeInformation</b>: Set <i>sAppExe</i> for startup (iniinfo.inc)</li> + + Call prepareHidLst + Call LoadDeclaration '///+<ul><li><b>LoadDeclaration</b>: Load all declaration files (master.inc)</li> + Call FirstOfficeStart '///+<li><b>FirstOfficeStart</b>: Try to start the office for first time (master.inc)</li> Call GetLanguageInformation '///+<li><b>GetLanguageInformation</b>: Detect the language of office (iniinfo.inc)</li> Call hFirstOutput '///+<li><b>hFirstOutput</b>: Make last adjustments and creat information output (master.inc)</li> @@ -164,6 +166,96 @@ sub GetUseFiles end sub '------------------------------------------------------------------------- +function checkWriteable() as boolean + '//// Check hid.lst destination for user writeability + dim sTestDir as string + dim bReturn as boolean + + bReturn = FALSE + try + sTestDir = "tbotest" ' nasty bug, if the path is with a path sign at the end; usually on windows root dirs :-( + if (right(ConvertPath(gtHidLstPath, gtPlatform), 1) <> hGetPathSigne(gtPlatform)) then + sTestDir = hgetPathSigne(gtPlatform) + sTestDir + end if + MkDir (ConvertPath(gtHidLstPath + sTestDir, gtPlatform)) + RmDir (ConvertPath(gtHidLstPath + sTestDir, gtPlatform)) + + bReturn = TRUE + catch + ' fail + bReturn = FALSE + endcatch + checkWriteable = bReturn +end function +'------------------------------------------------------------------------- + +sub prepareHidLst + '/// Determine and set OOo version information + '/// Check if hid.lst is at default location: testautomation/global/hid + '/// If not, check OOo basis path for hid.lst; check if default location from above is writeable for user + '/// Copy hid.lst from OOo basis path to the default location + '/// If something fails, give warnlog + dim sHidOOo as string + dim iShellReturn as integer + dim qHost as string + dim qPath as string + + gVersionsnummer = FindBuildID + ' split versionstring into its parts + call hSetBuildVersionInformation(False) + qHost = "quaste.services.openoffice.org" + qPath = "/index.php?option=com_quaste&task=tests_overview&download=2" + "&workspace=" + gMajor + "&milestone=" + gMinor + ' check for hid.lst in $HID_DIR_LOCATION! + if (fileExists(gtHidLstPath + "hid.lst")) then + printlog "Found hid.lst file; It is taken from: " + gtHidLstPath + else + ' check for hid.lst in OOo installation + sHidOOo = convertPath(gOfficeBasisPath + "program/" + "hid.lst") + if (fileExists(sHidOOo)) then + printlog "Found hid.lst file; It exists in OOo installation: " + sHidOOo + + ' make compatibility hint against version.txt + + ' check for writeable global/hid/ + if (checkWriteable()) then + ' copy hid.lst + fileCopy(sHidOOo, gtHidLstPath + "hid.lst") + printlog "File hid.lst successfull copied to location in VCL TestTool settings: " + gtHidLstPath + else + ' fail: make hint for hid.lst path + warnlog "File hid.lst could not be copied to default location, due to missing access rights" + warnlog "Please open the settings in VCL TestTool and change the path for HID directory to: " + sHidOOo + if MsgBox ("The test won't start! Further informations are in the result file below...", 16, "Error with hid.lst file") = 1 then end + end if + else + ' Disabled, because Joomla! can not provide plain text webpage + 'if (checkWriteable()) then + 'try to get from Quaste via http + 'httpSetProxy(Host, Port) + ' try + ' iShellReturn = httpSend(qHost, qPath, 80, gtHidLstPath + "hid.lst") + ' catch + ' iShellReturn = 99 + ' endcatch + ' when using internal httpSend, iShellReturn contains http status numbers: 200 means: ok + ' if (iShellReturn <> 200) then + ' warnlog "Fetching file hid.lst with internal httpsend command failed with error code: " + iShellReturn + chr(13) + qHost+qPath + chr(13) + gtHidLstPath + "hid.lst" + ' no hid.lst in OOo available and not available via http... + ' warnlog "No hid.lst file in OOo installation or on Quaste server found; Please read documentation at " + ConvertPath (gTestToolPath + "global\hid\readme.txt") + " or ask on mailing list: dev@qa.openoffice.org" + ' kill gtHidLstPath + "hid.lst" + ' else + ' printlog "File hid.lst successfull fetched from "+qHost+qPath+" and saved to location in VCL TestTool settings: " + gtHidLstPath + ' endif + 'else + ' warnlog "File hid.lst could not be saved to default location, due to missing access rights" + ' warnlog "Please download hid.lst file from: "+qHost+qPath+" and open the settings in VCL TestTool and change the path for HID directory to your download location." + warnlog "Please download hid.lst file from: "+ chr(13) +"http://"+qHost+qPath+ chr(13) + "and save it to: "+ chr(13) + gtHidLstPath+"hid.lst" + if MsgBox ("The test won't start! Further informations are in the result file below...", 16, "Error with hid.lst file") = 1 then end + 'end if + end if + end if +end sub +'------------------------------------------------------------------------- sub LoadDeclaration '/// Include all .sid-declarations (all menu-items as SlotIDs) @@ -625,11 +717,13 @@ sub hFirstOutput Dim sDir as String Dim sDir1 as String Dim sMajor as String + Dim sHidVersion as String + sHidVersion = getBuildNumHidLst + if lCase(trim(sHidVersion)) <> lCase(gMajor + "." + gMinor) then + qaErrorLog "Version of file hid.lst differs from OOo version" + end if if gSamePC = TRUE then - gVersionsnummer = FindBuildID - ' split versionstring into its parts - call hSetBuildVersionInformation(False) if (len(gMajor)>3) then sMajor = left(gMajor,3) end if @@ -665,7 +759,7 @@ sub hFirstOutput 'http://wiki.services.openoffice.org/wiki/QUASTe printlog "** Status feature (QUASTe) : Enabled " + gLocalStatusDatabase end if - printlog "** HID.LST based on milestone : " + GetBuildNumHidLst + printlog "** HID.LST based on milestone : " + sHidVersion printlog "----------------------------------------------------------------------------------------------------" printlog "** Application installation path : " + gNetzOfficePath printlog "** User configuration path : " + gOfficePath |