1*537f9df8SAndrew Rist#************************************************************** 2cdf0e10cSrcweir# 3*537f9df8SAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4*537f9df8SAndrew Rist# or more contributor license agreements. See the NOTICE file 5*537f9df8SAndrew Rist# distributed with this work for additional information 6*537f9df8SAndrew Rist# regarding copyright ownership. The ASF licenses this file 7*537f9df8SAndrew Rist# to you under the Apache License, Version 2.0 (the 8*537f9df8SAndrew Rist# "License"); you may not use this file except in compliance 9*537f9df8SAndrew Rist# with the License. You may obtain a copy of the License at 10*537f9df8SAndrew Rist# 11*537f9df8SAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12*537f9df8SAndrew Rist# 13*537f9df8SAndrew Rist# Unless required by applicable law or agreed to in writing, 14*537f9df8SAndrew Rist# software distributed under the License is distributed on an 15*537f9df8SAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*537f9df8SAndrew Rist# KIND, either express or implied. See the License for the 17*537f9df8SAndrew Rist# specific language governing permissions and limitations 18*537f9df8SAndrew Rist# under the License. 19*537f9df8SAndrew Rist# 20*537f9df8SAndrew Rist#************************************************************** 21cdf0e10cSrcweir 22cdf0e10cSrcweir 23cdf0e10cSrcweir 24cdf0e10cSrcweir 25cdf0e10cSrcweirWINDOWS ONLY, no other platforms 26cdf0e10cSrcweir 27cdf0e10cSrcweir 28cdf0e10cSrcweir 29cdf0e10cSrcweir 30cdf0e10cSrcweirThis test checks if the cli assemblies and their policy files are installed in the 31cdf0e10cSrcweirGAC and if the policy files are correct. The office must be installed with complete 32cdf0e10cSrcweirsystem integration. That is, one does not use setup /a for starting the 33cdf0e10cSrcweirinstallation. 34cdf0e10cSrcweir 35cdf0e10cSrcweirIn OOo 3.0 there was a breanking change so that the test created for previous 36cdf0e10cSrcweirversion do not work anymore. To use these old tests one needs to install a 37cdf0e10cSrcweirversion of OOo less than v 3.0. Then one needs to check out the cli_ure module 38cdf0e10cSrcweirfor that version. The tests are contained in cli_ure/qa/versioning. 39cdf0e10cSrcweir 40cdf0e10cSrcweirIn the sub directory version_libs are libraries which are linked with (referencing) 41cdf0e10cSrcweircli_cppuhelper 42cdf0e10cSrcweircli_basetypes 43cdf0e10cSrcweircli_ure 44cdf0e10cSrcweircli_uretypes 45cdf0e10cSrcweircli_oootypes 46cdf0e10cSrcweir 47cdf0e10cSrcweirThey are named version_3_0_0 etc, where the name indicates the version of the 48cdf0e10cSrcweiroffice for which they were initially build. If there are only the assemblies 49cdf0e10cSrcweirfor example OOo2.0.2 installed and a client was build with the assemblies from 50cdf0e10cSrcweirOOo2 then the policy assemblies must make the correct redirection. 51cdf0e10cSrcweir 52cdf0e10cSrcweirWhen calling dmake then the executable runtest.exe and version_current.dll are 53cdf0e10cSrcweirbuild. When runtest runs then it loads all dlls, which names start with 54cdf0e10cSrcweir"version", from the same directory and tries to run a particular test code 55cdf0e10cSrcweirwhich is only available in the version_xxx.dll s. The code in the 56cdf0e10cSrcweirversion_xxx.dlls uses the cli default bootstrap mechanism to find the office 57cdf0e10cSrcweirinstallation and start the office. When running runtest in a build environment 58cdf0e10cSrcweirthen it may use the wrong libraries for bootstrapping in which case the test 59cdf0e10cSrcweirfails. Then one has to set PATH which must point to the program directory of 60cdf0e10cSrcweirthe office installation. For example: 61cdf0e10cSrcweir 62cdf0e10cSrcweirset PATH=d:\office\program 63cdf0e10cSrcweir 64cdf0e10cSrcweirruntest stops when a test failed to run. It writes error information to the 65cdf0e10cSrcweirconsole which shows which version_xxx.dll failed to run and if this was due to 66cdf0e10cSrcweira referenced assembly that could not be loaded. This would be the case if such 67cdf0e10cSrcweiran assembly or the policy assembly is not properly installed or the redirection 68cdf0e10cSrcweirin the policy assembly is wrong. 69cdf0e10cSrcweir 70cdf0e10cSrcweirThe version_current.dll references the assemblies in the current build 71cdf0e10cSrcweirenvironment. version_current.dll is also executed when runtest is started. 72cdf0e10cSrcweir 73cdf0e10cSrcweirTo run the whole test one can either 74cdf0e10cSrcweir1. start testools/wntmsci11.pro/bin/runtests.exe in a console where no 75cdf0e10cSrcweirenvironment is set. 76cdf0e10cSrcweir2. Call dmake run in testools/qa/cliversions 77cdf0e10cSrcweir 78cdf0e10cSrcweirFor a limited test one can call in this directory 79cdf0e10cSrcweirdmake run office=d:\office 80cdf0e10cSrcweirThere must not be an office installed in the system (the assemblies from the GAC 81cdf0e10cSrcweirwould then be used). Only the test with the version_current.dll will succeed 82cdf0e10cSrcweirbecause there are no policy files installed. This test requires that all 83cdf0e10cSrcweirassemblies are copied next to runtests.exe - the makefile will do that. 84cdf0e10cSrcweir 85cdf0e10cSrcweirThe parameter office must be a system path to the office installation 86cdf0e10cSrcweirdirectory. The java code calls runtest and also sets PATH so that the test 87cdf0e10cSrcweirworks in the build environment. It also sets UNO_PATH so that the office will be 88cdf0e10cSrcweirfound. If the test says that it failed, then one should run runtest directly 89cdf0e10cSrcweirbecause it puts out more information. 90cdf0e10cSrcweir 91cdf0e10cSrcweir 92cdf0e10cSrcweir 93cdf0e10cSrcweirCreating a new version_xxx.dll 94cdf0e10cSrcweir============================== 95cdf0e10cSrcweirWhen 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: 96cdf0e10cSrcweir1. set the build environment in which the new versions are effectiv. 97cdf0e10cSrcweir2 call: dmake name=version_xxx.dll 98cdf0e10cSrcweir3. copy the new version dll from the output tree into qa/versioning/version_libs 99cdf0e10cSrcweir4. commit the new version.dll using the -kb switch (only when creating the new file : cvs new -kb version_3_1_0.dll) 100cdf0e10cSrcweir 101