Kaydet (Commit) 6ec4dd0f authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

CWS-TOOLING: integrate CWS sb93

üst 17d4c506
qa qadevOOo : unoil jut NULL
qa qadevOOo : javaunohelper jurt ridljar unoil NULL
qa qadevOOo usr1 - all qa_mkout NULL
qa qadevOOo nmake - all qa_runner_ant_build NULL
qa qadevOOo\runner nmake - all qa_make_package qa_runner_ant_build NULL
......@@ -40,7 +40,7 @@ TARGET = runner_convwatch
# --- Files --------------------------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
JAVAFILES = \
TriState.java \
IniFile.java \
......
......@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.11 $
# $Revision: 1.11.16.1 $
#
# This file is part of OpenOffice.org.
#
......@@ -41,8 +41,7 @@ TARGET = runner_helper
# --- Files --------------------------------------------------------
JARFILES = ridl.jar jurt.jar juh.jar jut.jar \
unoil.jar
JARFILES = ridl.jar jurt.jar juh.jar unoil.jar
JAVAFILES = APIDescGetter.java \
ConfigurationRead.java \
......
......@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.6 $
# $Revision: 1.6.16.1 $
#
# This file is part of OpenOffice.org.
#
......@@ -40,7 +40,7 @@ TARGET = runner_util_compare
# --- Files --------------------------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
JAVAFILES = \
DocComparatorFactory.java \
DocComparator.java \
......
......@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.5 $
# $Revision: 1.5.16.1 $
#
# This file is part of OpenOffice.org.
#
......@@ -39,7 +39,7 @@ PACKAGE = test
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar OOoRunner.jar
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = JavaSystemBackend.java
JAVACLASSFILES = $(CLASSDIR)$/$(PACKAGE)$/JavaSystemBackend.class
......
......@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.5 $
# $Revision: 1.5.16.1 $
#
# This file is part of OpenOffice.org.
#
......@@ -39,7 +39,7 @@ PACKAGE = com$/sun$/star$/cmp
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
JAVAFILES = MyPersistObject.java
JAVACLASSFILES = $(CLASSDIR)$/$(PACKAGE)$/MyPersistObject.class
......
......@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.5 $
# $Revision: 1.5.16.1 $
#
# This file is part of OpenOffice.org.
#
......@@ -39,7 +39,7 @@ PACKAGE = test
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar OOoRunner.jar
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = Job.java
JAVACLASSFILES = $(CLASSDIR)$/$(PACKAGE)$/Job.class
......
......@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: TestComponentMain.java,v $
* $Revision: 1.4 $
* $Revision: 1.4.22.1 $
*
* This file is part of OpenOffice.org.
*
......@@ -34,6 +34,9 @@ import com.sun.star.bridge.XBridgeFactory;
import com.sun.star.bridge.XInstanceProvider;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.EventObject;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XEventListener;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.container.XSet;
......@@ -74,8 +77,8 @@ public class TestComponentMain
}
static public void main(String args[]) throws Exception, com.sun.star.uno.Exception {
if(args.length != 1) {
System.err.println("usage : com.sun.star.comp.bridge.TestComponentMain uno:connection;protocol;objectName");
if(args.length != 2) {
System.err.println("usage : com.sun.star.comp.bridge.TestComponentMain uno:connection;protocol;objectName singleaccept");
System.exit(-1);
}
......@@ -84,6 +87,7 @@ public class TestComponentMain
String rootOid = null;
String dcp = args[0];
boolean singleaccept = args[1].equals("singleaccept");
int index = dcp.indexOf(':');
String url = dcp.substring(0, index).trim();
......@@ -112,10 +116,10 @@ public class TestComponentMain
XAcceptor xAcceptor = Acceptor.create(ctx);
System.err.println("waiting for connect...");
while( true )
{
System.err.println("waiting for connect...");
XConnection xConnection = xAcceptor.accept(conDcp);
XBridgeFactory xBridgeFactory = (XBridgeFactory)UnoRuntime.queryInterface(
......@@ -124,7 +128,35 @@ public class TestComponentMain
XBridge xBridge = xBridgeFactory.createBridge(
"", protDcp, xConnection, new InstanceProvider(ctx));
if (singleaccept) {
Listener listener = new Listener();
((XComponent) UnoRuntime.queryInterface(
XComponent.class, xBridge)).addEventListener(listener);
listener.await();
break;
}
}
}
private static final class Listener implements XEventListener {
public synchronized void disposing(EventObject source) {
done = true;
notifyAll();
}
public synchronized void await() {
while (!done) {
try {
wait();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
}
private boolean done = false;
}
}
......@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.5 $
# $Revision: 1.5.22.1 $
#
# This file is part of OpenOffice.org.
#
......@@ -38,7 +38,7 @@ PACKAGE = clitest
#----- compile .java files -----------------------------------------
JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar OOoRunner.jar
JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = CLITest.java
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
......
......@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.2 $
# $Revision: 1.2.12.1 $
#
# This file is part of OpenOffice.org.
#
......@@ -41,7 +41,7 @@ PACKAGE = cliversion
#----- compile .java files -----------------------------------------
JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar OOoRunner.jar
JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = VersionTestCase.java
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
......
......@@ -20,3 +20,15 @@ This will add a new compiler define (-DCOMPCHECK) and will be used in the
bridgetest.cxx to switch off the code which uses the getCaughtException function.
However, there is still a test which causes the test component to throw
and IllegalArgumentException. This still works.
Using source/bridgetest for stress testing
==========================================
Start a modified bridgetest_server (with the final "--singleaccept" argument
removed from the uno executable call) or a modified bridgetest_javaserver (with
the final "singleaccept" argument replaced with "multi" in the java executable
call), then start a modified bridgetest_client (with a final "stress" argument
added to the uno executable call). The client will continuously establish
connections to the server which are immediately destroyed again. The test will
run forever, unless an error occurs.
......@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: bridgetest.cxx,v $
* $Revision: 1.24 $
* $Revision: 1.24.18.1 $
*
* This file is part of OpenOffice.org.
*
......@@ -1160,24 +1160,47 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
}
Reference< XInterface > xOriginal;
bool remote;
sal_Int32 i;
if( rArgs.getLength() > 1 && 0 == rArgs[0].compareToAscii( "-u" ) )
{
xOriginal = UnoUrlResolver::create( m_xContext )->resolve(
rArgs[1] );
remote = true;
i = 2;
}
else
{
// local test
xOriginal =
m_xContext->getServiceManager()->createInstanceWithContext(
rArgs[0], m_xContext );
remote = false;
i = 1;
}
bool noCurrentContext = i < rArgs.getLength()
bool noCurrentContext = false;
if (i < rArgs.getLength()
&& rArgs[i].equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("noCurrentContext"));
RTL_CONSTASCII_STRINGPARAM("noCurrentContext")))
{
noCurrentContext = true;
++i;
}
bool stress = false;
if (i < rArgs.getLength()
&& rArgs[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("stress")))
{
stress = true;
++i;
}
for (;;) {
Reference< XInterface > o;
if (remote) {
o = UnoUrlResolver::create(m_xContext)->resolve(rArgs[1]);
} else {
o = m_xContext->getServiceManager()->createInstanceWithContext(
rArgs[0], m_xContext);
}
if (!stress) {
xOriginal = o;
break;
}
}
if (! xOriginal.is())
{
......
uno -ro uno_services.rdb -ro uno_types.rdb -s com.sun.star.test.bridge.CppTestObject -u "uno:socket,host=127.0.0.1,port=2002;urp;test"
uno -ro uno_services.rdb -ro uno_types.rdb -s com.sun.star.test.bridge.CppTestObject -u "uno:socket,host=127.0.0.1,port=2002;urp;test" --singleaccept
......@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.37 $
# $Revision: 1.37.18.1 $
#
# This file is part of OpenOffice.org.
#
......@@ -176,8 +176,8 @@ MY_CLASSPATH=$(strip $(subst,!,$(PATH_SEPERATOR) $(MY_CLASSPATH_TMP:s/ /!/)))$(P
# Use "127.0.0.1" instead of "localhost", see #i32281#:
$(DLLDEST)$/bridgetest_javaserver$(BATCH_SUFFIX) : makefile.mk
-rm -f $@
$(WRAPCMD) echo "java -classpath $(MY_CLASSPATH)$(PATH_SEPERATOR)..$/class$/testComponent.jar" \
com.sun.star.comp.bridge.TestComponentMain \""uno:socket,host=127.0.0.1,port=2002;urp;test"\" > $@
$(WRAPCMD) echo java -classpath "$(MY_CLASSPATH)$(PATH_SEPERATOR)..$/class$/testComponent.jar" \
com.sun.star.comp.bridge.TestComponentMain \""uno:socket,host=127.0.0.1,port=2002;urp;test"\" singleaccept > $@
$(GIVE_EXEC_RIGHTS) $@
$(DLLDEST)$/bridgetest_inprocess_java$(BATCH_SUFFIX) : makefile.mk
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment