diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-11-02 16:42:42 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-11-02 16:42:42 +0000 |
commit | c48b4d16ca58471608fb60373bb6cf60580310a5 (patch) | |
tree | baa310ec3f1d6117bedfdd345a6a9f74463d897b /qadevOOo/runner/convwatch/ReferenceBuilder.java | |
parent | c94c0b65929ac9b5982df2e67ae563fb70eb15d8 (diff) |
INTEGRATION: CWS qadev24 (1.4.12); FILE MERGED
2005/10/04 10:02:59 lla 1.4.12.7: #i52275# add some more times
2005/09/30 10:30:37 lla 1.4.12.6: #i52275# compile failure
2005/09/30 10:21:12 lla 1.4.12.5: #i52275# start office only if really need
2005/09/19 22:02:46 cn 1.4.12.4: RESYNC: (1.4-1.5); FILE MERGED
2005/08/12 07:07:32 lla 1.4.12.3: #124348# prepare source for use of leave out lists
2005/08/08 12:33:40 lla 1.4.12.2: #124348# add the feature to leave out files
2005/08/08 10:56:56 lla 1.4.12.1: #124348# problems with Referencebuilds fixed
Diffstat (limited to 'qadevOOo/runner/convwatch/ReferenceBuilder.java')
-rw-r--r-- | qadevOOo/runner/convwatch/ReferenceBuilder.java | 68 |
1 files changed, 44 insertions, 24 deletions
diff --git a/qadevOOo/runner/convwatch/ReferenceBuilder.java b/qadevOOo/runner/convwatch/ReferenceBuilder.java index 95cf6b66a416..8352c6dbd413 100644 --- a/qadevOOo/runner/convwatch/ReferenceBuilder.java +++ b/qadevOOo/runner/convwatch/ReferenceBuilder.java @@ -4,9 +4,9 @@ * * $RCSfile: ReferenceBuilder.java,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: rt $ $Date: 2005-09-08 17:16:18 $ + * last change: $Author: kz $ $Date: 2005-11-02 17:42:42 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -49,6 +49,7 @@ import convwatch.ConvWatchException; import convwatch.EnhancedComplexTestCase; import convwatch.PropertyName; import helper.OfficeProvider; +import convwatch.PerformanceContainer; /** * The following Complex Test will test @@ -190,12 +191,18 @@ public class ReferenceBuilder extends EnhancedComplexTestCase log.println("- next file is: ------------------------------"); log.println(sEntry); - runGDC(sEntry, sNewReferencePath); + if (aGTA.checkIfUsable(sEntry)) + { + runGDC(sEntry, sNewReferencePath); + } } } else { - runGDC(m_sInputPath, m_sReferencePath); + if (aGTA.checkIfUsable(m_sInputPath)) + { + runGDC(m_sInputPath, m_sReferencePath); + } } } @@ -203,31 +210,44 @@ public class ReferenceBuilder extends EnhancedComplexTestCase { // first do a check if the reference not already exist, this is a big speedup, due to the fact, // we don't need to start a new office. - GraphicalTestArguments aGTA_local = getGraphicalTestArguments(); - if (GraphicalDifferenceCheck.isReferenceExists(_sInputPath, _sReferencePath, aGTA_local) == false) + GraphicalTestArguments aGTA = getGraphicalTestArguments(); + if (GraphicalDifferenceCheck.isReferenceExists(_sInputPath, _sReferencePath, aGTA) == false) { // start a fresh Office - OfficeProvider aProvider = new OfficeProvider(); - XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param); - param.put("ServiceFactory", xMSF); - GraphicalTestArguments aGTA = getGraphicalTestArguments(); + OfficeProvider aProvider = null; + if (aGTA.shouldOfficeStart()) + { + aGTA.getPerformance().startTime(PerformanceContainer.OfficeStart); + aProvider = new OfficeProvider(); + XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param); + param.put("ServiceFactory", xMSF); + aGTA.getPerformance().stopTime(PerformanceContainer.OfficeStart); + + long nStartTime = aGTA.getPerformance().getTime(PerformanceContainer.OfficeStart); + aGTA = getGraphicalTestArguments(); + aGTA.getPerformance().setTime(PerformanceContainer.OfficeStart, nStartTime); + } - try - { - GraphicalDifferenceCheck.createOneReferenceFile(_sInputPath, _sReferencePath, aGTA); - } - catch(ConvWatchCancelException e) - { + try + { + System.out.println("Reference type is " + aGTA.getReferenceType()); + GraphicalDifferenceCheck.createOneReferenceFile(_sInputPath, _sReferencePath, aGTA); + } + catch(ConvWatchCancelException e) + { assure(e.getMessage(), false); - } - catch(ConvWatchException e) - { - assure(e.getMessage(), false); - } + } + catch(ConvWatchException e) + { + assure(e.getMessage(), false); + } - // Office shutdown - aProvider.closeExistingOffice(param, true); + // Office shutdown + if (aProvider != null) + { + aProvider.closeExistingOffice(param, true); + } + } } } -} |