1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 11# OpenOffice.org is free software: you can redistribute it and/or modify 12# it under the terms of the GNU Lesser General Public License version 3 13# only, as published by the Free Software Foundation. 14# 15# OpenOffice.org is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18# GNU Lesser General Public License version 3 for more details 19# (a copy is included in the LICENSE file that accompanied this code). 20# 21# You should have received a copy of the GNU Lesser General Public License 22# version 3 along with OpenOffice.org. If not, see 23# <http://www.openoffice.org/license.html> 24# for a copy of the LGPLv3 License. 25# 26# ************************************************************************/ 27 28 29 30 31WINDOWS ONLY, no other platforms 32 33 34 35 36This test checks if the cli assemblies and their policy files are installed in the 37GAC and if the policy files are correct. The office must be installed with complete 38system integration. That is, one does not use setup /a for starting the 39installation. 40 41In OOo 3.0 there was a breanking change so that the test created for previous 42version do not work anymore. To use these old tests one needs to install a 43version of OOo less than v 3.0. Then one needs to check out the cli_ure module 44for that version. The tests are contained in cli_ure/qa/versioning. 45 46In the sub directory version_libs are libraries which are linked with (referencing) 47cli_cppuhelper 48cli_basetypes 49cli_ure 50cli_uretypes 51cli_oootypes 52 53They are named version_3_0_0 etc, where the name indicates the version of the 54office for which they were initially build. If there are only the assemblies 55for example OOo2.0.2 installed and a client was build with the assemblies from 56OOo2 then the policy assemblies must make the correct redirection. 57 58When calling dmake then the executable runtest.exe and version_current.dll are 59build. When runtest runs then it loads all dlls, which names start with 60"version", from the same directory and tries to run a particular test code 61which is only available in the version_xxx.dll s. The code in the 62version_xxx.dlls uses the cli default bootstrap mechanism to find the office 63installation and start the office. When running runtest in a build environment 64then it may use the wrong libraries for bootstrapping in which case the test 65fails. Then one has to set PATH which must point to the program directory of 66the office installation. For example: 67 68set PATH=d:\office\program 69 70runtest stops when a test failed to run. It writes error information to the 71console which shows which version_xxx.dll failed to run and if this was due to 72a referenced assembly that could not be loaded. This would be the case if such 73an assembly or the policy assembly is not properly installed or the redirection 74in the policy assembly is wrong. 75 76The version_current.dll references the assemblies in the current build 77environment. version_current.dll is also executed when runtest is started. 78 79To run the whole test one can either 801. start testools/wntmsci11.pro/bin/runtests.exe in a console where no 81environment is set. 822. Call dmake run in testools/qa/cliversions 83 84For a limited test one can call in this directory 85dmake run office=d:\office 86There must not be an office installed in the system (the assemblies from the GAC 87would then be used). Only the test with the version_current.dll will succeed 88because there are no policy files installed. This test requires that all 89assemblies are copied next to runtests.exe - the makefile will do that. 90 91The parameter office must be a system path to the office installation 92directory. The java code calls runtest and also sets PATH so that the test 93works in the build environment. It also sets UNO_PATH so that the office will be 94found. If the test says that it failed, then one should run runtest directly 95because it puts out more information. 96 97 98 99Creating a new version_xxx.dll 100============================== 101When a version of our assemblies changes then one should provide a new version dll which test exactly the assemblies with the changed version. This is easily done: 1021. set the build environment in which the new versions are effectiv. 1032 call: dmake name=version_xxx.dll 1043. copy the new version dll from the output tree into qa/versioning/version_libs 1054. commit the new version.dll using the -kb switch (only when creating the new file : cvs new -kb version_3_1_0.dll) 106 107