summaryrefslogtreecommitdiff
path: root/testtools/source
diff options
context:
space:
mode:
Diffstat (limited to 'testtools/source')
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx41
-rw-r--r--testtools/source/bridgetest/bridgetest_server2
-rw-r--r--testtools/source/bridgetest/makefile.mk6
3 files changed, 36 insertions, 13 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index 124b97e1c868..d8b3a120bf68 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -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())
{
diff --git a/testtools/source/bridgetest/bridgetest_server b/testtools/source/bridgetest/bridgetest_server
index 8ca8180fc78f..565513ff9c48 100644
--- a/testtools/source/bridgetest/bridgetest_server
+++ b/testtools/source/bridgetest/bridgetest_server
@@ -1 +1 @@
-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
diff --git a/testtools/source/bridgetest/makefile.mk b/testtools/source/bridgetest/makefile.mk
index e2824c37caee..b8e178c0158f 100644
--- a/testtools/source/bridgetest/makefile.mk
+++ b/testtools/source/bridgetest/makefile.mk
@@ -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