summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/admin/Client.cpp2
-rw-r--r--cpp/test/Ice/admin/Makefile.mak32
-rw-r--r--cpp/test/Ice/admin/Server.cpp5
-rw-r--r--cpp/test/Ice/plugin/Makefile.mak2
-rw-r--r--cpp/test/WinRT/TestSuite/MainPage.xaml.cpp5
-rw-r--r--cpp/test/WinRT/TestSuite/MainPage.xaml.h2
6 files changed, 36 insertions, 12 deletions
diff --git a/cpp/test/Ice/admin/Client.cpp b/cpp/test/Ice/admin/Client.cpp
index 1da8810d6ce..feb975a964d 100644
--- a/cpp/test/Ice/admin/Client.cpp
+++ b/cpp/test/Ice/admin/Client.cpp
@@ -13,6 +13,8 @@
using namespace std;
+DEFINE_TEST("client")
+
int
run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
diff --git a/cpp/test/Ice/admin/Makefile.mak b/cpp/test/Ice/admin/Makefile.mak
index ce6f8fd85a9..72bee110e04 100644
--- a/cpp/test/Ice/admin/Makefile.mak
+++ b/cpp/test/Ice/admin/Makefile.mak
@@ -9,10 +9,18 @@
top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_admin_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -29,18 +37,24 @@ SRCS = $(COBJS:.obj=.cpp) \
CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/admin/Server.cpp b/cpp/test/Ice/admin/Server.cpp
index 172e29af439..47c295feac5 100644
--- a/cpp/test/Ice/admin/Server.cpp
+++ b/cpp/test/Ice/admin/Server.cpp
@@ -9,9 +9,12 @@
#include <Ice/Ice.h>
#include <TestI.h>
+#include <TestCommon.h>
using namespace std;
+DEFINE_TEST("server")
+
int
run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
@@ -20,7 +23,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
Ice::Identity id = communicator->stringToIdentity("factory");
adapter->add(new RemoteCommunicatorFactoryI, id);
adapter->activate();
-
+ TEST_READY
communicator->waitForShutdown();
return EXIT_SUCCESS;
}
diff --git a/cpp/test/Ice/plugin/Makefile.mak b/cpp/test/Ice/plugin/Makefile.mak
index c1baf6957f2..30d3a48580c 100644
--- a/cpp/test/Ice/plugin/Makefile.mak
+++ b/cpp/test/Ice/plugin/Makefile.mak
@@ -52,7 +52,7 @@ $(PLUGINDIR)\$(LIBNAME): $(PLUGINDIR)\$(DLLNAME)
$(PLUGINDIR)\$(DLLNAME): $(POBJS)
$(LINK) $(BASE):0x22000000 $(LD_DLLFLAGS) $(PDBFLAGS) $(POBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH)
- move $(PLUGINDIR)\$(DLLNAME:.dll=.lib) $(PLUGINDIR)\$(LIBNAME)
+ @if exist $(PLUGINDIR)\$(DLLNAME:.dll=.lib) move $(PLUGINDIR)\$(DLLNAME:.dll=.lib) $(PLUGINDIR)\$(LIBNAME)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest
@if exist $(PLUGINDIR)\$(DLLNAME:.dll=.exp) del /q $(PLUGINDIR)\$(DLLNAME:.dll=.exp)
diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
index becadead55f..93985a76a52 100644
--- a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
+++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
@@ -387,6 +387,7 @@ public:
try
{
clientRunable->waitForCompleted();
+ clientRunable->getThreadControl().detach();
}
catch(...)
{
@@ -394,6 +395,7 @@ public:
{
serverRunable->shutdown();
serverRunable->waitForCompleted();
+ serverRunable->getThreadControl().detach();
}
throw;
}
@@ -401,6 +403,7 @@ public:
if(serverRunable)
{
serverRunable->waitForCompleted();
+ serverRunable->getThreadControl().detach();
}
}
@@ -412,6 +415,7 @@ public:
RunnablePtr clientRunable = new Runnable(_test.prefix + client, cltConfig);
clientRunable->start();
clientRunable->waitForCompleted();
+ clientRunable->getThreadControl().detach();
}
private:
@@ -509,4 +513,5 @@ MainPage::runSelectedTest()
TestRunnerPtr t = new TestRunner(allTest[TestList->SelectedIndex], config);
t->start();
+ t->getThreadControl().detach();
}
diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml.h b/cpp/test/WinRT/TestSuite/MainPage.xaml.h
index f9fbaf596a5..ee23363b5a2 100644
--- a/cpp/test/WinRT/TestSuite/MainPage.xaml.h
+++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.h
@@ -24,7 +24,7 @@ public:
MainPage();
void completed();
- void failed(Platform::String^);
+ void failed(Platform::String^ reason);
protected: