CWS-TOOLING: integrate CWS sb129
This commit is contained in:
commit
459d32f413
11 changed files with 210 additions and 121 deletions
|
@ -1310,23 +1310,4 @@ public class TestComponent {
|
|||
|
||||
return xSingleServiceFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the service information into the given registry key.
|
||||
* This method is called by the <code>JavaLoader</code>
|
||||
* <p>
|
||||
* @return returns true if the operation succeeded
|
||||
* @param regKey the registryKey
|
||||
* @see com.sun.star.comp.loader.JavaLoader
|
||||
*/
|
||||
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
|
||||
boolean result = true;
|
||||
|
||||
result = result & FactoryHelper.writeRegistryServiceInfo(_TestObject.class.getName(), _TestObject.__serviceName, regKey);
|
||||
result = result & FactoryHelper.writeRegistryServiceInfo(_PerformancTestObject.class.getName(),
|
||||
_PerformancTestObject.__serviceName, regKey);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tt testtools : cpputools io remotebridges stoc javaunohelper pyuno cli_ure offapi NULL
|
||||
tt testtools : cpputools io remotebridges stoc javaunohelper pyuno cli_ure offapi ure NULL
|
||||
tt testtools\inc nmake - all tt_inc NULL
|
||||
tt testtools\source\bridgetest nmake - all tt_bridgetest tt_bridgetest_idl tt_javaTestObjs tt_inc NULL
|
||||
tt testtools\source\bridgetest nmake - all tt_bridgetest tt_bridgetest_idl tt_inc NULL
|
||||
tt testtools\source\bridgetest\cli nmake - w,vc7 tt_cli tt_bridgetest tt_bridgetest_idl tt_inc NULL
|
||||
tt testtools\source\bridgetest\idl nmake - all tt_bridgetest_idl tt_inc NULL
|
||||
tt testtools\com\sun\star\comp\bridge nmake - all tt_javaTestObjs tt_bridgetest_idl tt_inc NULL
|
||||
|
|
34
testtools/source/bridgetest/bridgetest.component
Normal file
34
testtools/source/bridgetest/bridgetest.component
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="com.sun.star.comp.bridge.BridgeTest">
|
||||
<service name="com.sun.star.test.bridge.BridgeTest"/>
|
||||
</implementation>
|
||||
</component>
|
|
@ -47,7 +47,6 @@
|
|||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
#include <com/sun/star/lang/XMain.hpp>
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
#include <com/sun/star/bridge/UnoUrlResolver.hpp>
|
||||
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
|
||||
#include "com/sun/star/uno/RuntimeException.hpp"
|
||||
|
@ -1323,27 +1322,6 @@ void SAL_CALL component_getImplementationEnvironment(
|
|||
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
//==================================================================================================
|
||||
sal_Bool SAL_CALL component_writeInfo( void *, void * pRegistryKey )
|
||||
{
|
||||
if (pRegistryKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
Reference< XRegistryKey > xNewKey(
|
||||
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
|
||||
OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLNAME "/UNO/SERVICES") ) ) );
|
||||
xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(SERVICENAME) ) );
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
catch (InvalidRegistryException &)
|
||||
{
|
||||
OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
|
||||
}
|
||||
}
|
||||
return sal_False;
|
||||
}
|
||||
//==================================================================================================
|
||||
void * SAL_CALL component_getFactory(
|
||||
const sal_Char * pImplName, void * pServiceManager, void * )
|
||||
{
|
||||
|
|
37
testtools/source/bridgetest/constructors.component
Normal file
37
testtools/source/bridgetest/constructors.component
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="comp.test.testtools.bridgetest.Constructors">
|
||||
<service name="test.testtools.bridgetest.Constructors"/>
|
||||
</implementation>
|
||||
<implementation name="comp.test.testtools.bridgetest.Constructors2">
|
||||
<service name="test.testtools.bridgetest.Constructors2"/>
|
||||
</implementation>
|
||||
</component>
|
|
@ -508,10 +508,3 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
|
|||
{
|
||||
*envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
|
||||
extern "C" ::sal_Bool SAL_CALL component_writeInfo(
|
||||
void * serviceManager, void * registryKey)
|
||||
{
|
||||
return ::cppu::component_writeInfoHelper(
|
||||
serviceManager, registryKey, entries);
|
||||
}
|
||||
|
|
34
testtools/source/bridgetest/cppobj.component
Normal file
34
testtools/source/bridgetest/cppobj.component
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="com.sun.star.comp.bridge.CppTestObject">
|
||||
<service name="com.sun.star.test.bridge.CppTestObject"/>
|
||||
</implementation>
|
||||
</component>
|
|
@ -42,7 +42,6 @@
|
|||
#include "cppuhelper/compbase_ex.hxx"
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
#include "com/sun/star/uno/Any.hxx"
|
||||
#include "com/sun/star/uno/RuntimeException.hpp"
|
||||
#include "com/sun/star/uno/Sequence.hxx"
|
||||
|
@ -1182,27 +1181,6 @@ void SAL_CALL component_getImplementationEnvironment(
|
|||
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
//==================================================================================================
|
||||
sal_Bool SAL_CALL component_writeInfo( void *, void * pRegistryKey )
|
||||
{
|
||||
if (pRegistryKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
Reference< XRegistryKey > xNewKey(
|
||||
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
|
||||
OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLNAME "/UNO/SERVICES") ) ) );
|
||||
xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(SERVICENAME) ) );
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
catch (InvalidRegistryException &)
|
||||
{
|
||||
OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
|
||||
}
|
||||
}
|
||||
return sal_False;
|
||||
}
|
||||
//==================================================================================================
|
||||
void * SAL_CALL component_getFactory(
|
||||
const sal_Char * pImplName, void * pServiceManager, void * )
|
||||
{
|
||||
|
|
|
@ -41,18 +41,23 @@ DLLPRE = # no leading "lib" on .so files
|
|||
BATCH_SUFFIX=.bat
|
||||
GIVE_EXEC_RIGHTS=@echo
|
||||
MY_URE_INTERNAL_JAVA_DIR=$(strip $(subst,\,/ file:///$(shell @$(WRAPCMD) echo $(SOLARBINDIR))))
|
||||
MY_LOCAL_CLASSDIR=$(strip $(subst,\,/ file:///$(shell $(WRAPCMD) echo $(PWD)$/$(CLASSDIR))))
|
||||
MY_LOCAL_CLASSDIR=$(strip $(subst,\,/ file:///$(shell $(WRAPCMD) echo $(PWD)/$(CLASSDIR)/)))
|
||||
.ELIF "$(GUI)"=="OS2"
|
||||
BATCH_SUFFIX=.cmd
|
||||
GIVE_EXEC_RIGHTS=@echo
|
||||
MY_URE_INTERNAL_JAVA_DIR=$(strip $(subst,\,/ file:///$(shell @$(WRAPCMD) echo $(SOLARBINDIR))))
|
||||
MY_LOCAL_CLASSDIR=$(strip $(subst,\,/ file:///$(shell $(WRAPCMD) echo $(PWD)$/$(CLASSDIR))))
|
||||
MY_LOCAL_CLASSDIR=$(strip $(subst,\,/ file:///$(shell $(WRAPCMD) echo $(PWD)/$(CLASSDIR)/)))
|
||||
.ELSE
|
||||
GIVE_EXEC_RIGHTS=chmod +x
|
||||
MY_URE_INTERNAL_JAVA_DIR=file://$(SOLARBINDIR)
|
||||
MY_LOCAL_CLASSDIR=file://$(PWD)$/$(CLASSDIR)
|
||||
MY_LOCAL_CLASSDIR=file://$(PWD)/$(CLASSDIR)/
|
||||
.ENDIF
|
||||
|
||||
my_components = bridgetest constructors cppobj
|
||||
.IF "$(SOLAR_JAVA)" != ""
|
||||
my_components += testComponent
|
||||
.END
|
||||
|
||||
.IF "$(GUI)"=="WNT"
|
||||
.IF "$(compcheck)" != ""
|
||||
CFLAGSCXX += -DCOMPCHECK
|
||||
|
@ -122,6 +127,7 @@ JAVATARGETS=\
|
|||
.IF "$(L10N_framework)"==""
|
||||
ALLTAR: \
|
||||
runtest \
|
||||
$(DLLDEST)/services.rdb \
|
||||
$(DLLDEST)$/uno_types.rdb \
|
||||
$(DLLDEST)$/uno_services.rdb \
|
||||
$(DLLDEST)$/bridgetest_server$(BATCH_SUFFIX) \
|
||||
|
@ -130,7 +136,8 @@ ALLTAR: \
|
|||
|
||||
#################################################################
|
||||
|
||||
runtest : $(DLLDEST)$/uno_types.rdb $(DLLDEST)$/uno_services.rdb makefile.mk
|
||||
runtest : $(DLLDEST)$/uno_types.rdb $(DLLDEST)$/uno_services.rdb makefile.mk \
|
||||
$(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN)
|
||||
.IF "$(COM)$(OS)$(CPU)" == "GCCMACOSXP"
|
||||
@echo "Mac OSX PPC GCC fails this test!, likely broken UNO bridge. Fix me."
|
||||
.ELSE
|
||||
|
@ -139,14 +146,18 @@ runtest : $(DLLDEST)$/uno_types.rdb $(DLLDEST)$/uno_services.rdb makefile.mk
|
|||
-s com.sun.star.test.bridge.BridgeTest -- \
|
||||
com.sun.star.test.bridge.CppTestObject
|
||||
.ENDIF
|
||||
|
||||
|
||||
$(DLLDEST)/services.rdb :
|
||||
$(COPY) $(SOLARXMLDIR)/ure/services.rdb $@
|
||||
|
||||
$(DLLDEST)$/uno_types.rdb : $(SOLARBINDIR)$/udkapi.rdb
|
||||
echo $(DLLDEST)
|
||||
$(GNUCOPY) $? $@
|
||||
$(REGMERGE) $@ / $(BIN)$/bridgetest.rdb
|
||||
|
||||
$(DLLDEST)$/bridgetest_client$(BATCH_SUFFIX) .ERRREMOVE: makefile.mk
|
||||
echo '$(AUGMENT_LIBRARY_PATH)' '$(SOLARBINDIR)'/uno -ro uno_services.rdb -ro uno_types.rdb \
|
||||
echo '$(AUGMENT_LIBRARY_PATH)' '$(SOLARBINDIR)'/uno -ro services.rdb \
|
||||
-ro uno_services.rdb -ro uno_types.rdb \
|
||||
-s com.sun.star.test.bridge.BridgeTest -- \
|
||||
-u \''uno:socket,host=127.0.0.1,port=2002;urp;test'\' > $@
|
||||
$(GIVE_EXEC_RIGHTS) $@
|
||||
|
@ -175,44 +186,44 @@ $(DLLDEST)$/bridgetest_javaserver$(BATCH_SUFFIX) : makefile.mk
|
|||
$(GIVE_EXEC_RIGHTS) $@
|
||||
|
||||
$(DLLDEST)$/bridgetest_inprocess_java$(BATCH_SUFFIX) .ERRREMOVE: makefile.mk
|
||||
echo '$(AUGMENT_LIBRARY_PATH)' '$(SOLARBINDIR)'/uno -ro uno_services.rdb -ro uno_types.rdb \
|
||||
echo '$(AUGMENT_LIBRARY_PATH)' '$(SOLARBINDIR)'/uno -ro services.rdb \
|
||||
-ro uno_services.rdb -ro uno_types.rdb \
|
||||
-s com.sun.star.test.bridge.BridgeTest \
|
||||
-env:URE_INTERNAL_JAVA_DIR=$(MY_URE_INTERNAL_JAVA_DIR) \
|
||||
-env:MY_CLASSDIR_URL=$(MY_LOCAL_CLASSDIR) \
|
||||
-- com.sun.star.test.bridge.JavaTestObject noCurrentContext > $@
|
||||
$(GIVE_EXEC_RIGHTS) $@
|
||||
.ENDIF
|
||||
|
||||
$(DLLDEST)$/uno_services.rdb .ERRREMOVE: $(DLLDEST)$/uno_types.rdb \
|
||||
$(DLLDEST)$/bridgetest.uno$(DLLPOST) $(DLLDEST)$/cppobj.uno$(DLLPOST) \
|
||||
$(MISC)$/$(TARGET)$/bootstrap.rdb $(SHL3TARGETN)
|
||||
- $(MKDIR) $(@:d)
|
||||
$(REGCOMP) -register -br $(DLLDEST)$/uno_types.rdb \
|
||||
-r $(DLLDEST)$/uno_services.rdb -wop \
|
||||
-c acceptor.uno$(DLLPOST) \
|
||||
-c bridgefac.uno$(DLLPOST) \
|
||||
-c connector.uno$(DLLPOST) \
|
||||
-c remotebridge.uno$(DLLPOST) \
|
||||
-c uuresolver.uno$(DLLPOST) \
|
||||
-c stocservices.uno$(DLLPOST)
|
||||
cd $(DLLDEST) && $(REGCOMP) -register -br uno_types.rdb \
|
||||
-r uno_services.rdb -wop=./ \
|
||||
-c .$/bridgetest.uno$(DLLPOST) \
|
||||
-c .$/cppobj.uno$(DLLPOST) \
|
||||
-c .$/$(SHL3TARGETN:f)
|
||||
.IF "$(SOLAR_JAVA)" != ""
|
||||
$(REGCOMP) -register -br $(DLLDEST)$/uno_types.rdb -r $@ \
|
||||
-c javaloader.uno$(DLLPOST) -c javavm.uno$(DLLPOST)
|
||||
$(REGCOMP) -register -br $(MISC)$/$(TARGET)$/bootstrap.rdb -r $@ -c \
|
||||
$(MY_LOCAL_CLASSDIR)/testComponent.jar \
|
||||
-env:URE_INTERNAL_JAVA_DIR=$(MY_URE_INTERNAL_JAVA_DIR)
|
||||
.ENDIF
|
||||
$(DLLDEST)$/uno_services.rdb .ERRREMOVE : $(SOLARENV)/bin/packcomponents.xslt \
|
||||
$(MISC)/uno_services.input $(my_components:^"$(MISC)/":+".component")
|
||||
$(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/ -o $@ \
|
||||
$(SOLARENV)/bin/packcomponents.xslt $(MISC)/uno_services.input
|
||||
|
||||
$(MISC)/uno_services.input :
|
||||
echo \
|
||||
'<list>$(my_components:^"<filename>":+".component</filename>")</list>' \
|
||||
> $@
|
||||
|
||||
$(MISC)/bridgetest.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
bridgetest.component
|
||||
$(XSLTPROC) --nonet --stringparam uri './$(SHL2TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt bridgetest.component
|
||||
|
||||
$(MISC)/constructors.component .ERRREMOVE : \
|
||||
$(SOLARENV)/bin/createcomponent.xslt constructors.component
|
||||
$(XSLTPROC) --nonet --stringparam uri './$(SHL3TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt constructors.component
|
||||
|
||||
$(MISC)/cppobj.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
cppobj.component
|
||||
$(XSLTPROC) --nonet --stringparam uri './$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt cppobj.component
|
||||
|
||||
$(MISC)/testComponent.component .ERRREMOVE : \
|
||||
$(SOLARENV)/bin/createcomponent.xslt testComponent.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'vnd.sun.star.expand:$${{MY_CLASSDIR_URL}}testComponent.jar' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt testComponent.component
|
||||
|
||||
$(MISC)$/$(TARGET)$/bootstrap.rdb .ERRREMOVE:
|
||||
- $(MKDIR) $(@:d)
|
||||
$(COPY) $(SOLARBINDIR)$/types.rdb $@
|
||||
.IF "$(SOLAR_JAVA)" != ""
|
||||
$(REGCOMP) -register -r $@ -c javaloader.uno$(DLLPOST) \
|
||||
-c javavm.uno$(DLLPOST) -c stocservices.uno$(DLLPOST)
|
||||
.ENDIF
|
||||
.ENDIF # L10N_framework
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ LIBTARGET=NO
|
|||
TARGETTYPE=CUI
|
||||
ENABLE_EXCEPTIONS=TRUE
|
||||
|
||||
my_components = pythonloader
|
||||
|
||||
# --- Settings -----------------------------------------------------
|
||||
|
||||
.INCLUDE : settings.mk
|
||||
|
@ -55,12 +57,12 @@ PYTHONPATH:=$(SOLARLIBDIR)$/pyuno:$(PWD):$(SOLARLIBDIR):$(SOLARLIBDIR)$/python:$
|
|||
|
||||
.IF "$(GUI)"!="WNT" && "$(GUI)"!="OS2"
|
||||
TEST_ENV=export FOO=file://$(shell @pwd)$/$(DLLDEST) \
|
||||
UNO_TYPES=pyuno_regcomp.rdb UNO_SERVICES=pyuno_regcomp.rdb
|
||||
UNO_TYPES=uno_types.rdb UNO_SERVICES=pyuno_services.rdb
|
||||
.ELSE # "$(GUI)" != "WNT"
|
||||
# aaaaaa, how to get the current working directory on windows ???
|
||||
CWD_TMP=$(strip $(shell @echo "import os;print os.getcwd()" | $(PYTHON)))
|
||||
TEST_ENV=export FOO=file:///$(strip $(subst,\,/ $(CWD_TMP)$/$(DLLDEST))) && \
|
||||
export UNO_TYPES=pyuno_regcomp.rdb && export UNO_SERVICES=pyuno_regcomp.rdb
|
||||
export UNO_TYPES=uno_types.rdb && export UNO_SERVICES=pyuno_services.rdb
|
||||
.ENDIF # "$(GUI)"!="WNT"
|
||||
PYFILES = \
|
||||
$(DLLDEST)$/core.py \
|
||||
|
@ -75,7 +77,7 @@ PYCOMPONENTS = \
|
|||
|
||||
ALL : \
|
||||
$(PYFILES) \
|
||||
$(DLLDEST)$/pyuno_regcomp.rdb \
|
||||
$(DLLDEST)/pyuno_services.rdb \
|
||||
doc \
|
||||
ALLTAR
|
||||
.ENDIF # L10N_framework
|
||||
|
@ -91,18 +93,21 @@ $(DLLDEST)$/python$(EXECPOST) : $(SOLARBINDIR)$/python$(EXECPOST)
|
|||
$(DLLDEST)$/regcomp$(EXECPOST) : $(SOLARBINDIR)$/regcomp$(EXECPOST)
|
||||
cp $? $@
|
||||
|
||||
$(DLLDEST)$/pyuno_regcomp.rdb: $(DLLDEST)$/uno_types.rdb $(SOLARBINDIR)$/pyuno_services.rdb
|
||||
-rm -f $@
|
||||
$(WRAPCMD) $(REGMERGE) $(DLLDEST)$/pyuno_regcomp.rdb / $(DLLDEST)$/uno_types.rdb $(SOLARBINDIR)$/pyuno_services.rdb
|
||||
$(DLLDEST)$/pyuno_services.rdb .ERRREMOVE : \
|
||||
$(SOLARENV)/bin/packcomponents.xslt $(MISC)/pyuno_services.input \
|
||||
$(my_components:^"$(SOLARXMLDIR)/":+".component")
|
||||
$(XSLTPROC) --nonet --stringparam prefix $(SOLARXMLDIR)/ -o $@ \
|
||||
$(SOLARENV)/bin/packcomponents.xslt $(MISC)/pyuno_services.input
|
||||
|
||||
$(MISC)/pyuno_services.input :
|
||||
echo \
|
||||
'<list>$(my_components:^"<filename>":+".component</filename>")</list>' \
|
||||
> $@
|
||||
|
||||
doc .PHONY:
|
||||
@echo start test with dmake runtest
|
||||
|
||||
runtest : ALL
|
||||
cd $(DLLDEST) && $(TEST_ENV) && $(PYTHON) main.py
|
||||
cd $(DLLDEST) && $(TEST_ENV) && $(WRAPCMD) $(REGCOMP) -register -br pyuno_regcomp.rdb -r dummy.rdb \
|
||||
-l com.sun.star.loader.Python $(foreach,i,$(PYCOMPONENTS) -c vnd.openoffice.pymodule:$(i))
|
||||
cd $(DLLDEST) && $(TEST_ENV) && $(WRAPCMD) $(REGCOMP) -register -br pyuno_regcomp.rdb -r dummy2.rdb \
|
||||
-l com.sun.star.loader.Python -c vnd.sun.star.expand:$$FOO/samplecomponent.py
|
||||
.ENDIF # L10N_framework
|
||||
|
||||
|
|
38
testtools/source/bridgetest/testComponent.component
Normal file
38
testtools/source/bridgetest/testComponent.component
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.Java2"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation
|
||||
name="com.sun.star.comp.bridge.TestComponent$_PerformancTestObject">
|
||||
<service name="com.sun.star.comp.benchmark.JavaTestObject"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.bridge.TestComponent$_TestObject">
|
||||
<service name="com.sun.star.test.bridge.JavaTestObject"/>
|
||||
</implementation>
|
||||
</component>
|
Loading…
Reference in a new issue