diff options
author | Marc Laukien <marc@zeroc.com> | 2002-09-30 17:51:43 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-09-30 17:51:43 +0000 |
commit | e1e3c23eb93918e12ffbe031608dfbd50d68a14c (patch) | |
tree | 22056f159dfd4601a05aa298ec54ebf243428c35 /cpp/test | |
parent | Fixed typo in comment. (diff) | |
download | ice-e1e3c23eb93918e12ffbe031608dfbd50d68a14c.tar.bz2 ice-e1e3c23eb93918e12ffbe031608dfbd50d68a14c.tar.xz ice-e1e3c23eb93918e12ffbe031608dfbd50d68a14c.zip |
bug fixes ; added adapter deactivation tests
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/AllTests.cpp | 37 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/Client.cpp | 50 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/Collocated.cpp | 57 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp | 58 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/ServantLocatorI.h | 32 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/Server.cpp | 42 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/TestI.cpp | 29 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/TestI.h | 30 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/adapterdeactivationC.dsp | 161 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/adapterdeactivationCOL.dsp | 153 | ||||
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/adapterdeactivationS.dsp | 173 | ||||
-rwxr-xr-x | cpp/test/Ice/adapterDeactivation/run.py | 28 |
12 files changed, 850 insertions, 0 deletions
diff --git a/cpp/test/Ice/adapterDeactivation/AllTests.cpp b/cpp/test/Ice/adapterDeactivation/AllTests.cpp new file mode 100644 index 00000000000..784861f259a --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/AllTests.cpp @@ -0,0 +1,37 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestCommon.h> +#include <Test.h> + +using namespace std; +using namespace Ice; + +TestPrx +allTests(const CommunicatorPtr& communicator) +{ + cout << "testing stringToProxy... " << flush; + ObjectPrx base = communicator->stringToProxy("test:default -p 12345 -t 2000"); + test(base); + cout << "ok" << endl; + + cout << "testing checked cast... " << flush; + TestPrx obj = TestPrx::checkedCast(base); + test(obj); + test(obj == base); + cout << "ok" << endl; + + cout << "deactivating object adapter in the server... " << flush; + obj->deactivate(); + cout << "ok" << endl; + + return obj; +} diff --git a/cpp/test/Ice/adapterDeactivation/Client.cpp b/cpp/test/Ice/adapterDeactivation/Client.cpp new file mode 100644 index 00000000000..a0420bdcf95 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/Client.cpp @@ -0,0 +1,50 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Application.h> +#include <TestCommon.h> +#include <Test.h> + +using namespace std; +using namespace Ice; + +class TestServer : public Application +{ +public: + + virtual int run(int, char*[]); +}; + +int +main(int argc, char* argv[]) +{ + TestServer app; + return app.main(argc, argv); +} + +int +TestServer::run(int argc, char* argv[]) +{ + TestPrx allTests(const CommunicatorPtr&); + TestPrx obj = allTests(communicator()); + + cout << "testing whether server is gone... " << flush; + try + { + obj->ice_ping(); + test(false); + } + catch(const LocalException&) + { + cout << "ok" << endl; + } + + return EXIT_SUCCESS; +} diff --git a/cpp/test/Ice/adapterDeactivation/Collocated.cpp b/cpp/test/Ice/adapterDeactivation/Collocated.cpp new file mode 100644 index 00000000000..1b195e68098 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/Collocated.cpp @@ -0,0 +1,57 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Application.h> +#include <ServantLocatorI.h> +#include <TestCommon.h> +#include <Test.h> + +using namespace std; +using namespace Ice; + +class TestServer : public Application +{ +public: + + virtual int run(int, char*[]); +}; + +int +main(int argc, char* argv[]) +{ + TestServer app; + return app.main(argc, argv); +} + +int +TestServer::run(int argc, char* argv[]) +{ + communicator()->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12345 -t 2000"); + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); + ServantLocatorPtr locator = new ServantLocatorI; + adapter->addServantLocator(locator, ""); + + TestPrx allTests(const CommunicatorPtr&); + TestPrx obj = allTests(communicator()); + + cout << "testing whether server is gone... " << flush; + try + { + obj->ice_ping(); + test(false); + } + catch(const LocalException&) + { + cout << "ok" << endl; + } + + adapter->waitForDeactivate(); + return EXIT_SUCCESS; +} diff --git a/cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp b/cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp new file mode 100644 index 00000000000..c0fb472b343 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp @@ -0,0 +1,58 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// Mutable Realms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <ServantLocatorI.h>
+#include <TestCommon.h>
+#include <TestI.h>
+
+using namespace std;
+using namespace Ice;
+
+ServantLocatorI::ServantLocatorI() :
+ _deactivated(false)
+{
+}
+
+ServantLocatorI::~ServantLocatorI()
+{
+ test(_deactivated);
+}
+
+Ice::ObjectPtr
+ServantLocatorI::locate(const Ice::Current& current, Ice::LocalObjectPtr& cookie)
+{
+ test(!_deactivated);
+
+ test(current.id.category == "");
+ test(current.id.name == "test");
+
+ cookie = new CookieI;
+
+ return new TestI;
+}
+
+void
+ServantLocatorI::finished(const Ice::Current& current, const Ice::ObjectPtr& servant,
+ const Ice::LocalObjectPtr& cookie)
+{
+ test(!_deactivated);
+
+ CookiePtr co = CookiePtr::dynamicCast(cookie);
+ test(co);
+ test(co->message() == "blahblah");
+}
+
+void
+ServantLocatorI::deactivate()
+{
+ test(!_deactivated);
+
+ _deactivated = true;
+}
diff --git a/cpp/test/Ice/adapterDeactivation/ServantLocatorI.h b/cpp/test/Ice/adapterDeactivation/ServantLocatorI.h new file mode 100644 index 00000000000..03b335634ae --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/ServantLocatorI.h @@ -0,0 +1,32 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// Mutable Realms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef SERVANT_LOCATOR_I_H
+#define SERVANT_LOCATOR_I_H
+
+#include <Ice/Ice.h>
+
+class ServantLocatorI : public Ice::ServantLocator
+{
+public:
+
+ ServantLocatorI();
+ virtual ~ServantLocatorI();
+
+ virtual Ice::ObjectPtr locate(const Ice::Current&, Ice::LocalObjectPtr&);
+ virtual void finished(const Ice::Current&, const Ice::ObjectPtr&, const Ice::LocalObjectPtr&);
+ virtual void deactivate();
+
+public:
+
+ bool _deactivated;
+};
+
+#endif
diff --git a/cpp/test/Ice/adapterDeactivation/Server.cpp b/cpp/test/Ice/adapterDeactivation/Server.cpp new file mode 100644 index 00000000000..9ec51415399 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/Server.cpp @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Application.h> +#include <ServantLocatorI.h> +#include <TestCommon.h> + +using namespace std; +using namespace Ice; + +class TestServer : public Application +{ +public: + + virtual int run(int, char*[]); +}; + +int +main(int argc, char* argv[]) +{ + TestServer app; + return app.main(argc, argv); +} + +int +TestServer::run(int argc, char* argv[]) +{ + communicator()->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12345 -t 2000"); + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); + ServantLocatorPtr locator = new ServantLocatorI; + adapter->addServantLocator(locator, ""); + adapter->activate(); + adapter->waitForDeactivate(); + return EXIT_SUCCESS; +} diff --git a/cpp/test/Ice/adapterDeactivation/TestI.cpp b/cpp/test/Ice/adapterDeactivation/TestI.cpp new file mode 100644 index 00000000000..6ea26450b51 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/TestI.cpp @@ -0,0 +1,29 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <IceUtil/IceUtil.h> +#include <Ice/Ice.h> +#include <TestI.h> + +using namespace std; +using namespace Ice; + +void +TestI::deactivate(const Current& current) +{ + current.adapter->deactivate(); + IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1)); +} + +string +CookieI::message() const +{ + return "blahblah"; +} diff --git a/cpp/test/Ice/adapterDeactivation/TestI.h b/cpp/test/Ice/adapterDeactivation/TestI.h new file mode 100644 index 00000000000..7c845772320 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/TestI.h @@ -0,0 +1,30 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#ifndef TEST_I_H +#define TEST_I_H + +#include <Test.h> + +class TestI : public Test +{ +public: + + virtual void deactivate(const Ice::Current&); +}; + +class CookieI : public Cookie +{ +public: + + virtual std::string message() const; +}; + +#endif diff --git a/cpp/test/Ice/adapterDeactivation/adapterdeactivationC.dsp b/cpp/test/Ice/adapterDeactivation/adapterdeactivationC.dsp new file mode 100644 index 00000000000..629ffee07a7 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/adapterdeactivationC.dsp @@ -0,0 +1,161 @@ +# Microsoft Developer Studio Project File - Name="adapterDeactivationC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=adapterDeactivationC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "adapterDeactivationC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "adapterDeactivationC.mak" CFG="adapterDeactivationC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "adapterDeactivationC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "adapterDeactivationC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "adapterDeactivationC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "adapterDeactivationC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../include" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /GZ /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "adapterDeactivationC - Win32 Release"
+# Name "adapterDeactivationC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "adapterDeactivationC - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "adapterDeactivationC - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/adapterDeactivation/adapterdeactivationCOL.dsp b/cpp/test/Ice/adapterDeactivation/adapterdeactivationCOL.dsp new file mode 100644 index 00000000000..c9abfb4a184 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/adapterdeactivationCOL.dsp @@ -0,0 +1,153 @@ +# Microsoft Developer Studio Project File - Name="adapterDeactivationCOL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=adapterDeactivationCOL - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "adapterDeactivationCOL.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "adapterDeactivationCOL.mak" CFG="adapterDeactivationCOL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "adapterDeactivationCOL - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "adapterDeactivationCOL - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "adapterDeactivationCOL - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "adapterDeactivationCOL - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../include" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /GZ /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "adapterDeactivationCOL - Win32 Release"
+# Name "adapterDeactivationCOL - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "adapterDeactivationCOL - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "adapterDeactivationCOL - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/adapterDeactivation/adapterdeactivationS.dsp b/cpp/test/Ice/adapterDeactivation/adapterdeactivationS.dsp new file mode 100644 index 00000000000..013c60d0cbb --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/adapterdeactivationS.dsp @@ -0,0 +1,173 @@ +# Microsoft Developer Studio Project File - Name="adapterDeactivationS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=adapterDeactivationS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "adapterDeactivationS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "adapterDeactivationS.mak" CFG="adapterDeactivationS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "adapterDeactivationS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "adapterDeactivationS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "adapterDeactivationS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "adapterDeactivationS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../include" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /GZ /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "adapterDeactivationS - Win32 Release"
+# Name "adapterDeactivationS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\ServantLocatorI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\ServantLocatorI.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "adapterDeactivationS - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "adapterDeactivationS - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/adapterDeactivation/run.py b/cpp/test/Ice/adapterDeactivation/run.py new file mode 100755 index 00000000000..f00abe8cd81 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/run.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2001 +# Mutable Realms, Inc. +# Huntsville, AL, USA +# +# All Rights Reserved +# +# ********************************************************************** + +import os, sys + +for toplevel in [".", "..", "../..", "../../..", "../../../.."]: + toplevel = os.path.normpath(toplevel) + if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): + break +else: + raise "can't find toplevel directory!" + +sys.path.append(os.path.join(toplevel, "config")) +import TestUtil + +name = os.path.join("Ice", "adapterDeactivation") + +TestUtil.clientServerTest(toplevel, name) +TestUtil.collocatedTest(toplevel, name) +sys.exit(0) |