summaryrefslogtreecommitdiff
path: root/TAO/tests
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests')
-rw-r--r--TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc1
-rw-r--r--TAO/tests/AMH_Exceptions/client.cpp7
-rwxr-xr-xTAO/tests/AMH_Exceptions/run_test.pl2
-rw-r--r--TAO/tests/AMH_Exceptions/server.cpp10
-rw-r--r--TAO/tests/AMH_Oneway/AMH_Oneway.mpc1
-rw-r--r--TAO/tests/AMH_Oneway/client.cpp12
-rwxr-xr-xTAO/tests/AMH_Oneway/run_test.pl20
-rw-r--r--TAO/tests/AMH_Oneway/server.cpp15
-rw-r--r--TAO/tests/AMI/AMI.mpc2
-rw-r--r--TAO/tests/AMI/client.cpp24
-rwxr-xr-xTAO/tests/AMI/run_test.pl13
-rw-r--r--TAO/tests/AMI/server.cpp14
-rw-r--r--TAO/tests/AMI/simple_client.cpp29
-rw-r--r--TAO/tests/AMI_Buffering/AMI_Buffering.mpc2
-rw-r--r--TAO/tests/AMI_Buffering/Reply_Handler.cpp12
-rw-r--r--TAO/tests/AMI_Buffering/Reply_Handler.h6
-rw-r--r--TAO/tests/AMI_Buffering/admin.cpp14
-rw-r--r--TAO/tests/AMI_Buffering/client.cpp12
-rw-r--r--TAO/tests/AMI_Buffering/server.cpp14
-rw-r--r--TAO/tests/AMI_Timeouts/client.cpp12
-rw-r--r--TAO/tests/AMI_Timeouts/server.cpp14
-rw-r--r--TAO/tests/AMI_Timeouts/timeout_i.cpp4
-rw-r--r--TAO/tests/AMI_Timeouts/timeout_i.h2
-rw-r--r--TAO/tests/Abstract_Interface/Abstract_Interface.mpc1
-rw-r--r--TAO/tests/Abstract_Interface/client.cpp14
-rw-r--r--TAO/tests/Abstract_Interface/server.cpp16
-rw-r--r--TAO/tests/Abstract_Interface/test_i.cpp2
-rwxr-xr-xTAO/tests/AlternateIIOP/run_test.pl4
-rw-r--r--TAO/tests/AlternateIIOP/svc.conf1
-rw-r--r--TAO/tests/Any/Recursive/RecursiveHello.mpc3
-rw-r--r--TAO/tests/Any/Recursive/Test.idl50
-rw-r--r--TAO/tests/Any/Recursive/client.cpp65
-rw-r--r--TAO/tests/Any/Recursive/server.cpp13
-rw-r--r--TAO/tests/BiDirectional/BiDirectional.mpc1
-rw-r--r--TAO/tests/BiDirectional/client.cpp11
-rwxr-xr-xTAO/tests/BiDirectional/run_test_ipv6.pl6
-rw-r--r--TAO/tests/BiDirectional/server.cpp13
-rw-r--r--TAO/tests/BiDirectional/test_i.cpp3
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/BiDir_DelayedUpcall.mpc18
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/README6
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/client.cpp173
-rwxr-xr-xTAO/tests/BiDirectional_DelayedUpcall/run_test.pl48
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/server.cpp164
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/test.idl27
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/test_i.cpp106
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/test_i.h93
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/test_i.i17
-rw-r--r--TAO/tests/BiDirectional_MultipleORB/destroy.cpp9
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc1
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/client.cpp13
-rwxr-xr-xTAO/tests/BiDirectional_NestedUpcall/run_test.pl9
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/server.cpp13
-rw-r--r--TAO/tests/Big_AMI/Big_AMI.mpc1
-rw-r--r--TAO/tests/Big_AMI/client.cpp14
-rw-r--r--TAO/tests/Big_AMI/server.cpp13
-rw-r--r--TAO/tests/Big_Oneways/Big_Oneways.mpc1
-rw-r--r--TAO/tests/Big_Oneways/client.cpp11
-rw-r--r--TAO/tests/Big_Oneways/server.cpp13
-rw-r--r--TAO/tests/Big_Reply/Big_Reply.mpc1
-rw-r--r--TAO/tests/Big_Reply/client.cpp11
-rw-r--r--TAO/tests/Big_Reply/server.cpp13
-rw-r--r--TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc1
-rw-r--r--TAO/tests/Big_Request_Muxing/client.cpp11
-rw-r--r--TAO/tests/Big_Request_Muxing/server.cpp29
-rw-r--r--TAO/tests/Big_Twoways/Big_Twoways.mpc1
-rw-r--r--TAO/tests/Big_Twoways/client.cpp11
-rw-r--r--TAO/tests/Big_Twoways/server.cpp13
-rw-r--r--TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc1
-rw-r--r--TAO/tests/Blocking_Sync_None/client.cpp11
-rw-r--r--TAO/tests/Blocking_Sync_None/server.cpp13
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc1
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1020_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1020_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc1
-rw-r--r--TAO/tests/Bug_1269_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1269_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1269_Regression/shutdown.cpp11
-rw-r--r--TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc2
-rw-r--r--TAO/tests/Bug_1270_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1270_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1270_Regression/shutdown.cpp11
-rw-r--r--TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc5
-rw-r--r--TAO/tests/Bug_1330_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1330_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc2
-rw-r--r--TAO/tests/Bug_1361_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1361_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1361_Regression/shutdown.cpp11
-rw-r--r--TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc1
-rw-r--r--TAO/tests/Bug_1476_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1476_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1482_Regression/Reply_Handler.cpp4
-rw-r--r--TAO/tests/Bug_1482_Regression/Reply_Handler.h2
-rw-r--r--TAO/tests/Bug_1482_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1482_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1482_Regression/test.mpc (renamed from TAO/tests/Bug_1482_Regression/Bug_1482_Regression.mpc)5
-rw-r--r--TAO/tests/Bug_1495_Regression/Bug_1495.mpc1
-rw-r--r--TAO/tests/Bug_1495_Regression/Client_Task.cpp48
-rw-r--r--TAO/tests/Bug_1495_Regression/Server_Task.cpp2
-rw-r--r--TAO/tests/Bug_1495_Regression/Server_Task.h2
-rw-r--r--TAO/tests/Bug_1495_Regression/Threaded_Client.cpp20
-rw-r--r--TAO/tests/Bug_1495_Regression/Threaded_Server.cpp13
-rwxr-xr-xTAO/tests/Bug_1495_Regression/run_test.pl2
-rw-r--r--TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp9
-rw-r--r--TAO/tests/Bug_1551_Regression/Reply_Handler.cpp6
-rw-r--r--TAO/tests/Bug_1551_Regression/Reply_Handler.h2
-rw-r--r--TAO/tests/Bug_1551_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1551_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1551_Regression/test.mpc (renamed from TAO/tests/Bug_1551_Regression/Bug_1551_Regression.mpc)5
-rw-r--r--TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc1
-rw-r--r--TAO/tests/Bug_1568_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1568_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1627_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1627_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1627_Regression/test.mpc (renamed from TAO/tests/Bug_1627_Regression/Bug_1627_Regression.mpc)5
-rw-r--r--TAO/tests/Bug_1635_Regression/client.cpp7
-rw-r--r--TAO/tests/Bug_1636_Regression/client.cpp7
-rw-r--r--TAO/tests/Bug_1639_Regression/struct_client.cpp6
-rw-r--r--TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc1
-rw-r--r--TAO/tests/Bug_1670_Regression/client.cpp11
-rw-r--r--TAO/tests/Bug_1670_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_1693_Test/client.cpp8
-rwxr-xr-xTAO/tests/Bug_1812_Regression/test.cpp2
-rwxr-xr-xTAO/tests/Bug_1813_Regression/test.cpp2
-rw-r--r--TAO/tests/Bug_1869_Regression/AMI.idl7
-rw-r--r--TAO/tests/Bug_1869_Regression/Bug_1869_Regression.mpc14
-rw-r--r--TAO/tests/Bug_1869_Regression/client.cpp93
-rw-r--r--TAO/tests/Bug_1869_Regression/run_test.pl40
-rw-r--r--TAO/tests/Bug_1869_Regression/server.cpp87
-rw-r--r--TAO/tests/Bug_2084_Regression/Bug_2084_Regression.mpc6
-rw-r--r--TAO/tests/Bug_2084_Regression/Client_Task.cpp100
-rw-r--r--TAO/tests/Bug_2084_Regression/Client_Task.h37
-rw-r--r--TAO/tests/Bug_2084_Regression/Collocated_Test.cpp127
-rw-r--r--TAO/tests/Bug_2084_Regression/EventNode.cpp60
-rw-r--r--TAO/tests/Bug_2084_Regression/EventNode.h38
-rw-r--r--TAO/tests/Bug_2084_Regression/Hello.cpp68
-rw-r--r--TAO/tests/Bug_2084_Regression/Hello.h38
-rw-r--r--TAO/tests/Bug_2084_Regression/Server_Task.cpp102
-rw-r--r--TAO/tests/Bug_2084_Regression/Server_Task.h48
-rw-r--r--TAO/tests/Bug_2084_Regression/Test.idl27
-rwxr-xr-xTAO/tests/Bug_2084_Regression/run_test.pl82
-rw-r--r--TAO/tests/Bug_2122_Regression/test.cpp2
-rw-r--r--TAO/tests/Bug_2124_Regression/test.cpp2
-rw-r--r--TAO/tests/Bug_2126_Regression/test.cpp2
-rw-r--r--TAO/tests/Bug_2134_Regression/Bug_2134_Regression.mpc10
-rw-r--r--TAO/tests/Bug_2134_Regression/Hello.cpp105
-rw-r--r--TAO/tests/Bug_2134_Regression/Hello.idl7
-rw-r--r--TAO/tests/Bug_2134_Regression/README5
-rwxr-xr-xTAO/tests/Bug_2134_Regression/run_test.pl22
-rwxr-xr-xTAO/tests/Bug_2144_Regression/test.cpp2
-rw-r--r--TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc1
-rw-r--r--TAO/tests/Bug_2174_Regression/client.cpp11
-rwxr-xr-xTAO/tests/Bug_2174_Regression/run_test.pl26
-rw-r--r--TAO/tests/Bug_2174_Regression/server.cpp13
-rwxr-xr-xTAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc1
-rwxr-xr-xTAO/tests/Bug_2183_Regression/client.cpp11
-rwxr-xr-xTAO/tests/Bug_2183_Regression/run_test.pl21
-rwxr-xr-xTAO/tests/Bug_2183_Regression/server.cpp13
-rw-r--r--TAO/tests/Bug_2186_Regression/Bug_2186_Regression.mpc18
-rw-r--r--TAO/tests/Bug_2186_Regression/Hello.cpp45
-rw-r--r--TAO/tests/Bug_2186_Regression/Hello.h36
-rw-r--r--TAO/tests/Bug_2186_Regression/README60
-rw-r--r--TAO/tests/Bug_2186_Regression/Test.idl22
-rw-r--r--TAO/tests/Bug_2186_Regression/client.cpp132
-rwxr-xr-xTAO/tests/Bug_2186_Regression/run_test.pl63
-rw-r--r--TAO/tests/Bug_2186_Regression/server.conf2
-rw-r--r--TAO/tests/Bug_2186_Regression/server.cpp115
-rw-r--r--TAO/tests/Bug_2201_Regression/Bug_2201_Regression.mpc9
-rw-r--r--TAO/tests/Bug_2201_Regression/TestData.idl11
-rwxr-xr-xTAO/tests/Bug_2201_Regression/run_test.pl27
-rw-r--r--TAO/tests/Bug_2201_Regression/test.cpp32
-rwxr-xr-xTAO/tests/Bug_2222_Regression/test.cpp2
-rw-r--r--TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc1
-rw-r--r--TAO/tests/Bug_2234_Regression/client.cpp25
-rwxr-xr-xTAO/tests/Bug_2234_Regression/run_test.pl13
-rw-r--r--TAO/tests/Bug_2234_Regression/server.cpp7
-rw-r--r--TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc21
-rw-r--r--TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp20
-rw-r--r--TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h21
-rw-r--r--TAO/tests/Bug_2289_Regression/README26
-rw-r--r--TAO/tests/Bug_2289_Regression/Test.idl8
-rw-r--r--TAO/tests/Bug_2289_Regression/client.cpp145
-rwxr-xr-xTAO/tests/Bug_2289_Regression/run_test.pl60
-rw-r--r--TAO/tests/Bug_2289_Regression/server.cpp142
-rw-r--r--TAO/tests/Bug_2319_Regression/Bug_2319_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2319_Regression/Test.idl17
-rwxr-xr-xTAO/tests/Bug_2319_Regression/run_test.pl24
-rw-r--r--TAO/tests/Bug_2319_Regression/server.cpp367
-rw-r--r--TAO/tests/Bug_2328_Regression/Bug_2328_Regression.mpc19
-rw-r--r--TAO/tests/Bug_2328_Regression/Hello.cpp26
-rw-r--r--TAO/tests/Bug_2328_Regression/Hello.h33
-rw-r--r--TAO/tests/Bug_2328_Regression/README16
-rw-r--r--TAO/tests/Bug_2328_Regression/Test.idl20
-rw-r--r--TAO/tests/Bug_2328_Regression/client.cpp89
-rwxr-xr-xTAO/tests/Bug_2328_Regression/run_test.pl49
-rw-r--r--TAO/tests/Bug_2328_Regression/server.cpp116
-rw-r--r--TAO/tests/Bug_2345_Regression/Bug_2345_Regression.mpc8
-rwxr-xr-xTAO/tests/Bug_2345_Regression/run_test.pl22
-rw-r--r--TAO/tests/Bug_2345_Regression/server.cpp41
-rw-r--r--TAO/tests/Bug_2349_Regression/Bug_2349_Regression.mpc17
-rw-r--r--TAO/tests/Bug_2349_Regression/client.cpp37
-rw-r--r--TAO/tests/Bug_2349_Regression/foo.idl6
-rwxr-xr-xTAO/tests/Bug_2349_Regression/run_test.pl49
-rw-r--r--TAO/tests/Bug_2349_Regression/server.cpp90
-rwxr-xr-xTAO/tests/Bug_2375_Regression/Bug_2375_Regression.mpc8
-rwxr-xr-xTAO/tests/Bug_2375_Regression/README5
-rwxr-xr-xTAO/tests/Bug_2375_Regression/test.cpp11
-rwxr-xr-xTAO/tests/Bug_2375_Regression/test.idl5
-rw-r--r--TAO/tests/Bug_2399_Regression/Bug_2399_Regression.mpc11
-rw-r--r--TAO/tests/Bug_2399_Regression/README8
-rw-r--r--TAO/tests/Bug_2399_Regression/included.idl5
-rw-r--r--TAO/tests/Bug_2399_Regression/mytmp/included.idl3
-rw-r--r--TAO/tests/Bug_2399_Regression/test.cpp10
-rw-r--r--TAO/tests/Bug_2399_Regression/test.idl7
-rw-r--r--TAO/tests/Bug_2417_Regression/Bug_2417_Regression.mpc19
-rw-r--r--TAO/tests/Bug_2417_Regression/client.cpp77
-rw-r--r--TAO/tests/Bug_2417_Regression/publisher.idl10
-rw-r--r--TAO/tests/Bug_2417_Regression/publisher_impl.cpp165
-rw-r--r--TAO/tests/Bug_2417_Regression/publisher_impl.h37
-rwxr-xr-xTAO/tests/Bug_2417_Regression/run_test.pl54
-rw-r--r--TAO/tests/Bug_2417_Regression/server.cpp93
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber.idl7
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber_impl.cpp45
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber_impl.h34
-rw-r--r--TAO/tests/Bug_2419_Regression/Bug_2419_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2419_Regression/README3
-rw-r--r--TAO/tests/Bug_2419_Regression/abstract_parent.idl6
-rw-r--r--TAO/tests/Bug_2419_Regression/client.cpp8
-rw-r--r--TAO/tests/Bug_2419_Regression/local_child.idl6
-rw-r--r--TAO/tests/Bug_2424_Regression/Bug_2424_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2424_Regression/OneLineCosNaming.idl2
-rw-r--r--TAO/tests/Bug_2424_Regression/README5
-rw-r--r--TAO/tests/Bug_2424_Regression/client.cpp8
-rw-r--r--TAO/tests/Bug_2429_Regression/Bug_2429_Regression.mpc21
-rw-r--r--TAO/tests/Bug_2429_Regression/Child.idl8
-rw-r--r--TAO/tests/Bug_2429_Regression/ChildServant.cpp30
-rw-r--r--TAO/tests/Bug_2429_Regression/ChildServant.h24
-rw-r--r--TAO/tests/Bug_2429_Regression/Parent.idl8
-rw-r--r--TAO/tests/Bug_2429_Regression/README16
-rw-r--r--TAO/tests/Bug_2429_Regression/client.cpp185
-rwxr-xr-xTAO/tests/Bug_2429_Regression/run_test.pl44
-rw-r--r--TAO/tests/Bug_2429_Regression/server.cpp105
-rw-r--r--TAO/tests/Bug_2494_Regression/Bug_2494_Regression.mpc19
-rw-r--r--TAO/tests/Bug_2494_Regression/README34
-rw-r--r--TAO/tests/Bug_2494_Regression/client.cpp137
-rwxr-xr-xTAO/tests/Bug_2494_Regression/run_test.pl68
-rw-r--r--TAO/tests/Bug_2494_Regression/server.cpp157
-rw-r--r--TAO/tests/Bug_2494_Regression/test.idl10
-rw-r--r--TAO/tests/Bug_2494_Regression/test_i.cpp29
-rw-r--r--TAO/tests/Bug_2494_Regression/test_i.h36
-rw-r--r--TAO/tests/Bug_2494_Regression/test_i.inl7
-rw-r--r--TAO/tests/CDR/alignment.cpp6
-rw-r--r--TAO/tests/CDR/allocator.cpp9
-rw-r--r--TAO/tests/CDR/basic_types.cpp11
-rw-r--r--TAO/tests/CDR/growth.cpp7
-rw-r--r--TAO/tests/CDR/octet_sequence.cpp2
-rw-r--r--TAO/tests/CDR/tc.cpp11
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/CSD_TP_Broken.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.cpp328
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.h78
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.cpp427
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.h85
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/client_main.cpp7
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/Broken/run_test.pl186
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/README117
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp102
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h114
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.cpp85
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.h42
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Export.h58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib.mpc39
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/CancelledException.idl7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.cpp12
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.h38
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.cpp116
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.h51
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/CustomException.idl7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/FooException.idl7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.cpp58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.h24
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.cpp75
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.h40
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.cpp99
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.h38
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.cpp135
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.h68
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.cpp35
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.h24
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.cpp30
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.h36
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppException.idl7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppMain.h49
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/CSD_TP_Foo_A_Export.h58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A.idl29
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.cpp94
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.h40
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.cpp88
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.h34
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.cpp82
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.h43
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/csd_tp_foo_a_lib.mpc20
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/CSD_TP_Foo_B_Export.h58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback.idl11
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.cpp28
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.h31
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B.idl70
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.cpp210
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.h47
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.cpp83
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.h47
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.cpp218
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.h54
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.cpp297
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.h92
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/csd_tp_foo_b_lib.mpc25
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/CSD_TP_Foo_C_Export.h58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C.idl29
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.cpp92
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.h40
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.cpp136
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.h42
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.cpp153
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.h52
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.cpp111
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.h35
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.cpp65
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.h45
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.cpp66
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.h50
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp69
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.h51
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.cpp52
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.h47
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.cpp81
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.h50
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.cpp148
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.h53
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/csd_tp_foo_c_lib.mpc27
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/CSD_TP_Test_1.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.cpp84
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.h28
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.cpp192
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.h30
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/client_main.cpp5
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl60
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/CSD_TP_Test_2.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.cpp196
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.h51
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.cpp375
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.h79
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/client_main.cpp7
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl186
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/server_main.cpp7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/CSD_TP_Test_3.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.cpp326
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.h78
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.cpp428
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.h85
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/client_main.cpp7
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl186
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/CSD_TP_Test_4.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp199
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h52
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/README337
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp391
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h79
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/client_main.cpp7
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl191
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/CSD_TP_Test_Dynamic.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.cpp25
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.h33
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/README37
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Test.idl20
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/client.cpp86
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl49
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/server.cpp119
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/svc.conf1
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/CSD_TP_Test_Static.mpc22
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.cpp87
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.h28
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README38
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.cpp175
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.h30
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/client_main.cpp5
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl61
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/svc.conf1
-rw-r--r--TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc1
-rw-r--r--TAO/tests/Cache_Growth_Test/client.cpp11
-rw-r--r--TAO/tests/Cache_Growth_Test/server.cpp13
-rw-r--r--TAO/tests/CallbackTest/CallbackTest.mpc1
-rw-r--r--TAO/tests/CallbackTest/client.cpp11
-rwxr-xr-xTAO/tests/CallbackTest/run_test_ipv6.pl6
-rw-r--r--TAO/tests/CallbackTest/server.cpp13
-rw-r--r--TAO/tests/Client_Leaks/Client_Leaks.mpc2
-rw-r--r--TAO/tests/Client_Leaks/Process_Factory.cpp8
-rw-r--r--TAO/tests/Client_Leaks/child.cpp9
-rw-r--r--TAO/tests/Client_Leaks/client.cpp11
-rw-r--r--TAO/tests/Client_Leaks/server.cpp13
-rw-r--r--TAO/tests/CodeSets/simple/CodeSets_simple.mpc1
-rw-r--r--TAO/tests/CodeSets/simple/client.cpp25
-rw-r--r--TAO/tests/CodeSets/simple/server.cpp12
-rw-r--r--TAO/tests/Codec/Codec.mpc2
-rw-r--r--TAO/tests/Codec/client.cpp248
-rw-r--r--TAO/tests/Collocation/Collocation.cpp7
-rw-r--r--TAO/tests/Collocation/Collocation.mpc12
-rw-r--r--TAO/tests/CollocationLockup/AB.idl8
-rw-r--r--TAO/tests/CollocationLockup/CollocationLockup.cpp144
-rw-r--r--TAO/tests/CollocationLockup/CollocationLockup.mpc27
-rw-r--r--TAO/tests/CollocationLockup/SimpleNamingService.cpp74
-rw-r--r--TAO/tests/CollocationLockup/SimpleNamingService.idl9
-rwxr-xr-xTAO/tests/CollocationLockup/run_test.pl61
-rw-r--r--TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp19
-rw-r--r--TAO/tests/Collocation_Exception_Test/Server_Task.cpp2
-rw-r--r--TAO/tests/Collocation_Exception_Test/Server_Task.h2
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp19
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp2
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Server_Task.h2
-rw-r--r--TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp9
-rw-r--r--TAO/tests/Collocation_Tests/Collocated_Test.cpp19
-rw-r--r--TAO/tests/Collocation_Tests/Server_Task.cpp2
-rw-r--r--TAO/tests/Collocation_Tests/Server_Task.h2
-rw-r--r--TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc1
-rw-r--r--TAO/tests/Connect_Strategy_Test/client.cpp11
-rw-r--r--TAO/tests/Connect_Strategy_Test/server.cpp13
-rw-r--r--TAO/tests/Connection_Failure/client.cpp7
-rw-r--r--TAO/tests/Connection_Purging/Connection_Purging.mpc1
-rw-r--r--TAO/tests/Connection_Purging/client.cpp11
-rw-r--r--TAO/tests/Connection_Purging/server.cpp13
-rw-r--r--TAO/tests/Connection_Timeout/Connection_Timeout.mpc1
-rw-r--r--TAO/tests/Connection_Timeout/client.cpp11
-rw-r--r--TAO/tests/Crash_On_Write/Crash_On_Write.mpc1
-rw-r--r--TAO/tests/Crash_On_Write/client.cpp11
-rw-r--r--TAO/tests/Crash_On_Write/server.cpp15
-rw-r--r--TAO/tests/Crashed_Callback/Crashed_Callback.mpc1
-rw-r--r--TAO/tests/Crashed_Callback/client.cpp11
-rw-r--r--TAO/tests/Crashed_Callback/server.cpp13
-rw-r--r--TAO/tests/DLL_ORB/DLL_ORB.mpc5
-rw-r--r--TAO/tests/DLL_ORB/Test_Client_Module.cpp5
-rw-r--r--TAO/tests/DLL_ORB/Test_Client_Module.h2
-rw-r--r--TAO/tests/DLL_ORB/Test_Server_Module.cpp7
-rw-r--r--TAO/tests/DLL_ORB/Test_Server_Module.h2
-rw-r--r--TAO/tests/DLL_ORB/client.cpp2
-rw-r--r--TAO/tests/DLL_ORB/server.cpp2
-rw-r--r--TAO/tests/DSI_Gateway/DSI_Gateway.mpc2
-rw-r--r--TAO/tests/DSI_Gateway/client.cpp11
-rw-r--r--TAO/tests/DSI_Gateway/gateway.cpp13
-rw-r--r--TAO/tests/DSI_Gateway/server.cpp13
-rw-r--r--TAO/tests/DynAny_Test/data.h2
-rw-r--r--TAO/tests/DynAny_Test/driver.cpp9
-rw-r--r--TAO/tests/DynAny_Test/test_dynsequence.cpp2
-rw-r--r--TAO/tests/DynAny_Test/test_dynstruct.cpp2
-rw-r--r--TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc1
-rw-r--r--TAO/tests/Explicit_Event_Loop/client.cpp11
-rw-r--r--TAO/tests/Explicit_Event_Loop/server.cpp15
-rw-r--r--TAO/tests/Exposed_Policies/Exposed_Policies.mpc1
-rw-r--r--TAO/tests/Exposed_Policies/Policy_Tester.cpp8
-rw-r--r--TAO/tests/Exposed_Policies/Policy_Verifier.cpp4
-rw-r--r--TAO/tests/Exposed_Policies/RT_Properties.cpp2
-rw-r--r--TAO/tests/Exposed_Policies/client.cpp7
-rw-r--r--TAO/tests/Exposed_Policies/server.cpp7
-rw-r--r--TAO/tests/FL_Cube/FL_Cube.mpc1
-rw-r--r--TAO/tests/FL_Cube/client.cpp15
-rw-r--r--TAO/tests/FL_Cube/server.cpp13
-rw-r--r--TAO/tests/Faults/Faults.mpc3
-rw-r--r--TAO/tests/Faults/client.cpp11
-rw-r--r--TAO/tests/Faults/middle.cpp13
-rw-r--r--TAO/tests/Faults/ping.cpp13
-rw-r--r--TAO/tests/Faults/pong.cpp11
-rw-r--r--TAO/tests/Faults/server.cpp13
-rw-r--r--TAO/tests/File_IO/File_IO.mpc1
-rw-r--r--TAO/tests/File_IO/File_i.cpp2
-rw-r--r--TAO/tests/File_IO/client.cpp11
-rw-r--r--TAO/tests/File_IO/server.cpp13
-rw-r--r--TAO/tests/Forwarding/Forwarding.mpc1
-rw-r--r--TAO/tests/Forwarding/client.cpp11
-rw-r--r--TAO/tests/Forwarding/server.cpp13
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp11
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp13
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp13
-rw-r--r--TAO/tests/Hang_Shutdown/Hang.mpc2
-rw-r--r--TAO/tests/Hang_Shutdown/Test.idl16
-rw-r--r--TAO/tests/Hang_Shutdown/client.cpp412
-rw-r--r--TAO/tests/Hang_Shutdown/server.cpp182
-rw-r--r--TAO/tests/Hang_Shutdown/test_i.h45
-rw-r--r--TAO/tests/Hello/Hello.mpc1
-rw-r--r--TAO/tests/Hello/client.cpp11
-rw-r--r--TAO/tests/Hello/server.cpp13
-rw-r--r--TAO/tests/ICMG_Any_Bug/Hello.mpc1
-rwxr-xr-xTAO/tests/ICMG_Any_Bug/client.cpp11
-rwxr-xr-xTAO/tests/ICMG_Any_Bug/server.cpp13
-rw-r--r--TAO/tests/IDL_Test/array.idl29
-rw-r--r--TAO/tests/IDL_Test/constants.idl16
-rw-r--r--TAO/tests/IDL_Test/included.idl15
-rw-r--r--TAO/tests/IDL_Test/including.idl18
-rw-r--r--TAO/tests/IDL_Test/interface.idl58
-rw-r--r--TAO/tests/IDL_Test/main.cpp9
-rw-r--r--TAO/tests/IDL_Test/sequence.idl12
-rw-r--r--TAO/tests/IORManipulation/IORTest.cpp9
-rw-r--r--TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp7
-rw-r--r--TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp2
-rw-r--r--TAO/tests/IPV6/IPV6_Hello.mpc1
-rw-r--r--TAO/tests/IPV6/client.cpp11
-rwxr-xr-xTAO/tests/IPV6/run_test.pl14
-rw-r--r--TAO/tests/IPV6/server.cpp13
-rw-r--r--TAO/tests/InterOp-Naming/INS_test_client.cpp13
-rw-r--r--TAO/tests/InterOp-Naming/INS_test_server.cpp6
-rw-r--r--TAO/tests/InterOp-Naming/InterOp-Naming.mpc1
-rw-r--r--TAO/tests/InterOp-Naming/Server_i.cpp4
-rw-r--r--TAO/tests/InterOp-Naming/Server_i.h1
-rw-r--r--TAO/tests/Leader_Followers/Leader_Followers.mpc1
-rw-r--r--TAO/tests/Leader_Followers/client.cpp13
-rw-r--r--TAO/tests/Leader_Followers/server.cpp15
-rw-r--r--TAO/tests/LongUpcalls/AMI_Manager.cpp8
-rw-r--r--TAO/tests/LongUpcalls/AMI_Manager.h4
-rw-r--r--TAO/tests/LongUpcalls/LongUpcalls.mpc7
-rw-r--r--TAO/tests/LongUpcalls/Manager_Handler.cpp4
-rw-r--r--TAO/tests/LongUpcalls/Manager_Handler.h2
-rw-r--r--TAO/tests/LongUpcalls/ami_client.cpp11
-rw-r--r--TAO/tests/LongUpcalls/ami_server.cpp13
-rw-r--r--TAO/tests/LongUpcalls/blocking_client.cpp11
-rw-r--r--TAO/tests/LongUpcalls/blocking_server.cpp13
-rw-r--r--TAO/tests/MProfile/MProfile.mpc1
-rw-r--r--TAO/tests/MProfile/client.cpp11
-rw-r--r--TAO/tests/MProfile/server.cpp13
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc1
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/client.cpp11
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/server.cpp15
-rw-r--r--TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc2
-rw-r--r--TAO/tests/MProfile_Forwarding/Manager.cpp16
-rw-r--r--TAO/tests/MProfile_Forwarding/client.cpp11
-rwxr-xr-xTAO/tests/MProfile_Forwarding/server.cpp13
-rw-r--r--TAO/tests/MT_BiDir/MT_BiDir.mpc1
-rw-r--r--TAO/tests/MT_BiDir/Sender_i.h4
-rw-r--r--TAO/tests/MT_BiDir/Server_Task.h3
-rw-r--r--TAO/tests/MT_BiDir/client.cpp11
-rw-r--r--TAO/tests/MT_BiDir/server.cpp13
-rw-r--r--TAO/tests/MT_Client/MT_Client.mpc1
-rw-r--r--TAO/tests/MT_Client/client.cpp11
-rw-r--r--TAO/tests/MT_Client/orb_creation.cpp13
-rw-r--r--TAO/tests/MT_Client/server.cpp13
-rw-r--r--TAO/tests/MT_Server/MT_Server.mpc1
-rw-r--r--TAO/tests/MT_Server/client.cpp11
-rw-r--r--TAO/tests/MT_Server/server.cpp13
-rw-r--r--TAO/tests/MT_Timeout/MT_Timeout.mpc1
-rw-r--r--TAO/tests/MT_Timeout/client.cpp11
-rw-r--r--TAO/tests/MT_Timeout/server.cpp15
-rw-r--r--TAO/tests/Multiple/Multiple.mpc1
-rw-r--r--TAO/tests/Multiple/client.cpp7
-rw-r--r--TAO/tests/Multiple/server.cpp8
-rw-r--r--TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc1
-rw-r--r--TAO/tests/Multiple_Inheritance/client.cpp11
-rw-r--r--TAO/tests/Multiple_Inheritance/server.cpp14
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc1
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/client.cpp11
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/server.cpp13
-rw-r--r--TAO/tests/Muxing/Muxing.mpc1
-rw-r--r--TAO/tests/Muxing/client.cpp11
-rw-r--r--TAO/tests/Muxing/server.cpp13
-rw-r--r--TAO/tests/Native_Exceptions/Native_Exceptions.mpc3
-rw-r--r--TAO/tests/Native_Exceptions/client.cpp11
-rw-r--r--TAO/tests/Native_Exceptions/server.cpp13
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc5
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/client.cpp18
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/client.h1
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp2
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/local_server.h3
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/server.cpp10
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/server.h1
-rw-r--r--TAO/tests/NestedUpcall/Simple/Simple.mpc5
-rw-r--r--TAO/tests/NestedUpcall/Simple/client.cpp16
-rw-r--r--TAO/tests/NestedUpcall/Simple/server.cpp18
-rw-r--r--TAO/tests/NestedUpcall/Simple/simple-client.cpp14
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/TT.mpc8
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp8
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/initiator.h1
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp10
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/server_A.h1
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp10
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/server_B.h1
-rw-r--r--TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc1
-rw-r--r--TAO/tests/Nested_Event_Loop/client.cpp13
-rw-r--r--TAO/tests/Nested_Event_Loop/server.cpp15
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp4
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h2
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc2
-rw-r--r--TAO/tests/Nested_Upcall_Crash/client.cpp11
-rw-r--r--TAO/tests/Nested_Upcall_Crash/scavenger.cpp11
-rw-r--r--TAO/tests/Nested_Upcall_Crash/server.cpp13
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc1
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/client.cpp11
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/server.cpp13
-rw-r--r--TAO/tests/OBV/Any/AnyS_impl.cpp9
-rw-r--r--TAO/tests/OBV/Any/OBV_Any.mpc1
-rw-r--r--TAO/tests/OBV/Any/client.cpp15
-rw-r--r--TAO/tests/OBV/Any/server.cpp13
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Client_Task.cpp18
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp19
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Server_Task.cpp2
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Server_Task.h2
-rw-r--r--TAO/tests/OBV/Factory/OBV_Factory.mpc5
-rw-r--r--TAO/tests/OBV/Factory/client.cpp89
-rw-r--r--TAO/tests/OBV/Factory/server.cpp13
-rw-r--r--TAO/tests/OBV/Forward/OBV_Forward.mpc5
-rw-r--r--TAO/tests/OBV/Forward/client.cpp19
-rw-r--r--TAO/tests/OBV/Forward/server.cpp13
-rw-r--r--TAO/tests/OBV/Supports/Supports_Test.mpc2
-rw-r--r--TAO/tests/OBV/Supports/Supports_Test_impl.h1
-rw-r--r--TAO/tests/OBV/Supports/client.cpp9
-rw-r--r--TAO/tests/OBV/Supports/server.cpp8
-rw-r--r--TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc5
-rw-r--r--TAO/tests/OBV/TC_Alignment/client.cpp13
-rw-r--r--TAO/tests/OBV/TC_Alignment/server.cpp11
-rw-r--r--TAO/tests/OBV/TC_Alignment/test_i.cpp11
-rw-r--r--TAO/tests/OBV/ValueBox/Test_impl.cpp4
-rw-r--r--TAO/tests/OBV/ValueBox/client.cpp25
-rw-r--r--TAO/tests/OBV/ValueBox/server.cpp13
-rw-r--r--TAO/tests/OBV/ValueBox/valuebox.mpc5
-rw-r--r--TAO/tests/ORB_destroy/ORB_destroy.cpp29
-rw-r--r--TAO/tests/ORB_init/ORB_init.cpp15
-rw-r--r--TAO/tests/ORB_init/Portspan/server.cpp7
-rw-r--r--TAO/tests/ORB_shutdown/server.cpp7
-rw-r--r--TAO/tests/ORT/ORT_test_IORInterceptor.h2
-rw-r--r--TAO/tests/ORT/ServerRequestInterceptor.cpp2
-rw-r--r--TAO/tests/ORT/client.cpp11
-rw-r--r--TAO/tests/ORT/server.cpp15
-rw-r--r--TAO/tests/Object_Loader/Loader.cpp2
-rw-r--r--TAO/tests/Object_Loader/Loader.h2
-rw-r--r--TAO/tests/Object_Loader/Object_Loader.mpc1
-rw-r--r--TAO/tests/Object_Loader/driver.cpp2
-rw-r--r--TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc1
-rw-r--r--TAO/tests/Objref_Sequence_Test/client.cpp15
-rw-r--r--TAO/tests/Objref_Sequence_Test/server.cpp15
-rw-r--r--TAO/tests/OctetSeq/OctetSeq.cpp12
-rw-r--r--TAO/tests/OctetSeq/OctetSeq.mpc4
-rw-r--r--TAO/tests/OctetSeq/client.cpp11
-rw-r--r--TAO/tests/OctetSeq/server.cpp13
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc2
-rw-r--r--TAO/tests/Oneway_Buffering/admin.cpp13
-rw-r--r--TAO/tests/Oneway_Buffering/client.cpp11
-rw-r--r--TAO/tests/Oneway_Buffering/server.cpp13
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc1
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/client.cpp11
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/server.cpp13
-rw-r--r--TAO/tests/POA/Current/Current.cpp9
-rw-r--r--TAO/tests/POA/Deactivate_Object/server.cpp7
-rw-r--r--TAO/tests/POA/Default_Servant/Default_Servant.cpp9
-rw-r--r--TAO/tests/POA/Etherealization/Etherealization.cpp9
-rw-r--r--TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp8
-rw-r--r--TAO/tests/POA/Identity/Identity.cpp7
-rw-r--r--TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp9
-rw-r--r--TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp9
-rw-r--r--TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp9
-rw-r--r--TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp13
-rw-r--r--TAO/tests/POA/POA_Destruction/POA_Destruction.cpp8
-rw-r--r--TAO/tests/POA/Persistent_ID/Persistent_ID.mpc1
-rw-r--r--TAO/tests/POA/Persistent_ID/client.cpp13
-rw-r--r--TAO/tests/POA/Persistent_ID/server.cpp24
-rw-r--r--TAO/tests/POA/Policies/Policies.cpp10
-rw-r--r--TAO/tests/POA/Reference_Counting/test.cpp7
-rw-r--r--TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp9
-rw-r--r--TAO/tests/POA/wait_for_completion/wait_for_completion.cpp13
-rw-r--r--TAO/tests/Param_Test/Param_Test.mpc7
-rw-r--r--TAO/tests/Param_Test/anyop.cpp11
-rw-r--r--TAO/tests/Param_Test/bd_str_seq.cpp6
-rw-r--r--TAO/tests/Param_Test/complex_any.cpp8
-rw-r--r--TAO/tests/Param_Test/driver.cpp7
-rw-r--r--TAO/tests/Param_Test/nested_struct.cpp6
-rw-r--r--TAO/tests/Param_Test/objref_struct.cpp6
-rw-r--r--TAO/tests/Param_Test/options.cpp3
-rw-r--r--TAO/tests/Param_Test/results.h2
-rwxr-xr-xTAO/tests/Param_Test/run_test.pl43
-rw-r--r--TAO/tests/Param_Test/server.cpp13
-rw-r--r--TAO/tests/Param_Test/ub_str_seq.cpp6
-rw-r--r--TAO/tests/Param_Test/var_struct.cpp18
-rwxr-xr-xTAO/tests/Permanent_Forward/Permanent_Forward.mpc6
-rwxr-xr-xTAO/tests/Permanent_Forward/README3
-rwxr-xr-xTAO/tests/Permanent_Forward/StubTest.cpp371
-rwxr-xr-xTAO/tests/Permanent_Forward/run_test.pl25
-rw-r--r--TAO/tests/Policies/Manipulation.cpp11
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp4
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h4
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/client.cpp11
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/server.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlot/AdvSlot.mpc28
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlot/StateTransfer.idl12
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlot/client.cpp27
-rwxr-xr-xTAO/tests/Portable_Interceptors/AdvSlot/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlot/server.cpp199
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/AdvSlotDblCpy.mpc28
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/InvokeMe.idl12
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/README60
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp41
-rwxr-xr-xTAO/tests/Portable_Interceptors/AdvSlotDblCpy/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp326
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotExt/AdvSlotExt.mpc28
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotExt/StateTransfer.idl12
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotExt/client.cpp27
-rwxr-xr-xTAO/tests/Portable_Interceptors/AdvSlotExt/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotExt/server.cpp242
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp8
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/client.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/marker.cpp6
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/server.cpp15
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/client.cpp11
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/server.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2088/client.cpp7
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp23
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp5
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h2
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp5
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp21
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h2
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/client.cpp11
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/server.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp8
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc5
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp15
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h2
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp11
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp19
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp53
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/client.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/server.cpp18
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp26
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h17
-rwxr-xr-xTAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl2
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp9
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.cpp98
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.h45
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp226
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.cpp138
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.h59
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/PI_ProcMode_Collocated.mpc16
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.cpp109
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.h53
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.cpp395
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.h138
-rwxr-xr-xTAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/run_test.pl134
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test.idl42
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.cpp60
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.h54
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.cpp98
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.h45
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.cpp90
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.h58
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.cpp94
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.h57
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/PI_ProcMode_Remote.mpc26
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.cpp112
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.h53
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.cpp184
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.h81
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp136
-rwxr-xr-xTAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/run_test.pl154
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.cpp192
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.h84
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_main.cpp138
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test.idl42
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.cpp55
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.h54
-rw-r--r--TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp9
-rwxr-xr-xTAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl2
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp9
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl2
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc1
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp11
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/Slot/PI_Slot.mpc7
-rw-r--r--TAO/tests/Portable_Interceptors/Slot/driver.cpp64
-rwxr-xr-xTAO/tests/Portable_Interceptors/Slot/run_test.pl26
-rw-r--r--TAO/tests/QtTests/QtTests.mpc3
-rwxr-xr-xTAO/tests/QtTests/client.cpp11
-rwxr-xr-xTAO/tests/QtTests/client.h2
-rwxr-xr-xTAO/tests/QtTests/server.cpp13
-rw-r--r--TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp7
-rw-r--r--TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp2
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc1
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/client.cpp14
-rwxr-xr-xTAO/tests/RTCORBA/Banded_Connections/run_test.pl2
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/server.cpp18
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc1
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/client.cpp11
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/server.cpp13
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc1
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/client.cpp11
-rwxr-xr-xTAO/tests/RTCORBA/Client_Protocol/run_test.pl2
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/server.cpp13
-rw-r--r--TAO/tests/RTCORBA/Collocation/Collocation.cpp9
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp13
-rw-r--r--TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc1
-rw-r--r--TAO/tests/RTCORBA/Diffserv/client.cpp11
-rw-r--r--TAO/tests/RTCORBA/Diffserv/server.cpp13
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/README10
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/RT_Dynamic_Thread_Pool.mpc18
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/client.cpp225
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf2
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf.xml6
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/run_test.pl117
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/server.cpp397
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf1
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf.xml5
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/test.idl12
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.cpp71
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.h45
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc1
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/client.cpp11
-rwxr-xr-xTAO/tests/RTCORBA/Explicit_Binding/run_test.pl2
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/server.cpp13
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc1
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/client.cpp13
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/server.cpp15
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc1
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp11
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp13
-rw-r--r--TAO/tests/RTCORBA/ORB_init/ORB_init.cpp17
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc1
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/client.cpp13
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/server.cpp15
-rw-r--r--TAO/tests/RTCORBA/Policies/Policies.cpp9
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc1
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/client.cpp13
-rwxr-xr-xTAO/tests/RTCORBA/Policy_Combinations/run_test.pl2
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/server.cpp15
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc1
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp11
-rwxr-xr-xTAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl2
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp14
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc1
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/client.cpp11
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/server.cpp13
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp13
-rwxr-xr-xTAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl2
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp15
-rw-r--r--TAO/tests/RTCORBA/RTMutex/server.cpp11
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc1
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/client.cpp11
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/server.cpp13
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc1
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/client.cpp11
-rwxr-xr-xTAO/tests/RTCORBA/Server_Protocol/run_test.pl2
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server.cpp13
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc1
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/client.cpp11
-rwxr-xr-xTAO/tests/RTCORBA/Thread_Pool/run_test.pl2
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/server.cpp15
-rw-r--r--TAO/tests/RTCORBA/common_args.cpp4
-rw-r--r--TAO/tests/RTScheduling/Current/Thread_Task.cpp16
-rw-r--r--TAO/tests/RTScheduling/Current/Thread_Task.h4
-rwxr-xr-xTAO/tests/RTScheduling/Current/run_test.pl2
-rw-r--r--TAO/tests/RTScheduling/Current/test.cpp18
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h9
-rwxr-xr-xTAO/tests/RTScheduling/DT_Spawn/run_test.pl2
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/test.cpp23
-rw-r--r--TAO/tests/RTScheduling/Scheduler.cpp22
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc1
-rwxr-xr-xTAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl2
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp39
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp26
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp10
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/test.cpp17
-rw-r--r--TAO/tests/RTScheduling/VoidData/test.h2
-rw-r--r--TAO/tests/RTScheduling/VoidData/test_client.cpp18
-rw-r--r--TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc1
-rw-r--r--TAO/tests/Reliable_Oneways/client.cpp11
-rw-r--r--TAO/tests/Reliable_Oneways/server.cpp13
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp2
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp2
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc70
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Unbounded_Octet.cpp52
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp2
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_basic_string_sequence.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence.hpp8
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp14
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_reference_allocation_traits.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr.hpp59
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp125
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_string_sequence.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp45
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_value_allocation_traits.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_value_sequence.hpp13
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp50
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_wstring_sequence.hpp4
-rw-r--r--TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.cpp42
-rw-r--r--TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.hpp39
-rw-r--r--TAO/tests/Sequence_Unit_Tests/generic_sequence.hpp5
-rw-r--r--TAO/tests/Sequence_Unit_Tests/mock_reference.cpp47
-rw-r--r--TAO/tests/Sequence_Unit_Tests/mock_reference.hpp41
-rw-r--r--TAO/tests/Sequence_Unit_Tests/mock_stream.cpp35
-rw-r--r--TAO/tests/Sequence_Unit_Tests/mock_stream.hpp40
-rw-r--r--TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp28
-rw-r--r--TAO/tests/Sequence_Unit_Tests/object_reference_traits.hpp22
-rw-r--r--TAO/tests/Sequence_Unit_Tests/object_reference_traits_base.hpp22
-rw-r--r--TAO/tests/Sequence_Unit_Tests/range_checking.hpp7
-rwxr-xr-xTAO/tests/Sequence_Unit_Tests/run_test.pl8
-rw-r--r--TAO/tests/Sequence_Unit_Tests/string_sequence_element.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp14
-rw-r--r--TAO/tests/Sequence_Unit_Tests/string_traits.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/string_traits_base.hpp10
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp2
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp16
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp32
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp2
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp2
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_basic_string_sequence.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_fwd_object_reference_sequence_ut.cpp87
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence.hpp7
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp14
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence.hpp284
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp487
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp450
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_reference_allocation_traits.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr.hpp56
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp123
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp46
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_value_allocation_traits.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence.hpp6
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp48
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_wstring_sequence.hpp3
-rw-r--r--TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp9
-rw-r--r--TAO/tests/Sequence_Unit_Tests/value_traits.hpp17
-rw-r--r--TAO/tests/Servant_To_Reference_Test/server.cpp11
-rw-r--r--TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc1
-rw-r--r--TAO/tests/Server_Connection_Purging/client.cpp9
-rw-r--r--TAO/tests/Server_Connection_Purging/server.cpp13
-rw-r--r--TAO/tests/Server_Leaks/Server_Leaks.mpc1
-rw-r--r--TAO/tests/Server_Leaks/client.cpp11
-rw-r--r--TAO/tests/Server_Leaks/server.cpp13
-rw-r--r--TAO/tests/Server_Port_Zero/server.cpp13
-rw-r--r--TAO/tests/Single_Read/Single_Read.mpc1
-rw-r--r--TAO/tests/Single_Read/client.cpp13
-rw-r--r--TAO/tests/Single_Read/server.cpp15
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/client.cpp15
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/server.cpp15
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/main.cpp7
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/client.cpp13
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/server.cpp15
-rw-r--r--TAO/tests/Smart_Proxies/Policy/client.cpp13
-rw-r--r--TAO/tests/Smart_Proxies/Policy/server.cpp15
-rw-r--r--TAO/tests/Smart_Proxies/Smart_Proxies.mpc1
-rw-r--r--TAO/tests/Smart_Proxies/client.cpp13
-rw-r--r--TAO/tests/Smart_Proxies/dtor/client.cpp13
-rwxr-xr-xTAO/tests/Smart_Proxies/dtor/run_test.pl14
-rw-r--r--TAO/tests/Smart_Proxies/dtor/server.cpp15
-rw-r--r--TAO/tests/Smart_Proxies/server.cpp15
-rw-r--r--TAO/tests/Stack_Recursion/Stack_Recursion.mpc1
-rw-r--r--TAO/tests/Stack_Recursion/client.cpp11
-rw-r--r--TAO/tests/Stack_Recursion/server.cpp13
-rw-r--r--TAO/tests/Strategies/Strategies.mpc1
-rw-r--r--TAO/tests/Strategies/client.cpp11
-rw-r--r--TAO/tests/Strategies/server.cpp13
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc1
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/client.cpp13
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/server.cpp15
-rw-r--r--TAO/tests/Timeout/Timeout.mpc1
-rw-r--r--TAO/tests/Timeout/client.cpp11
-rw-r--r--TAO/tests/Timeout/server.cpp13
-rw-r--r--TAO/tests/Two_Objects/First_i.cpp3
-rw-r--r--TAO/tests/Two_Objects/First_i.h7
-rw-r--r--TAO/tests/Two_Objects/Object_Factory_i.h5
-rw-r--r--TAO/tests/Two_Objects/Second_i.h4
-rw-r--r--TAO/tests/Two_Objects/Two_Objects.mpc1
-rw-r--r--TAO/tests/Two_Objects/client.cpp11
-rw-r--r--TAO/tests/Two_Objects/server.cpp13
-rw-r--r--TAO/tests/Typedef_String_Array/client.cpp11
-rw-r--r--TAO/tests/Typedef_String_Array/server.cpp13
-rw-r--r--TAO/tests/Typedef_String_Array/typedef_string_array.mpc1
-rw-r--r--TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc3
-rw-r--r--TAO/tests/UNKNOWN_Exception/client.cpp13
-rw-r--r--TAO/tests/UNKNOWN_Exception/server.cpp15
-rw-r--r--TAO/tests/Xt_Stopwatch/Client.h2
-rw-r--r--TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc1
-rw-r--r--TAO/tests/Xt_Stopwatch/client.cpp11
-rw-r--r--TAO/tests/Xt_Stopwatch/server.cpp13
999 files changed, 3653 insertions, 27670 deletions
diff --git a/TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc b/TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc
index 5188e4a669b..31273239815 100644
--- a/TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc
+++ b/TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc
@@ -8,7 +8,6 @@ project(*Server): taoserver, amh, strategies {
}
project(*Client): taoexe, amh, portableserver, strategies {
- after += *Server
Source_Files {
client.cpp
}
diff --git a/TAO/tests/AMH_Exceptions/client.cpp b/TAO/tests/AMH_Exceptions/client.cpp
index 9ff92b2933d..ebc75580c11 100644
--- a/TAO/tests/AMH_Exceptions/client.cpp
+++ b/TAO/tests/AMH_Exceptions/client.cpp
@@ -1,17 +1,20 @@
// $Id$
#include "TestC.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior = "file://test.ior";
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int received_expected_exception = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var object =
diff --git a/TAO/tests/AMH_Exceptions/run_test.pl b/TAO/tests/AMH_Exceptions/run_test.pl
index 4c78cd27121..deff794042a 100755
--- a/TAO/tests/AMH_Exceptions/run_test.pl
+++ b/TAO/tests/AMH_Exceptions/run_test.pl
@@ -11,7 +11,7 @@ use lib "../../../bin";
use PerlACE::Run_Test;
# Amount of delay (in seconds) between starting a server and a client.
-$sleeptime = $PerlACE::wait_interval_for_process_creation;
+$sleeptime = 6;
# File used to pass AMH server ior to its clients.
# This file name is hard-coded in the server.cpp and client.cpp files
diff --git a/TAO/tests/AMH_Exceptions/server.cpp b/TAO/tests/AMH_Exceptions/server.cpp
index 05d82934074..c9a412e2c5d 100644
--- a/TAO/tests/AMH_Exceptions/server.cpp
+++ b/TAO/tests/AMH_Exceptions/server.cpp
@@ -3,6 +3,7 @@
#include "ace/OS_NS_stdio.h"
#include "TestS.h"
+#include "ace/Argv_Type_Converter.h"
/***************************/
/*** Servant Declaration ***/
@@ -209,7 +210,7 @@ ST_AMH_Server::write_ior_to_file (CORBA::String_var ior)
{
// If the ior_output_file exists, output the ior to it
FILE *output_file= ACE_OS::fopen (ST_AMH_Server::ior_output_file_,
- "w");
+ ACE_TEXT("w"));
if (output_file == 0)
{
ACE_ERROR ((LM_ERROR,
@@ -225,9 +226,12 @@ ST_AMH_Server::write_ior_to_file (CORBA::String_var ior)
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- ST_AMH_Server amh_server (&argc, argv);
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ int& argc2 = convert.get_argc();
+ ST_AMH_Server amh_server (&argc2, convert.get_ASCII_argv());
amh_server.start_orb_and_poa ();
diff --git a/TAO/tests/AMH_Oneway/AMH_Oneway.mpc b/TAO/tests/AMH_Oneway/AMH_Oneway.mpc
index a0a1fbb883e..b42dca05552 100644
--- a/TAO/tests/AMH_Oneway/AMH_Oneway.mpc
+++ b/TAO/tests/AMH_Oneway/AMH_Oneway.mpc
@@ -8,7 +8,6 @@ project(*client) : taoexe, portableserver, amh {
}
project(*server) : taoserver, amh, strategies {
- after += *client
source_files {
server.cpp
}
diff --git a/TAO/tests/AMH_Oneway/client.cpp b/TAO/tests/AMH_Oneway/client.cpp
index ade35e5e386..ba950a012da 100644
--- a/TAO/tests/AMH_Oneway/client.cpp
+++ b/TAO/tests/AMH_Oneway/client.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "TestC.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior = "file://test.ior";
int num_calls = 10;
@@ -9,7 +10,8 @@ int num_calls = 10;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "n:");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "n:");
int c;
while ((c = get_opts ()) != -1)
@@ -25,15 +27,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/AMH_Oneway/run_test.pl b/TAO/tests/AMH_Oneway/run_test.pl
index e092024d923..aacfe3d9128 100755
--- a/TAO/tests/AMH_Oneway/run_test.pl
+++ b/TAO/tests/AMH_Oneway/run_test.pl
@@ -11,7 +11,7 @@ use lib "../../../bin";
use PerlACE::Run_Test;
# Amount of delay (in seconds) between starting a server and a client.
-$sleeptime = $PerlACE::wait_interval_for_process_creation;
+$sleeptime = 6;
# File used to pass AMH server ior to its clients.
# This file name is hard-coded in the server.cpp and client.cpp files
@@ -19,21 +19,11 @@ $iorfile = PerlACE::LocalFile("test.ior");
unlink $iorfile;
-if (PerlACE::is_vxworks_test()) {
- $AMH = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $AMH = new PerlACE::Process ("server", "");
-}
+$AMH = new PerlACE::Process ("server", "");
$CL = new PerlACE::Process ("client", "");
# Run the AMH server.
-$sv = $AMH->Spawn ();
-
-if ($sv != 0) {
- print STDERR "ERROR: AMH server returned $sv\n";
- exit 1;
-}
+$AMH->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
print STDERR "ERROR: File containing AMH Server ior,".
@@ -42,7 +32,7 @@ if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
exit 1;
}
-# Run the client.
+# Run the cleint client.
$client = $CL->Spawn ();
@@ -50,7 +40,7 @@ $client = $CL->Spawn ();
$client = $CL->WaitKill (30);
if ($client != 0) {
- print STDERR "ERROR: Client returned $client\n";
+ print STDERR "ERROR: Client returned $amhserver\n";
$status = 1;
}
diff --git a/TAO/tests/AMH_Oneway/server.cpp b/TAO/tests/AMH_Oneway/server.cpp
index 7d75444d7fb..f9825491ecf 100644
--- a/TAO/tests/AMH_Oneway/server.cpp
+++ b/TAO/tests/AMH_Oneway/server.cpp
@@ -4,6 +4,7 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "TestS.h"
int num_calls = 10; // total calls client is going to make
@@ -15,7 +16,8 @@ int calls_received = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "n:");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "n:");
int c;
while ((c = get_opts ()) != -1)
@@ -232,7 +234,7 @@ ST_AMH_Server::write_ior_to_file (CORBA::String_var ior)
{
// If the ior_output_file exists, output the ior to it
FILE *output_file= ACE_OS::fopen (ST_AMH_Server::ior_output_file_,
- "w");
+ ACE_TEXT("w"));
if (output_file == 0)
{
ACE_ERROR ((LM_ERROR,
@@ -248,12 +250,15 @@ ST_AMH_Server::write_ior_to_file (CORBA::String_var ior)
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- if (parse_args (argc, argv) != 0)
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
- ST_AMH_Server amh_server (&argc, argv);
+ int& argc2 = convert.get_argc();
+ ST_AMH_Server amh_server (&argc2, convert.get_ASCII_argv());
amh_server.start_orb_and_poa ();
diff --git a/TAO/tests/AMI/AMI.mpc b/TAO/tests/AMI/AMI.mpc
index 894442827ba..dcade4b27d7 100644
--- a/TAO/tests/AMI/AMI.mpc
+++ b/TAO/tests/AMI/AMI.mpc
@@ -9,14 +9,12 @@ project(*Server): taoserver, messaging, ami {
}
project(*Client): messaging, taoexe, portableserver, ami {
- after += *Server
Source_Files {
client.cpp
}
}
project(*Simple Client): messaging, taoexe, portableserver, ami {
- after += *Server
Source_Files {
simple_client.cpp
}
diff --git a/TAO/tests/AMI/client.cpp b/TAO/tests/AMI/client.cpp
index dfebe21b163..83b14a82a2c 100644
--- a/TAO/tests/AMI/client.cpp
+++ b/TAO/tests/AMI/client.cpp
@@ -16,6 +16,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "ami_testS.h"
ACE_RCSID (AMI,
@@ -31,7 +32,8 @@ int number_of_replies = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "dk:n:i:");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "dk:n:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -110,10 +112,10 @@ public:
out_l));
}
- --number_of_replies;
+ number_of_replies--;
};
- void foo_excep (::Messaging::ExceptionHolder * excep_holder
+ void foo_excep (A::AMI_AMI_TestExceptionHolder * excep_holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -122,7 +124,7 @@ public:
"Callback method <foo_excep> called: \n"));
ACE_TRY
{
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ excep_holder->raise_foo (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -143,7 +145,7 @@ public:
result));
};
- void get_yadda_excep (::Messaging::ExceptionHolder *
+ void get_yadda_excep (A::AMI_AMI_TestExceptionHolder *
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -158,7 +160,7 @@ public:
"Callback method <set_yadda> called: \n"));
};
- void set_yadda_excep (::Messaging::ExceptionHolder *
+ void set_yadda_excep (A::AMI_AMI_TestExceptionHolder *
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -177,7 +179,7 @@ public:
"Callback method <set_yadda_excep> called: \n"));
}
- void inout_arg_test_excep (::Messaging::ExceptionHolder *
+ void inout_arg_test_excep (A::AMI_AMI_TestExceptionHolder *
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -188,16 +190,18 @@ public:
Handler handler;
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/AMI/run_test.pl b/TAO/tests/AMI/run_test.pl
index 8b43bbe69a4..f3e7493a8fd 100755
--- a/TAO/tests/AMI/run_test.pl
+++ b/TAO/tests/AMI/run_test.pl
@@ -48,23 +48,14 @@ $CL = new PerlACE::Process ("simple_client",
"-ORBsvcconf $client_conf "
. "-ORBdebuglevel $debug_level"
. " -k file://$iorfile "
- . " -i $iterations -d");
+ . " -i $iterations -x -d");
$client = $CL->SpawnWaitKill (60);
-
-$CL2 = new PerlACE::Process ("simple_client",
- "-ORBsvcconf $client_conf"
- . " -ORBCollocation no"
- . " -ORBdebuglevel $debug_level"
- . " -k file://$iorfile "
- . " -i $iterations -x -d");
-$client2 = $CL2->SpawnWaitKill (60);
-
$server = $SV->WaitKill (10);
unlink $iorfile;
-if ($server != 0 || $client != 0 || $client2 != 0) {
+if ($server != 0 || $client != 0) {
exit 1;
}
diff --git a/TAO/tests/AMI/server.cpp b/TAO/tests/AMI/server.cpp
index b2868cd1e58..96b638cb837 100644
--- a/TAO/tests/AMI/server.cpp
+++ b/TAO/tests/AMI/server.cpp
@@ -18,6 +18,7 @@
#include "tao/debug.h"
#include "ace/OS_NS_stdio.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(AMI, server, "$Id$")
@@ -26,7 +27,8 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "o:d");
int c;
while ((c = get_opts ()) != -1)
@@ -52,13 +54,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -78,7 +82,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
AMI_Test_i ami_test_i (orb.in ());
@@ -96,7 +100,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/AMI/simple_client.cpp b/TAO/tests/AMI/simple_client.cpp
index 2a22d5164ed..40b67edad4e 100644
--- a/TAO/tests/AMI/simple_client.cpp
+++ b/TAO/tests/AMI/simple_client.cpp
@@ -16,6 +16,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "ami_testS.h"
@@ -31,7 +32,8 @@ int debug = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "dk:i:x");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "dk:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -87,28 +89,27 @@ public:
}
};
- void foo_excep (::Messaging::ExceptionHolder * excep_holder
+ void foo_excep (A::AMI_AMI_TestExceptionHolder * excep_holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
"Callback method <foo_excep> called: \n"
- "Testing proper exception handling ...\n"));
+ "Testing proper exception handling ...\n"));
ACE_TRY
{
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ excep_holder->raise_foo (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCH (A::DidTheRightThing, ex)
{
ACE_DEBUG ((LM_DEBUG,
"... exception received successfully\n"));
- }
+ }
ACE_CATCHANY
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "ERROR");
- ACE_ERROR ((LM_ERROR,
+ ACE_DEBUG ((LM_DEBUG,
"... caught the wrong exception -> ERROR\n"));
}
ACE_ENDTRY;
@@ -125,7 +126,7 @@ public:
result));
};
- void get_yadda_excep (::Messaging::ExceptionHolder *
+ void get_yadda_excep (A::AMI_AMI_TestExceptionHolder *
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -140,7 +141,7 @@ public:
"Callback method <set_yadda> called: \n"));
};
- void set_yadda_excep (::Messaging::ExceptionHolder *
+ void set_yadda_excep (A::AMI_AMI_TestExceptionHolder *
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -158,7 +159,7 @@ public:
"Callback method <set_yadda_excep> called: \n"));
}
- void inout_arg_test_excep (::Messaging::ExceptionHolder *
+ void inout_arg_test_excep (A::AMI_AMI_TestExceptionHolder *
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -166,15 +167,16 @@ public:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var object_var =
@@ -192,7 +194,7 @@ main (int argc, char *argv[])
poa_manager_var->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// We reuse the object_var smart pointer!
@@ -226,6 +228,7 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
+
// Trigger the DidTheRightThing exception on the server side
// by sending 0 to it.
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/tests/AMI_Buffering/AMI_Buffering.mpc b/TAO/tests/AMI_Buffering/AMI_Buffering.mpc
index a4156b9a83f..8e9d0e4abb2 100644
--- a/TAO/tests/AMI_Buffering/AMI_Buffering.mpc
+++ b/TAO/tests/AMI_Buffering/AMI_Buffering.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, ami {
}
project(*Client): taoserver, ami {
- after += *Server
exename = client
Source_Files {
Client_Task.cpp
@@ -19,7 +18,6 @@ project(*Client): taoserver, ami {
}
project(*Admin): taoserver, ami {
- after += *Client
exename = admin
Source_Files {
AMI_Buffering_Admin.cpp
diff --git a/TAO/tests/AMI_Buffering/Reply_Handler.cpp b/TAO/tests/AMI_Buffering/Reply_Handler.cpp
index 7c8a210d9d3..7666e09cd4d 100644
--- a/TAO/tests/AMI_Buffering/Reply_Handler.cpp
+++ b/TAO/tests/AMI_Buffering/Reply_Handler.cpp
@@ -16,13 +16,13 @@ Reply_Handler::receive_data (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-Reply_Handler::receive_data_excep (::Messaging::ExceptionHolder *holder
+Reply_Handler::receive_data_excep (Test::AMI_AMI_BufferingExceptionHolder *holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_TRY
{
- holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ holder->raise_receive_data (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -40,13 +40,13 @@ Reply_Handler::sync (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-Reply_Handler::sync_excep (::Messaging::ExceptionHolder *holder
+Reply_Handler::sync_excep (Test::AMI_AMI_BufferingExceptionHolder *holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_TRY
{
- holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ holder->raise_sync (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -64,13 +64,13 @@ Reply_Handler::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-Reply_Handler::shutdown_excep (::Messaging::ExceptionHolder *holder
+Reply_Handler::shutdown_excep (Test::AMI_AMI_BufferingExceptionHolder *holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_TRY
{
- holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ holder->raise_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/tests/AMI_Buffering/Reply_Handler.h b/TAO/tests/AMI_Buffering/Reply_Handler.h
index 9d73cbcc70d..f36e5734f41 100644
--- a/TAO/tests/AMI_Buffering/Reply_Handler.h
+++ b/TAO/tests/AMI_Buffering/Reply_Handler.h
@@ -19,19 +19,19 @@ public:
// = The skeleton methods
virtual void receive_data (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void receive_data_excep (::Messaging::ExceptionHolder *holder
+ virtual void receive_data_excep (Test::AMI_AMI_BufferingExceptionHolder *holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void sync (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void sync_excep (::Messaging::ExceptionHolder *holder
+ virtual void sync_excep (Test::AMI_AMI_BufferingExceptionHolder *holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown_excep (::Messaging::ExceptionHolder *holder
+ virtual void shutdown_excep (Test::AMI_AMI_BufferingExceptionHolder *holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
};
diff --git a/TAO/tests/AMI_Buffering/admin.cpp b/TAO/tests/AMI_Buffering/admin.cpp
index 9c883a1d3f5..4d5dd7deb5a 100644
--- a/TAO/tests/AMI_Buffering/admin.cpp
+++ b/TAO/tests/AMI_Buffering/admin.cpp
@@ -3,6 +3,7 @@
#include "AMI_Buffering_Admin.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(AMI_Buffering, admin, "$Id$")
@@ -11,7 +12,8 @@ const char *ior_output_file = "admin.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +37,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +64,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
AMI_Buffering_Admin *AMI_buffering_admin_impl;
@@ -78,7 +82,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/AMI_Buffering/client.cpp b/TAO/tests/AMI_Buffering/client.cpp
index 6ec3f9364f6..b6a585f75c8 100644
--- a/TAO/tests/AMI_Buffering/client.cpp
+++ b/TAO/tests/AMI_Buffering/client.cpp
@@ -7,6 +7,7 @@
#include "tao/AnyTypeCode/TAOA.h"
#include "tao/AnyTypeCode/Any.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(AMI_Buffering, client, "$Id$")
@@ -40,7 +41,8 @@ const double GIOP_OVERHEAD = 0.9;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:a:i:ctbr");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "k:a:i:ctbr");
int c;
while ((c = get_opts ()) != -1)
@@ -114,13 +116,15 @@ run_buffer_size (CORBA::ORB_ptr orb,
ACE_ENV_ARG_DECL);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int test_failed = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -143,7 +147,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/AMI_Buffering/server.cpp b/TAO/tests/AMI_Buffering/server.cpp
index ba5fa487943..625f5f461dc 100644
--- a/TAO/tests/AMI_Buffering/server.cpp
+++ b/TAO/tests/AMI_Buffering/server.cpp
@@ -3,6 +3,7 @@
#include "AMI_Buffering.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(AMI_Buffering, server, "$Id$")
@@ -12,7 +13,8 @@ const char *ior = "file://admin.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:k:");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "o:k:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,12 +43,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -66,7 +70,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
@@ -101,7 +105,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/AMI_Timeouts/client.cpp b/TAO/tests/AMI_Timeouts/client.cpp
index e483bc5d871..8bc203a6169 100644
--- a/TAO/tests/AMI_Timeouts/client.cpp
+++ b/TAO/tests/AMI_Timeouts/client.cpp
@@ -18,6 +18,7 @@
#include "tao/debug.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (AMI,
client,
@@ -29,7 +30,8 @@ unsigned int msec = 50;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "dk:t:");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "dk:t:");
int c;
while ((c = get_opts ()) != -1)
@@ -60,16 +62,18 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/AMI_Timeouts/server.cpp b/TAO/tests/AMI_Timeouts/server.cpp
index b26f765296d..d022b89fcf5 100644
--- a/TAO/tests/AMI_Timeouts/server.cpp
+++ b/TAO/tests/AMI_Timeouts/server.cpp
@@ -16,6 +16,7 @@
#include "timeout_client.h"
#include "tao/debug.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (AMI,
server,
@@ -26,7 +27,8 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "o:d");
int c;
while ((c = get_opts ()) != -1)
@@ -52,13 +54,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -78,7 +82,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Timeout_i timeout_i (orb.in ());
@@ -96,7 +100,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/AMI_Timeouts/timeout_i.cpp b/TAO/tests/AMI_Timeouts/timeout_i.cpp
index ff9fab96bd8..f7812908404 100644
--- a/TAO/tests/AMI_Timeouts/timeout_i.cpp
+++ b/TAO/tests/AMI_Timeouts/timeout_i.cpp
@@ -82,7 +82,7 @@ TimeoutHandler_i::sendTimeToWait (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-TimeoutHandler_i::sendTimeToWait_excep (::Messaging::ExceptionHolder *excep_holder
+TimeoutHandler_i::sendTimeToWait_excep (AMI_TimeoutObjExceptionHolder *excep_holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -90,7 +90,7 @@ TimeoutHandler_i::sendTimeToWait_excep (::Messaging::ExceptionHolder *excep_hold
ACE_TRY
{
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ excep_holder->raise_sendTimeToWait (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCH (CORBA::TIMEOUT, timeout)
diff --git a/TAO/tests/AMI_Timeouts/timeout_i.h b/TAO/tests/AMI_Timeouts/timeout_i.h
index d4082ac05d2..8054d1ac6ff 100644
--- a/TAO/tests/AMI_Timeouts/timeout_i.h
+++ b/TAO/tests/AMI_Timeouts/timeout_i.h
@@ -55,7 +55,7 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void sendTimeToWait_excep (
- ::Messaging::ExceptionHolder * excep_holder
+ AMI_TimeoutObjExceptionHolder * excep_holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/tests/Abstract_Interface/Abstract_Interface.mpc b/TAO/tests/Abstract_Interface/Abstract_Interface.mpc
index cc0059d58c7..4eeadb14767 100644
--- a/TAO/tests/Abstract_Interface/Abstract_Interface.mpc
+++ b/TAO/tests/Abstract_Interface/Abstract_Interface.mpc
@@ -19,7 +19,6 @@ project(*client) : taoclient, valuetype {
}
project(*server) : taoserver, valuetype {
- after += *client
idlflags += -Sc
IDL_Files {
diff --git a/TAO/tests/Abstract_Interface/client.cpp b/TAO/tests/Abstract_Interface/client.cpp
index 0a26fb84775..13ca7568315 100644
--- a/TAO/tests/Abstract_Interface/client.cpp
+++ b/TAO/tests/Abstract_Interface/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Abstract_Interface,
client,
@@ -23,7 +24,7 @@ test_select which_test = TEST_ALL;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:dsoe");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:dsoe");
int c;
while ((c = get_opts ()) != -1)
@@ -184,19 +185,22 @@ test_exception (base_ptr abs
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
CORBA::String_var retval;
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
return 1;
}
diff --git a/TAO/tests/Abstract_Interface/server.cpp b/TAO/tests/Abstract_Interface/server.cpp
index 6a3c9034587..b8087ab8195 100644
--- a/TAO/tests/Abstract_Interface/server.cpp
+++ b/TAO/tests/Abstract_Interface/server.cpp
@@ -3,6 +3,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Abstract_Interface,
server,
@@ -13,7 +14,8 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +39,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -104,7 +108,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
return 1;
}
@@ -126,7 +130,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
{
diff --git a/TAO/tests/Abstract_Interface/test_i.cpp b/TAO/tests/Abstract_Interface/test_i.cpp
index a3e9072788b..ac6c799d32b 100644
--- a/TAO/tests/Abstract_Interface/test_i.cpp
+++ b/TAO/tests/Abstract_Interface/test_i.cpp
@@ -78,7 +78,7 @@ passer_i::pass_state (base_out outarg
))
{
TreeController_var tc;
- ACE_NEW (tc.inout (),
+ ACE_NEW (tc,
OBV_TreeController);
// Create the root node.
diff --git a/TAO/tests/AlternateIIOP/run_test.pl b/TAO/tests/AlternateIIOP/run_test.pl
index 8471efda5a1..c8734d538a4 100755
--- a/TAO/tests/AlternateIIOP/run_test.pl
+++ b/TAO/tests/AlternateIIOP/run_test.pl
@@ -14,8 +14,8 @@ $status = 0;
@bogus_eps = ("-orbendpoint iiop://localhost:10200/hostname_in_ior=bogus.com",
"-orbendpoint iiop://localhost:10202/hostname_in_ior=bogus.com");
$valid_ep = "-orbendpoint iiop://localhost:10201";
-
-$SV_ALT_IIOP = new PerlACE::Process ("../Hello/server", "-o $iorfile $bogus_eps[0] $valid_ep $bogus_eps[1]");
+print "Running ../Hello/server with -o $iorfile $bogus_eps[0] $valid_ep $bogus_eps[1]\n";
+$SV_ALT_IIOP = new PerlACE::Process ("../Hello/server", "-ORBUseSharedProfile 1 -o $iorfile $bogus_eps[0] $valid_ep $bogus_eps[1]");
$CL_ALT_IIOP = new PerlACE::Process ("../Hello/client", " -k file://$iorfile");
$SV_ALT_IIOP->Spawn ();
diff --git a/TAO/tests/AlternateIIOP/svc.conf b/TAO/tests/AlternateIIOP/svc.conf
deleted file mode 100644
index 03c69cdb546..00000000000
--- a/TAO/tests/AlternateIIOP/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-dynamic OC_Endpoint_Selector_Factory Service_Object * TAO_Strategies:_make_TAO_OC_Endpoint_Selector_Factory () "-connect_timeout 1300"
diff --git a/TAO/tests/Any/Recursive/RecursiveHello.mpc b/TAO/tests/Any/Recursive/RecursiveHello.mpc
index 739a66df566..8e6644828da 100644
--- a/TAO/tests/Any/Recursive/RecursiveHello.mpc
+++ b/TAO/tests/Any/Recursive/RecursiveHello.mpc
@@ -10,8 +10,7 @@ project(*Server): taoserver, valuetype {
}
project(*Client): taoclient, valuetype, typecodefactory, ifr_client {
- after += *Server
-
+
Source_Files {
TestC.cpp
NonRecursiveC.cpp
diff --git a/TAO/tests/Any/Recursive/Test.idl b/TAO/tests/Any/Recursive/Test.idl
index d1d5e447c36..a097416f9e5 100644
--- a/TAO/tests/Any/Recursive/Test.idl
+++ b/TAO/tests/Any/Recursive/Test.idl
@@ -15,7 +15,6 @@ module Test
{
RecursiveStructSeq recursive_structs;
long i;
- RecursiveStructSeq recursive_structs_second;
};
// --------------------------
@@ -27,58 +26,10 @@ module Test
{
case 0:
RecursiveUnionSeq recursive_unions;
- case 1:
- short a;
- case 2:
- RecursiveUnionSeq recursive_unions_second;
default:
long i;
};
- union RecursiveUnionNoDefault;
- typedef sequence<RecursiveUnionNoDefault> RecursiveUnionSeqNoDefault;
-
- union RecursiveUnionNoDefault switch (short)
- {
- case 0:
- RecursiveUnionSeqNoDefault recursive_unions;
- case 1:
- short a;
- case 2:
- RecursiveUnionSeqNoDefault recursive_unions_second;
- };
-
- // --------------------------
-
- // --------------------------
-
- enum VSort {
- UNKNOWN_TYPE,
- RECURSIVE_TYPE,
- LONG_STYPE,
- BOOL_STYPE
- };
-
- union VSortRecursiveUnion;
- typedef sequence<VSortRecursiveUnion> VSortRecursiveUnionSeq;
- union VSortRecursiveUnion switch (VSort)
- {
- case RECURSIVE_TYPE:
- VSortRecursiveUnionSeq recursive_unions;
- case LONG_STYPE:
- long i;
- };
-
- // --------------------------
-
- union EnumUnion switch (VSort)
- {
- case BOOL_STYPE:
- boolean a;
- case LONG_STYPE:
- long i;
- };
-
// --------------------------
valuetype IndirectlyRecursiveValuetype;
@@ -95,7 +46,6 @@ module Test
valuetype DirectlyRecursiveValuetype
{
public DirectlyRecursiveValuetype recursive_valuetype;
- public DirectlyRecursiveValuetype recursive_valuetype_second;
};
// --------------------------
diff --git a/TAO/tests/Any/Recursive/client.cpp b/TAO/tests/Any/Recursive/client.cpp
index 6bb78f5ed62..963ca14035c 100644
--- a/TAO/tests/Any/Recursive/client.cpp
+++ b/TAO/tests/Any/Recursive/client.cpp
@@ -5,6 +5,7 @@
#include "tao/TypeCodeFactory/TypeCodeFactory_Loader.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include <algorithm>
#include <functional>
@@ -20,7 +21,8 @@ const char * ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_Get_Arg_Opt<char> get_opts (convert.get_argc(), convert.get_ASCII_argv(), "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -168,22 +170,13 @@ recursive_union_test (CORBA::ORB_ptr /* orb */,
"Executing recursive union test\n"));
Test::RecursiveUnion foo;
- Test::EnumUnion foo_enum;
- static CORBA::Long const test_long = 238901;
- CORBA::Any the_any;
-
- // First simple case, just an union with an enum as discriminator
- foo_enum.i (test_long);
- the_any <<= foo_enum;
-
- ::perform_invocation<Test::EnumUnion> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Non-recursive member case.
+ static CORBA::Long const test_long = 238901;
+
foo.i (test_long);
+ CORBA::Any the_any;
the_any <<= foo;
::perform_invocation<Test::RecursiveUnion> (hello,
@@ -205,38 +198,6 @@ recursive_union_test (CORBA::ORB_ptr /* orb */,
the_any
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
-
- // Recursive member case with no default member
- Test::RecursiveUnionSeqNoDefault seqnodefault;
- seqnodefault.length (2);
- seqnodefault[0].a (37);
- seqnodefault[1].recursive_unions (Test::RecursiveUnionSeqNoDefault ());
-
- Test::RecursiveUnionNoDefault foonodefault;
- foonodefault.recursive_unions (seqnodefault);
-
- the_any <<= foonodefault;
-
- ::perform_invocation<Test::RecursiveUnionNoDefault> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Recursive member case with enum .
- Test::VSortRecursiveUnionSeq vsortseq;
- vsortseq.length (2);
- vsortseq[0].i (37);
- vsortseq[1].recursive_unions (Test::VSortRecursiveUnionSeq ());
-
- Test::VSortRecursiveUnion vsort_foo;
- vsort_foo.recursive_unions (vsortseq);
-
- the_any <<= vsort_foo;
-
- ::perform_invocation<Test::VSortRecursiveUnion> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
@@ -295,14 +256,12 @@ recursive_struct_typecodefactory_test (CORBA::ORB_ptr orb,
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- CORBA::StructMemberSeq members (3);
- members.length (3);
+ CORBA::StructMemberSeq members (2);
+ members.length (2);
members[0].name = "recursive_structs";
members[0].type = seq_tc;
members[1].name = "i";
members[1].type = CORBA::TypeCode::_duplicate (CORBA::_tc_long);
- members[2].name = "recursive_structs_second";
- members[2].type = seq_tc;
CORBA::TypeCode_var struct_tc =
orb->create_struct_tc ("IDL:Test/RecursiveStruct:1.0",
@@ -411,15 +370,17 @@ struct Caller : public std::unary_function<T, void>
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Any/Recursive/server.cpp b/TAO/tests/Any/Recursive/server.cpp
index 177aad4d1d8..b9b071c2cee 100644
--- a/TAO/tests/Any/Recursive/server.cpp
+++ b/TAO/tests/Any/Recursive/server.cpp
@@ -3,6 +3,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Hello,
server,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/BiDirectional/BiDirectional.mpc b/TAO/tests/BiDirectional/BiDirectional.mpc
index 55e22534e4a..8f1239bb195 100644
--- a/TAO/tests/BiDirectional/BiDirectional.mpc
+++ b/TAO/tests/BiDirectional/BiDirectional.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver, anytypecode, minimum_corba, bidir_giop {
project(*Client): taoserver, anytypecode, minimum_corba, bidir_giop {
exename = client
- after += *Server
Source_Files {
test_i.cpp
client.cpp
diff --git a/TAO/tests/BiDirectional/client.cpp b/TAO/tests/BiDirectional/client.cpp
index d775aabc942..47e5dcbda8b 100644
--- a/TAO/tests/BiDirectional/client.cpp
+++ b/TAO/tests/BiDirectional/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "tao/BiDir_GIOP/BiDirGIOP.h"
#include "tao/AnyTypeCode/Any.h"
@@ -16,7 +17,7 @@ void do_nothing (void)
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -40,12 +41,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -99,7 +102,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/BiDirectional/run_test_ipv6.pl b/TAO/tests/BiDirectional/run_test_ipv6.pl
index c422afa3a00..b3a3676d4fd 100755
--- a/TAO/tests/BiDirectional/run_test_ipv6.pl
+++ b/TAO/tests/BiDirectional/run_test_ipv6.pl
@@ -14,12 +14,12 @@ $iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior -i 100 -ORBConnectIPV6Only 1");
+ $SV = new PerlACE::ProcessVX ("server", "-o test.ior -i 100 -ORBConnectIPV6Only YES");
}
else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -i 100 -ORBConnectIPV6Only 1");
+ $SV = new PerlACE::Process ("server", "-o $iorfile -i 100 -ORBConnectIPV6Only YES");
}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -ORBConnectIPV6Only 1");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile -ORBConnectIPV6Only YES");
$SV->Spawn ();
diff --git a/TAO/tests/BiDirectional/server.cpp b/TAO/tests/BiDirectional/server.cpp
index 02f3a672f43..d72ee7a91d3 100644
--- a/TAO/tests/BiDirectional/server.cpp
+++ b/TAO/tests/BiDirectional/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "tao/BiDir_GIOP/BiDirGIOP.h"
#include "tao/AnyTypeCode/Any.h"
@@ -14,7 +15,7 @@ int no_iterations = 10;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,12 +42,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -100,7 +103,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in (),
@@ -128,7 +131,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/BiDirectional/test_i.cpp b/TAO/tests/BiDirectional/test_i.cpp
index 88c345394db..8203a116ce5 100644
--- a/TAO/tests/BiDirectional/test_i.cpp
+++ b/TAO/tests/BiDirectional/test_i.cpp
@@ -64,9 +64,6 @@ Simple_Server_i::call_client (ACE_ENV_SINGLE_ARG_DECL)
this->callback_->callback_method (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- // If the cache size has gotten larger this indicates that
- // the connection isn't being shared properly, i.e., a new
- // connection was created, so we'll abort.
if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
{
ACE_ERROR ((LM_ERROR,
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/BiDir_DelayedUpcall.mpc b/TAO/tests/BiDirectional_DelayedUpcall/BiDir_DelayedUpcall.mpc
deleted file mode 100644
index abcf650df1b..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/BiDir_DelayedUpcall.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, minimum_corba, bidir_giop {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver, minimum_corba, bidir_giop {
- after += *Server
- Source_Files {
- test_i.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/README b/TAO/tests/BiDirectional_DelayedUpcall/README
deleted file mode 100644
index 60497253309..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/README
+++ /dev/null
@@ -1,6 +0,0 @@
-# $Id$
-
-This test is similar to the $TAO_ROOT/tests/BiDirectional test. The
-only difference being that the server after it has received the upcall
-it does a bit delayed a bunch of remote calls do the client again
-
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/client.cpp b/TAO/tests/BiDirectional_DelayedUpcall/client.cpp
deleted file mode 100644
index a6b00269d1b..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/client.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/High_Res_Timer.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(BiDirectional, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-void do_nothing (void)
-{
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Callback_i *callback_impl = 0;
- ACE_NEW_THROW_EX (callback_impl,
- Callback_i (orb.in ()),
- CORBA::NO_MEMORY ());
-
- PortableServer::ServantBase_var owner_transfer(callback_impl);
-
- Callback_var callback =
- callback_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Send the calback object to the server
- server->callback_object (callback.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Call the client that will make remote calls to us again, but
- // not directly, but delayed for a second or so.
- CORBA::Long r =
- server->test_method (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d ",
- r));
- }
-
- // Run now the ORB for 5 seconds
- ACE_Time_Value run_time (5);
- orb->run (run_time ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Shutdown the server
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/run_test.pl b/TAO/tests/BiDirectional_DelayedUpcall/run_test.pl
deleted file mode 100755
index ee4c91cce64..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior -i 100");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -i 100");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/server.cpp b/TAO/tests/BiDirectional_DelayedUpcall/server.cpp
deleted file mode 100644
index ef4c284f576..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/server.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(BiDirectional, server, "$Id$")
-
-const char *ior_output_file = 0;
-int no_iterations = 10;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'i':
- no_iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "-i <no_iterations>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i *server_impl = 0;
-
- ACE_NEW_THROW_EX (server_impl,
- Simple_Server_i (orb.in (),
- no_iterations),
- CORBA::NO_MEMORY ());
-
- PortableServer::ServantBase_var owner_transfer (server_impl);
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("simple_server");
-
- child_poa->activate_object_with_id (id.in (),
- server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- child_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Run the event loop
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/test.idl b/TAO/tests/BiDirectional_DelayedUpcall/test.idl
deleted file mode 100644
index 47ede657b9a..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-
-interface Callback
-{
- oneway void shutdown ();
- // A safe way to shutdown the client, using either clean shutdowns
- // or "catastrophic failures".
-
- void callback_method ();
- // A simple remote call
-
-};
-
-interface Simple_Server
-{
- long test_method (in boolean do_callback);
- // Just call a method on the server,
-
- void callback_object (in Callback cb);
- // send the callback object to the server
-
- oneway void shutdown ();
- // A safe way to shutdown the server, it is a oneway function so we
- // will never get a COMM_FAILURE error
-};
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/test_i.cpp b/TAO/tests/BiDirectional_DelayedUpcall/test_i.cpp
deleted file mode 100644
index fceb705f1cc..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/test_i.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "tao/Thread_Lane_Resources.h"
-#include "ace/Reactor.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(BiDirectional_NestedUpcall, test_i, "$Id$")
-
-void
-Callback_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Performing clean shutdown\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Callback_i::callback_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Callback method called \n"));
-}
-
-
-// ****************************************************************
-
-int
-Simple_Server_i::handle_timeout (const ACE_Time_Value &,
- const void *)
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("About to make a remote call in the Upcall \n")));
-
- for (int times = 0;
- times < this->no_iterations_;
- ++times)
- {
- this->callback_->callback_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) The cache has grown, aborting ..\n"));
-
- ACE_OS::abort ();
- }
- }
-
- this->callback_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return 0;
-}
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Boolean do_callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (do_callback)
- {
- // Scheduling ourselves for doing the callbacks
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Scheduling for callback\n")));
-
- if (this->orb_->orb_core ()->reactor ()->schedule_timer (this,
- 0,
- ACE_Time_Value (1)) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Can't schedule timers, aborting ..\n"));
-
- ACE_OS::abort ();
- }
- }
-
- return 0;
-}
-
-void
-Simple_Server_i::callback_object (Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Store the callback object
- this->callback_ = Callback::_duplicate (callback);
-}
-
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (false ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/test_i.h b/TAO/tests/BiDirectional_DelayedUpcall/test_i.h
deleted file mode 100644
index c09b83fe688..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/test_i.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/BiDirectional
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_BIDIRECTIONAL_TEST_I_H
-#define TAO_BIDIRECTIONAL_TEST_I_H
-
-#include "testS.h"
-#include "ace/Event_Handler.h"
-
-class Callback_i : public virtual POA_Callback
-{
- // = TITLE
- // A callback object to the "client"
- //
- // = DESCRIPTION
- // To test that the server can call the client on the same
- // connection that was established by the client
- //
-public:
- Callback_i (CORBA::ORB_ptr orb);
- // ctor
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Safe way to shutdown
-
- void callback_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // The callback method
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-};
-
-class Simple_Server_i : public virtual POA_Simple_Server, ACE_Event_Handler
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb, int no_iterations);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Boolean do_callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void callback_object (Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual int handle_timeout (const ACE_Time_Value &current_time,
- const void *act = 0);
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-
- int flag_;
- // Flag to indicate, whether we are ready for a remote call.
-
- Callback_var callback_;
- // Callback Object
-
- int no_iterations_;
- // Number of times the callback needs to be called
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_BIDIRECTIONAL_TEST_I_H */
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/test_i.i b/TAO/tests/BiDirectional_DelayedUpcall/test_i.i
deleted file mode 100644
index 799be9fdcbe..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/test_i.i
+++ /dev/null
@@ -1,17 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Callback_i::Callback_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb,
- int no_iterations)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- flag_ (0),
- callback_ (0),
- no_iterations_ (no_iterations)
-{
-}
diff --git a/TAO/tests/BiDirectional_MultipleORB/destroy.cpp b/TAO/tests/BiDirectional_MultipleORB/destroy.cpp
index d4b0af3a3b9..8bd145f9aa8 100644
--- a/TAO/tests/BiDirectional_MultipleORB/destroy.cpp
+++ b/TAO/tests/BiDirectional_MultipleORB/destroy.cpp
@@ -21,6 +21,7 @@
#include "tao/PortableServer/PortableServer.h"
#include "tao/AnyTypeCode/Any.h"
#include "tao/BiDir_GIOP/BiDirGIOP.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(BiDir_Multiple_ORB, destroy, "$Id$")
@@ -107,16 +108,18 @@ test_with_bidir_poa (int argc,
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int result = 0;
for (int i=0; i<10; i++)
{
- result = test_with_bidir_poa (argc, argv, "poa_1", 1);
+ result = test_with_bidir_poa (convert.get_argc(), convert.get_ASCII_argv(), "poa_1", 1);
ACE_ASSERT (result == 0);
- result = test_with_bidir_poa (argc, argv, "poa_2", 1);
+ result = test_with_bidir_poa (convert.get_argc(), convert.get_ASCII_argv(), "poa_2", 1);
ACE_ASSERT (result == 0);
}
ACE_DEBUG ((LM_DEBUG, "Completed OK\n"));
diff --git a/TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc b/TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc
index abcf650df1b..41e4576ab9a 100644
--- a/TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc
+++ b/TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, minimum_corba, bidir_giop {
}
project(*Client): taoexe, portableserver, minimum_corba, bidir_giop {
- after += *Server
Source_Files {
test_i.cpp
client.cpp
diff --git a/TAO/tests/BiDirectional_NestedUpcall/client.cpp b/TAO/tests/BiDirectional_NestedUpcall/client.cpp
index 184e7ebda37..409f9c564f2 100644
--- a/TAO/tests/BiDirectional_NestedUpcall/client.cpp
+++ b/TAO/tests/BiDirectional_NestedUpcall/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "ace/High_Res_Timer.h"
#include "tao/BiDir_GIOP/BiDirGIOP.h"
@@ -17,7 +18,7 @@ void do_nothing (void)
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,12 +42,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -100,7 +103,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
@@ -148,7 +151,7 @@ main (int argc, char *argv[])
r));
}
- // Shutdown the server
+ // Shtdown the server
server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/BiDirectional_NestedUpcall/run_test.pl b/TAO/tests/BiDirectional_NestedUpcall/run_test.pl
index 8137e525c9f..d448613167e 100755
--- a/TAO/tests/BiDirectional_NestedUpcall/run_test.pl
+++ b/TAO/tests/BiDirectional_NestedUpcall/run_test.pl
@@ -13,17 +13,12 @@ $iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::Process ("server", "-o test.ior -i 100");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -i 100");
-}
+$SV = new PerlACE::Process ("server", "-o $iorfile -i 100");
$CL = new PerlACE::Process ("client", "-k file://$iorfile");
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill ();
exit 1;
diff --git a/TAO/tests/BiDirectional_NestedUpcall/server.cpp b/TAO/tests/BiDirectional_NestedUpcall/server.cpp
index ef4c284f576..89a3aab8725 100644
--- a/TAO/tests/BiDirectional_NestedUpcall/server.cpp
+++ b/TAO/tests/BiDirectional_NestedUpcall/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "tao/BiDir_GIOP/BiDirGIOP.h"
#include "tao/AnyTypeCode/Any.h"
@@ -14,7 +15,7 @@ int no_iterations = 10;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,12 +42,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -100,7 +103,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i *server_impl = 0;
@@ -133,7 +136,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Big_AMI/Big_AMI.mpc b/TAO/tests/Big_AMI/Big_AMI.mpc
index 2493ddfb825..d98c87ca241 100644
--- a/TAO/tests/Big_AMI/Big_AMI.mpc
+++ b/TAO/tests/Big_AMI/Big_AMI.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver, messaging, ami {
project(*Client): taoserver, messaging, ami {
exename = client
- after += *Server
Source_Files {
client.cpp
}
diff --git a/TAO/tests/Big_AMI/client.cpp b/TAO/tests/Big_AMI/client.cpp
index 23391b5b797..8b80c084e27 100644
--- a/TAO/tests/Big_AMI/client.cpp
+++ b/TAO/tests/Big_AMI/client.cpp
@@ -14,6 +14,7 @@
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "ace/Task.h"
#include "ami_testS.h"
@@ -31,7 +32,7 @@ CORBA::ULong payload_size = 128000;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "db:k:i:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "db:k:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -98,7 +99,7 @@ public:
}
};
- void foo_excep (::Messaging::ExceptionHolder * excep_holder
+ void foo_excep (A::AMI_AMI_TestExceptionHolder * excep_holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -109,7 +110,7 @@ public:
"Testing proper exception handling ...\n"));
ACE_TRY
{
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ excep_holder->raise_foo (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -126,15 +127,16 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var object_var =
@@ -152,7 +154,7 @@ main (int argc, char *argv[])
poa_manager_var->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// We reuse the object_var smart pointer!
diff --git a/TAO/tests/Big_AMI/server.cpp b/TAO/tests/Big_AMI/server.cpp
index b2868cd1e58..f8ab2c52740 100644
--- a/TAO/tests/Big_AMI/server.cpp
+++ b/TAO/tests/Big_AMI/server.cpp
@@ -18,6 +18,7 @@
#include "tao/debug.h"
#include "ace/OS_NS_stdio.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(AMI, server, "$Id$")
@@ -26,7 +27,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:d");
int c;
while ((c = get_opts ()) != -1)
@@ -52,13 +53,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
AMI_Test_i ami_test_i (orb.in ());
@@ -96,7 +99,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Big_Oneways/Big_Oneways.mpc b/TAO/tests/Big_Oneways/Big_Oneways.mpc
index 5cf458a0b1e..85935126945 100644
--- a/TAO/tests/Big_Oneways/Big_Oneways.mpc
+++ b/TAO/tests/Big_Oneways/Big_Oneways.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver {
}
project(*Client): taoexe, portableserver {
- after += *Server
Source_Files {
Peer.cpp
Session.cpp
diff --git a/TAO/tests/Big_Oneways/client.cpp b/TAO/tests/Big_Oneways/client.cpp
index 13465fab43c..2ba99b1d8a8 100644
--- a/TAO/tests/Big_Oneways/client.cpp
+++ b/TAO/tests/Big_Oneways/client.cpp
@@ -3,6 +3,7 @@
#include "Peer.h"
#include "ace/Get_Opt.h"
#include "ace/Thread_Manager.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Big_Oneways, client, "$Id$")
@@ -11,7 +12,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Big_Oneways/server.cpp b/TAO/tests/Big_Oneways/server.cpp
index 9aa9d7a7522..7105cc2c1fc 100644
--- a/TAO/tests/Big_Oneways/server.cpp
+++ b/TAO/tests/Big_Oneways/server.cpp
@@ -4,6 +4,7 @@
#include "Session_Control.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Big_Oneways, server, "$Id$")
@@ -16,7 +17,7 @@ CORBA::ULong thread_count = 4;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:p:b:i:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:p:b:i:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -60,12 +61,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -85,7 +88,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Coordinator *coordinator_impl = 0;
@@ -102,7 +105,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Big_Reply/Big_Reply.mpc b/TAO/tests/Big_Reply/Big_Reply.mpc
index 648403b35a4..59034cf50db 100644
--- a/TAO/tests/Big_Reply/Big_Reply.mpc
+++ b/TAO/tests/Big_Reply/Big_Reply.mpc
@@ -3,7 +3,6 @@
project(*Server): taoserver {
idlflags += -Sa -St
- after += *Client
Source_Files {
Big_Reply_i.cpp
server.cpp
diff --git a/TAO/tests/Big_Reply/client.cpp b/TAO/tests/Big_Reply/client.cpp
index 05651121792..b8fcc5f09d9 100644
--- a/TAO/tests/Big_Reply/client.cpp
+++ b/TAO/tests/Big_Reply/client.cpp
@@ -2,6 +2,7 @@
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Muxing, client, "$Id$")
@@ -10,7 +11,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -33,15 +34,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Big_Reply/server.cpp b/TAO/tests/Big_Reply/server.cpp
index b09fbd74a0b..0cf62983ea1 100644
--- a/TAO/tests/Big_Reply/server.cpp
+++ b/TAO/tests/Big_Reply/server.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "Big_Reply_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Big_Reply, server, "$Id$")
@@ -15,7 +16,7 @@ const CORBA::ULong data_size = 4000000;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:s:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:s:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,14 +40,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DEBUG ((LM_DEBUG, "Starting server\n"));
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -67,7 +70,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Big_Reply_i *big_reply_gen;
@@ -90,7 +93,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc b/TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc
index 5d5b10de0c1..0931f18f506 100644
--- a/TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc
+++ b/TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, messaging {
- after += *Server
Source_Files {
TestC.cpp
Client_Task.cpp
diff --git a/TAO/tests/Big_Request_Muxing/client.cpp b/TAO/tests/Big_Request_Muxing/client.cpp
index eea6aab06f8..23ebddfd0e2 100644
--- a/TAO/tests/Big_Request_Muxing/client.cpp
+++ b/TAO/tests/Big_Request_Muxing/client.cpp
@@ -2,6 +2,7 @@
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/Messaging/Messaging.h"
ACE_RCSID(Muxing, client, "$Id$")
@@ -17,7 +18,7 @@ static const int MSG_SIZE = 4096;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,17 +42,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DEBUG ((LM_DEBUG, "Starting client\n"));
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Big_Request_Muxing/server.cpp b/TAO/tests/Big_Request_Muxing/server.cpp
index 49e88b06fa6..33928847556 100644
--- a/TAO/tests/Big_Request_Muxing/server.cpp
+++ b/TAO/tests/Big_Request_Muxing/server.cpp
@@ -4,6 +4,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_sys_time.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Big_Request_Muxing, server, "$Id$")
@@ -13,7 +14,7 @@ static int expected = 600;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:e:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:e:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,14 +40,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DEBUG ((LM_DEBUG, "Starting server\n"));
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -66,7 +69,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Payload_Receiver *payload_receiver_impl;
@@ -84,7 +87,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -109,19 +112,13 @@ main (int argc, char *argv[])
break;
}
- int count = payload_receiver_impl->count();
-
- if (count != expected)
- {
- ACE_DEBUG((LM_DEBUG, "Server waiting for extra messages, "
- "have now %d messages already...\n", count));
+ ACE_DEBUG((LM_DEBUG, "Server waiting for extra messages...\n"));
- ACE_Time_Value tv(5);
- orb->run(tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ACE_Time_Value tv(3);
+ orb->run(tv ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
- count = payload_receiver_impl->count();
- }
+ int count = payload_receiver_impl->count();
int result = 0;
diff --git a/TAO/tests/Big_Twoways/Big_Twoways.mpc b/TAO/tests/Big_Twoways/Big_Twoways.mpc
index 5cf458a0b1e..85935126945 100644
--- a/TAO/tests/Big_Twoways/Big_Twoways.mpc
+++ b/TAO/tests/Big_Twoways/Big_Twoways.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver {
}
project(*Client): taoexe, portableserver {
- after += *Server
Source_Files {
Peer.cpp
Session.cpp
diff --git a/TAO/tests/Big_Twoways/client.cpp b/TAO/tests/Big_Twoways/client.cpp
index 48013a64c34..53785b9c77b 100644
--- a/TAO/tests/Big_Twoways/client.cpp
+++ b/TAO/tests/Big_Twoways/client.cpp
@@ -3,6 +3,7 @@
#include "Peer.h"
#include "ace/Get_Opt.h"
#include "ace/Thread_Manager.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Big_Oneways, client, "$Id$")
@@ -11,7 +12,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Big_Twoways/server.cpp b/TAO/tests/Big_Twoways/server.cpp
index 55ba8b87c95..ba78958212e 100644
--- a/TAO/tests/Big_Twoways/server.cpp
+++ b/TAO/tests/Big_Twoways/server.cpp
@@ -4,6 +4,7 @@
#include "Session_Control.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Big_Oneways, server, "$Id$")
@@ -16,7 +17,7 @@ CORBA::ULong thread_count = 4;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:p:b:i:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:p:b:i:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -60,12 +61,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -85,7 +88,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Coordinator *coordinator_impl;
@@ -102,7 +105,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc b/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc
index f2870ef39d9..1c10394d0c4 100644
--- a/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc
+++ b/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, messaging {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Blocking_Sync_None/client.cpp b/TAO/tests/Blocking_Sync_None/client.cpp
index 2bff1936b7b..bdcce3dfbeb 100644
--- a/TAO/tests/Blocking_Sync_None/client.cpp
+++ b/TAO/tests/Blocking_Sync_None/client.cpp
@@ -5,6 +5,7 @@
#include "tao/AnyTypeCode/Any.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_sys_time.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Blocking_Sync_None, client, "$Id$")
@@ -14,7 +15,7 @@ int iterations = 1000;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -43,15 +44,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Blocking_Sync_None/server.cpp b/TAO/tests/Blocking_Sync_None/server.cpp
index a774b6cdf83..938fee7bd19 100644
--- a/TAO/tests/Blocking_Sync_None/server.cpp
+++ b/TAO/tests/Blocking_Sync_None/server.cpp
@@ -3,6 +3,7 @@
#include "Blocking_Sync_None.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Blocking_Sync_None, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Blocking_Sync_None *blocking_sync_none_impl;
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc b/TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc
index 792a118237c..4c5733dfbee 100644
--- a/TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc
+++ b/TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, messaging {
- after += *Server
Source_Files {
Echo.cpp
Client_Task.cpp
diff --git a/TAO/tests/Bug_1020_Basic_Regression/client.cpp b/TAO/tests/Bug_1020_Basic_Regression/client.cpp
index 7deb646b538..c76cf2a854f 100644
--- a/TAO/tests/Bug_1020_Basic_Regression/client.cpp
+++ b/TAO/tests/Bug_1020_Basic_Regression/client.cpp
@@ -6,6 +6,7 @@
#include "ace/Get_Opt.h"
#include "tao/Messaging/Messaging.h"
#include "tao/AnyTypeCode/Any.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Bug_1020_Basic_Regression,
client,
@@ -16,7 +17,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,12 +42,14 @@ parse_args (int argc, char *argv[])
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -104,7 +107,7 @@ main (int argc, char *argv[])
policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Echo> impl;
diff --git a/TAO/tests/Bug_1020_Basic_Regression/server.cpp b/TAO/tests/Bug_1020_Basic_Regression/server.cpp
index 4f62134a66f..722a3727516 100644
--- a/TAO/tests/Bug_1020_Basic_Regression/server.cpp
+++ b/TAO/tests/Bug_1020_Basic_Regression/server.cpp
@@ -4,6 +4,7 @@
#include "tao/ORB_Core.h"
#include "tao/Utils/Servant_Var.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1020_Basic_Regression,
server,
@@ -14,7 +15,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,12 +40,14 @@ parse_args (int argc, char *argv[])
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -67,7 +70,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Echo_Caller> impl;
@@ -93,7 +96,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_1020_Regression/client.cpp b/TAO/tests/Bug_1020_Regression/client.cpp
index 63209f90483..02932c19709 100644
--- a/TAO/tests/Bug_1020_Regression/client.cpp
+++ b/TAO/tests/Bug_1020_Regression/client.cpp
@@ -8,6 +8,7 @@
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
#include "ace/Reactor.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1230_Regression, client, "$Id$")
@@ -26,12 +27,14 @@ public:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -84,7 +87,7 @@ main (int argc, char *argv[])
policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Echo> impl;
@@ -168,7 +171,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1020_Regression/server.cpp b/TAO/tests/Bug_1020_Regression/server.cpp
index e1b7ee43a48..bdef526458d 100644
--- a/TAO/tests/Bug_1020_Regression/server.cpp
+++ b/TAO/tests/Bug_1020_Regression/server.cpp
@@ -6,6 +6,7 @@
#include "tao/Utils/Servant_Var.h"
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Bug_1230_Regression,
server,
@@ -17,12 +18,14 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -49,7 +52,7 @@ main (int argc, char *argv[])
orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Server> impl;
@@ -75,7 +78,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -115,7 +118,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc b/TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc
index e38622c756d..28f67b75ec0 100644
--- a/TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc
+++ b/TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, messaging {
- after += *Server
Source_Files {
Echo.cpp
client.cpp
diff --git a/TAO/tests/Bug_1269_Regression/client.cpp b/TAO/tests/Bug_1269_Regression/client.cpp
index 50b19d24f84..60669529b57 100644
--- a/TAO/tests/Bug_1269_Regression/client.cpp
+++ b/TAO/tests/Bug_1269_Regression/client.cpp
@@ -7,6 +7,7 @@
#include "tao/Utils/Servant_Var.h"
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1269_Regression, client, "$Id$")
@@ -16,12 +17,14 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -74,7 +77,7 @@ main (int argc, char *argv[])
policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Echo> impl;
@@ -146,7 +149,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1269_Regression/server.cpp b/TAO/tests/Bug_1269_Regression/server.cpp
index 2e89b271b31..e741e86a8e3 100644
--- a/TAO/tests/Bug_1269_Regression/server.cpp
+++ b/TAO/tests/Bug_1269_Regression/server.cpp
@@ -5,6 +5,7 @@
#include "tao/Utils/Servant_Var.h"
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1269_Regression, server, "$Id$")
@@ -14,12 +15,14 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -46,7 +49,7 @@ main (int argc, char *argv[])
orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Echo_Caller> impl;
@@ -72,7 +75,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -110,7 +113,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1269_Regression/shutdown.cpp b/TAO/tests/Bug_1269_Regression/shutdown.cpp
index e48142df37f..a71d5dd6611 100644
--- a/TAO/tests/Bug_1269_Regression/shutdown.cpp
+++ b/TAO/tests/Bug_1269_Regression/shutdown.cpp
@@ -2,6 +2,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1269_Regression, shutdown, "$Id$")
@@ -11,16 +12,18 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
@@ -61,7 +64,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc b/TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc
index 146c41a5026..132b1f49116 100644
--- a/TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc
+++ b/TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, messaging {
- after += *Server
Source_Files {
Echo.cpp
client.cpp
@@ -18,7 +17,6 @@ project(*Client): taoclient, messaging {
}
project(*Shutdown): taoexe, messaging {
- after += *Client
Source_Files {
shutdown.cpp
}
diff --git a/TAO/tests/Bug_1270_Regression/client.cpp b/TAO/tests/Bug_1270_Regression/client.cpp
index 8405b2d1c0c..9604b06e19f 100644
--- a/TAO/tests/Bug_1270_Regression/client.cpp
+++ b/TAO/tests/Bug_1270_Regression/client.cpp
@@ -8,6 +8,7 @@
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
#include "ace/Reactor.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1270_Regression, client, "$Id$")
@@ -17,12 +18,14 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -75,7 +78,7 @@ main (int argc, char *argv[])
policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Echo> impl;
@@ -147,7 +150,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1270_Regression/server.cpp b/TAO/tests/Bug_1270_Regression/server.cpp
index 361b06dd275..a25cdfdb5e4 100644
--- a/TAO/tests/Bug_1270_Regression/server.cpp
+++ b/TAO/tests/Bug_1270_Regression/server.cpp
@@ -5,6 +5,7 @@
#include "tao/Utils/Servant_Var.h"
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1270_Regression, server, "$Id$")
@@ -14,12 +15,14 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -46,7 +49,7 @@ main (int argc, char *argv[])
orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Echo_Caller> impl;
@@ -72,7 +75,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -110,7 +113,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1270_Regression/shutdown.cpp b/TAO/tests/Bug_1270_Regression/shutdown.cpp
index 68026a71eec..36e09239c80 100644
--- a/TAO/tests/Bug_1270_Regression/shutdown.cpp
+++ b/TAO/tests/Bug_1270_Regression/shutdown.cpp
@@ -2,6 +2,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1270_Regression, shutdown, "$Id$")
@@ -11,16 +12,18 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
@@ -61,7 +64,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc b/TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc
index 93a6bb0d168..60296491dbb 100644
--- a/TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc
+++ b/TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc
@@ -1,15 +1,14 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, iortable {
+project(Bug 1330 Server): taoserver, iortable {
Source_Files {
Test_i.cpp
server.cpp
}
}
-project(*Client): taoclient, anytypecode {
- after += *Server
+project(Bug 1330 Client): taoclient, anytypecode {
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Bug_1330_Regression/client.cpp b/TAO/tests/Bug_1330_Regression/client.cpp
index f317731aeae..3308e1ecef0 100644
--- a/TAO/tests/Bug_1330_Regression/client.cpp
+++ b/TAO/tests/Bug_1330_Regression/client.cpp
@@ -3,6 +3,7 @@
//
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior = "corbaloc:iiop:localhost:12345/Name\\2dwith\\2dhyphens";
int shutdown_server = 0;
@@ -10,7 +11,7 @@ int shutdown_server = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,16 +37,18 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int result = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Bug_1330_Regression/server.cpp b/TAO/tests/Bug_1330_Regression/server.cpp
index 63308e1c36c..213bcede6ac 100644
--- a/TAO/tests/Bug_1330_Regression/server.cpp
+++ b/TAO/tests/Bug_1330_Regression/server.cpp
@@ -3,6 +3,7 @@
//
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
#include "Test_i.h"
#include "tao/IORTable/IORTable.h"
@@ -12,7 +13,7 @@ const char *object_key = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,14 +36,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Test_i server_impl;
@@ -91,7 +94,7 @@ main (int argc, char *argv[])
adapter->bind("Name-with-hyphens", ior.in());
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
+ FILE *output_file= ACE_OS::fopen ("server.ior", ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"SERVER (%P): Cannot open output file "
diff --git a/TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc b/TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc
index f0247d4c080..6b2b0dc5cc1 100644
--- a/TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc
+++ b/TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc
@@ -11,7 +11,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, messaging {
- after += *Server
Source_Files {
Echo.cpp
ORB_Task.cpp
@@ -20,7 +19,6 @@ project(*Client): taoclient, messaging {
}
project(*Shutdown): taoexe, messaging {
- after += *Client
Source_Files {
shutdown.cpp
}
diff --git a/TAO/tests/Bug_1361_Regression/client.cpp b/TAO/tests/Bug_1361_Regression/client.cpp
index 76b98781048..0650e70dd99 100644
--- a/TAO/tests/Bug_1361_Regression/client.cpp
+++ b/TAO/tests/Bug_1361_Regression/client.cpp
@@ -8,6 +8,7 @@
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
#include "ace/Reactor.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1270_Regression, client, "$Id$")
@@ -49,12 +50,14 @@ public:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -107,7 +110,7 @@ main (int argc, char *argv[])
policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Echo> impl;
@@ -199,7 +202,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:t:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:t:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1361_Regression/server.cpp b/TAO/tests/Bug_1361_Regression/server.cpp
index 5b09f46aa76..66686d9a6b8 100644
--- a/TAO/tests/Bug_1361_Regression/server.cpp
+++ b/TAO/tests/Bug_1361_Regression/server.cpp
@@ -5,6 +5,7 @@
#include "tao/Utils/Servant_Var.h"
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "Server_Thread_Pool.h"
#include "ORB_Task.h"
@@ -16,12 +17,14 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -49,7 +52,7 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
ACE_Thread_Manager mymanager;
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -125,7 +128,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1361_Regression/shutdown.cpp b/TAO/tests/Bug_1361_Regression/shutdown.cpp
index ba1eb1160f0..416b7099fb6 100644
--- a/TAO/tests/Bug_1361_Regression/shutdown.cpp
+++ b/TAO/tests/Bug_1361_Regression/shutdown.cpp
@@ -2,6 +2,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
// FUZZ: disable check_for_streams_include
#include "ace/streams.h"
@@ -14,18 +15,20 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DEBUG ((LM_DEBUG,
"Starting shutdown\n"));
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
@@ -66,7 +69,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc b/TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc
index a149ce848c3..3c891b3c652 100644
--- a/TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc
+++ b/TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, messaging {
- after += *Server
Source_Files {
Client_Task.cpp
Server_Task.cpp
diff --git a/TAO/tests/Bug_1476_Regression/client.cpp b/TAO/tests/Bug_1476_Regression/client.cpp
index f08edccd51d..366cef09eab 100644
--- a/TAO/tests/Bug_1476_Regression/client.cpp
+++ b/TAO/tests/Bug_1476_Regression/client.cpp
@@ -3,6 +3,7 @@
#include "Client_Task.h"
#include "Server_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/Messaging/Messaging.h"
#include "tao/Transport_Cache_Manager.h"
#include "tao/Transport.h"
@@ -20,7 +21,7 @@ int number_of_client_tasks = 2;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:n:c:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:n:c:");
int c;
while ((c = get_opts ()) != -1)
@@ -51,12 +52,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -105,7 +108,7 @@ main (int argc, char *argv[])
policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Get the sender reference..
diff --git a/TAO/tests/Bug_1476_Regression/server.cpp b/TAO/tests/Bug_1476_Regression/server.cpp
index b65d5e2333c..71c2912b544 100644
--- a/TAO/tests/Bug_1476_Regression/server.cpp
+++ b/TAO/tests/Bug_1476_Regression/server.cpp
@@ -4,6 +4,7 @@
#include "Server_Task.h"
#include "ace/OS_NS_unistd.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Oneways_Invoking_Twoways, server, "$Id$")
@@ -13,7 +14,7 @@ int number_of_oneways = 10;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,12 +40,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -64,7 +67,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Sender_i *sender_impl;
@@ -82,7 +85,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_1482_Regression/Reply_Handler.cpp b/TAO/tests/Bug_1482_Regression/Reply_Handler.cpp
index 93189526614..1d3676af938 100644
--- a/TAO/tests/Bug_1482_Regression/Reply_Handler.cpp
+++ b/TAO/tests/Bug_1482_Regression/Reply_Handler.cpp
@@ -16,14 +16,14 @@ Reply_Handler::next_prime (CORBA::ULong
void
Reply_Handler::next_prime_excep (
- ::Messaging::ExceptionHolder *ex
+ Test::AMI_HelloExceptionHolder *ex
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_TRY
{
- ex->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ex->raise_next_prime (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCH (CORBA::COMM_FAILURE, t)
diff --git a/TAO/tests/Bug_1482_Regression/Reply_Handler.h b/TAO/tests/Bug_1482_Regression/Reply_Handler.h
index 03700034b3e..3656bb8e69a 100644
--- a/TAO/tests/Bug_1482_Regression/Reply_Handler.h
+++ b/TAO/tests/Bug_1482_Regression/Reply_Handler.h
@@ -18,7 +18,7 @@ public:
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- void next_prime_excep (::Messaging::ExceptionHolder * excep_holder
+ void next_prime_excep (Test::AMI_HelloExceptionHolder * excep_holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/tests/Bug_1482_Regression/client.cpp b/TAO/tests/Bug_1482_Regression/client.cpp
index 78a8635a4e5..e75f546d1ba 100644
--- a/TAO/tests/Bug_1482_Regression/client.cpp
+++ b/TAO/tests/Bug_1482_Regression/client.cpp
@@ -3,6 +3,7 @@
#include "TestS.h"
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/AnyTypeCode/Any.h"
ACE_RCSID(Hello, client, "$Id$")
@@ -12,7 +13,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,15 +37,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Bug_1482_Regression/server.cpp b/TAO/tests/Bug_1482_Regression/server.cpp
index 2204fc213da..39b52cc8afe 100644
--- a/TAO/tests/Bug_1482_Regression/server.cpp
+++ b/TAO/tests/Bug_1482_Regression/server.cpp
@@ -2,6 +2,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "Server_Task.h"
ACE_RCSID (LongUpcall_Crash_Test,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_1482_Regression/Bug_1482_Regression.mpc b/TAO/tests/Bug_1482_Regression/test.mpc
index 26363b5c9bc..db29b4062dd 100644
--- a/TAO/tests/Bug_1482_Regression/Bug_1482_Regression.mpc
+++ b/TAO/tests/Bug_1482_Regression/test.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, amh, ami, iortable, portableserver {
+project(Bug_1482_Server): taoserver, amh, ami, iortable, portableserver {
Source_Files {
Hello.cpp
Server_Task.cpp
@@ -9,9 +9,8 @@ project(*Server): taoserver, amh, ami, iortable, portableserver {
}
}
-project(*Client): taoserver, amh, ami {
+project(Bug_1482_Client): taoserver, amh, ami {
exename = client
- after += *Server
Source_Files {
Client_Task.cpp
Reply_Handler.cpp
diff --git a/TAO/tests/Bug_1495_Regression/Bug_1495.mpc b/TAO/tests/Bug_1495_Regression/Bug_1495.mpc
index 7e7cfd67199..17b9c050382 100644
--- a/TAO/tests/Bug_1495_Regression/Bug_1495.mpc
+++ b/TAO/tests/Bug_1495_Regression/Bug_1495.mpc
@@ -12,7 +12,6 @@ project(*Server): taoserver, pi_server, interceptors {
project(*Client): taoserver, pi, interceptors {
exename = client
- after += *Server
Source_Files {
test_i.cpp
testC.cpp
diff --git a/TAO/tests/Bug_1495_Regression/Client_Task.cpp b/TAO/tests/Bug_1495_Regression/Client_Task.cpp
index 51150d118a7..4732996c119 100644
--- a/TAO/tests/Bug_1495_Regression/Client_Task.cpp
+++ b/TAO/tests/Bug_1495_Regression/Client_Task.cpp
@@ -44,36 +44,32 @@ Client_Task::svc (void)
return 1;
}
- // Try multiple calls to see if we keep being forwarded
- for (int i = 0; i < 5; i++)
- {
- // call the thread_id function on the test object
- CORBA::Long remote_thread_id;
+ // call the thread_id function on the test object
+ CORBA::Long remote_thread_id;
+
+ server->get_thread_id (remote_thread_id ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
- server->get_thread_id (remote_thread_id ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ACE_DEBUG ((LM_INFO,
+ "Remote thread ID was %i\n",
+ remote_thread_id));
+ CORBA::Long mythread_id = (CORBA::Long)ACE_Thread::self();
+ if (mythread_id != remote_thread_id)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "ERROR: Failed Bug_1495_Regression test. "
+ "Expected thread id was %i, received %i.\n",
+ mythread_id,
+ remote_thread_id));
+ }
+ else
+ {
ACE_DEBUG ((LM_INFO,
- "Remote thread ID was %i\n",
+ "Passed Bug_1495_Regression test.\n"
+ "Local thread id was %i, received %i.\n",
+ mythread_id,
remote_thread_id));
-
- CORBA::Long mythread_id = (CORBA::Long)ACE_Thread::self();
- if (mythread_id != remote_thread_id)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Failed Bug_1495_Regression test. "
- "Expected thread id was %i, received %i.\n",
- mythread_id,
- remote_thread_id));
- }
- else
- {
- ACE_DEBUG ((LM_INFO,
- "Passed Bug_1495_Regression test.\n"
- "Local thread id was %i, received %i.\n",
- mythread_id,
- remote_thread_id));
- }
}
}
ACE_CATCHANY
diff --git a/TAO/tests/Bug_1495_Regression/Server_Task.cpp b/TAO/tests/Bug_1495_Regression/Server_Task.cpp
index acaf0e35779..1d9720583cd 100644
--- a/TAO/tests/Bug_1495_Regression/Server_Task.cpp
+++ b/TAO/tests/Bug_1495_Regression/Server_Task.cpp
@@ -70,7 +70,7 @@ Server_Task::svc (void)
if (output_ != 0)
{
- FILE *output_file = ACE_OS::fopen (output_, "w");
+ FILE *output_file = ACE_OS::fopen (output_, ACE_TEXT("w"));
if (output_file == 0)
{
diff --git a/TAO/tests/Bug_1495_Regression/Server_Task.h b/TAO/tests/Bug_1495_Regression/Server_Task.h
index b00725ba805..d6f71524d62 100644
--- a/TAO/tests/Bug_1495_Regression/Server_Task.h
+++ b/TAO/tests/Bug_1495_Regression/Server_Task.h
@@ -16,9 +16,7 @@
#include "tao/ORB.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implements the Task to run the process colocated thread.
class Server_Task : public ACE_Task_Base
diff --git a/TAO/tests/Bug_1495_Regression/Threaded_Client.cpp b/TAO/tests/Bug_1495_Regression/Threaded_Client.cpp
index 99bb3239dfc..ac880e471dd 100644
--- a/TAO/tests/Bug_1495_Regression/Threaded_Client.cpp
+++ b/TAO/tests/Bug_1495_Regression/Threaded_Client.cpp
@@ -22,6 +22,7 @@
#include "ace/Get_Opt.h"
#include "ace/Argv_Type_Converter.h"
#include "ace/Manual_Event.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior_input_file = "file://test.ior";
const char *ior_output_file = "thr_server.ior";
@@ -29,7 +30,7 @@ const char *ior_output_file = "thr_server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:o:");
int c;
while ((c = get_opts ()) != -1)
@@ -56,10 +57,12 @@ parse_args (int argc, char *argv[])
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
// Parse command line
- if (parse_args (argc, argv) == -1)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
{
return -1;
}
@@ -67,11 +70,10 @@ main (int argc, char *argv[])
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- ACE_Argv_Type_Converter main_args_s (argc, argv);
CORBA::ORB_var sorb =
- CORBA::ORB_init (main_args_s.get_argc (),
- main_args_s.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"Server_ORB"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -92,11 +94,9 @@ main (int argc, char *argv[])
// Wait for the server task to activate.
me.wait ();
- ACE_Argv_Type_Converter main_args_c (argc, argv);
-
CORBA::ORB_var corb =
- CORBA::ORB_init (main_args_c.get_argc (),
- main_args_c.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"Client_ORB"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Bug_1495_Regression/Threaded_Server.cpp b/TAO/tests/Bug_1495_Regression/Threaded_Server.cpp
index 95cd68db7e7..fca9f2b82c6 100644
--- a/TAO/tests/Bug_1495_Regression/Threaded_Server.cpp
+++ b/TAO/tests/Bug_1495_Regression/Threaded_Server.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "server_interceptor.h"
#include "Server_ORBInitializer.h"
@@ -17,7 +18,7 @@ const char *ior_input_file = "file://thr_server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:o:");
int c;
@@ -45,8 +46,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Create the ORB initializer.
@@ -63,7 +66,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Now initialize the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
"Remote_Server_ORB" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -89,7 +92,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
return 1;
}
@@ -146,7 +149,7 @@ main (int argc, char *argv[])
// Output the server IOR to a file
if (ior_output_file != 0)
{
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
{
diff --git a/TAO/tests/Bug_1495_Regression/run_test.pl b/TAO/tests/Bug_1495_Regression/run_test.pl
index 417ff9437e6..981d1300a59 100755
--- a/TAO/tests/Bug_1495_Regression/run_test.pl
+++ b/TAO/tests/Bug_1495_Regression/run_test.pl
@@ -25,7 +25,7 @@ $SV = new PerlACE::Process ("server", "-o $inputfile -i file://$thrserverfile");
$client = $CL->Spawn ();
-if (PerlACE::waitforfile_timed ($thrserverfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+if (PerlACE::waitforfile_timed ($thrserverfile, 5) == -1) {
print STDERR "ERROR: cannot find file <$thrserverfile>\n";
exit 1;
}
diff --git a/TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp b/TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp
index 1bec57c8fde..4d25d9756f4 100644
--- a/TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp
+++ b/TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp
@@ -5,6 +5,7 @@
#include "tao/Utils/RIR_Narrow.h"
#include "tao/Utils/PolicyList_Destroyer.h"
#include "tao/Utils/Servant_Var.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Bug_1535_Regression,
bug_1535_regression,
@@ -177,15 +178,17 @@ test_create_object_before_POA_reactivation(
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Bug_1551_Regression/Reply_Handler.cpp b/TAO/tests/Bug_1551_Regression/Reply_Handler.cpp
index 3596677754b..d9b4db4ff88 100644
--- a/TAO/tests/Bug_1551_Regression/Reply_Handler.cpp
+++ b/TAO/tests/Bug_1551_Regression/Reply_Handler.cpp
@@ -31,7 +31,7 @@ Reply_Handler::short_sleep (ACE_ENV_SINGLE_ARG_DECL)
void
Reply_Handler::short_sleep_excep (
- ::Messaging::ExceptionHolder *ex
+ Test::AMI_HelloExceptionHolder *ex
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -40,7 +40,7 @@ Reply_Handler::short_sleep_excep (
ACE_TRY
{
- ex->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ex->raise_short_sleep (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -65,7 +65,7 @@ Reply_Handler::short_sleep_excep (
void Reply_Handler::
check_counter(ACE_ENV_SINGLE_ARG_DECL)
{
- long count = --counter_;
+ long count = counter_--;
if(count == 0)
{
// ACE_DEBUG((LM_DEBUG, "(%P|%t) Shut down client thread\n"));
diff --git a/TAO/tests/Bug_1551_Regression/Reply_Handler.h b/TAO/tests/Bug_1551_Regression/Reply_Handler.h
index 26ca559dd07..aaadd0582f0 100644
--- a/TAO/tests/Bug_1551_Regression/Reply_Handler.h
+++ b/TAO/tests/Bug_1551_Regression/Reply_Handler.h
@@ -20,7 +20,7 @@ public:
void short_sleep (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- void short_sleep_excep (::Messaging::ExceptionHolder * excep_holder
+ void short_sleep_excep (Test::AMI_HelloExceptionHolder * excep_holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/tests/Bug_1551_Regression/client.cpp b/TAO/tests/Bug_1551_Regression/client.cpp
index a898cdb3398..2dad76c9f7e 100644
--- a/TAO/tests/Bug_1551_Regression/client.cpp
+++ b/TAO/tests/Bug_1551_Regression/client.cpp
@@ -5,6 +5,7 @@
#include "TestS.h"
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/AnyTypeCode/Any.h"
ACE_RCSID(Hello, client, "$Id$")
@@ -16,7 +17,7 @@ int nthreads = 1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "n:k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "n:k:");
int c;
while ((c = get_opts ()) != -1)
@@ -44,17 +45,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int retval = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Bug_1551_Regression/server.cpp b/TAO/tests/Bug_1551_Regression/server.cpp
index 5adc91117fd..7c287a4e7e7 100644
--- a/TAO/tests/Bug_1551_Regression/server.cpp
+++ b/TAO/tests/Bug_1551_Regression/server.cpp
@@ -4,6 +4,7 @@
#include "Server_Task.h"
#include "tao/Utils/Servant_Var.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Bug_1XXX_Regression, server, "$Id$")
@@ -16,7 +17,7 @@ int nthreads = 1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "xn:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xn:o:");
int c;
while ((c = get_opts ()) != -1)
@@ -50,12 +51,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -75,7 +78,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Hello> hello_impl(
@@ -90,7 +93,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_1551_Regression/Bug_1551_Regression.mpc b/TAO/tests/Bug_1551_Regression/test.mpc
index 96a4dfabd63..3898d39df22 100644
--- a/TAO/tests/Bug_1551_Regression/Bug_1551_Regression.mpc
+++ b/TAO/tests/Bug_1551_Regression/test.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, ami, iortable {
+project(Bug_1551_Server): taoserver, ami, iortable {
Source_Files {
Hello.cpp
Server_Task.cpp
@@ -9,9 +9,8 @@ project(*Server): taoserver, ami, iortable {
}
}
-project(*Client): taoserver, ami {
+project(Bug_1551_Client): taoserver, ami {
exename = client
- after += *Server
Source_Files {
Client_Task.cpp
Reply_Handler.cpp
diff --git a/TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc b/TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc
index d6430831e00..828fa8ce052 100644
--- a/TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc
+++ b/TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc
@@ -8,7 +8,6 @@ project(*Server): taoserver, amh {
}
project(*Client): taoserver, amh {
- after += *Server
exename = client
Source_Files {
client.cpp
diff --git a/TAO/tests/Bug_1568_Regression/client.cpp b/TAO/tests/Bug_1568_Regression/client.cpp
index 44edda43ee7..5b68f4dc1e7 100644
--- a/TAO/tests/Bug_1568_Regression/client.cpp
+++ b/TAO/tests/Bug_1568_Regression/client.cpp
@@ -9,6 +9,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1568_Regression, client, "$Id$")
@@ -17,7 +18,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,15 +42,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Bug_1568_Regression/server.cpp b/TAO/tests/Bug_1568_Regression/server.cpp
index fce73b267a5..a06917fea9b 100644
--- a/TAO/tests/Bug_1568_Regression/server.cpp
+++ b/TAO/tests/Bug_1568_Regression/server.cpp
@@ -12,6 +12,7 @@
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
#include "ace/Reactor.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1568_Regression, server, "$Id$")
@@ -100,7 +101,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -124,12 +125,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -149,7 +152,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Simple_C> simple_c_impl(
@@ -164,7 +167,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_1627_Regression/client.cpp b/TAO/tests/Bug_1627_Regression/client.cpp
index f317731aeae..3308e1ecef0 100644
--- a/TAO/tests/Bug_1627_Regression/client.cpp
+++ b/TAO/tests/Bug_1627_Regression/client.cpp
@@ -3,6 +3,7 @@
//
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior = "corbaloc:iiop:localhost:12345/Name\\2dwith\\2dhyphens";
int shutdown_server = 0;
@@ -10,7 +11,7 @@ int shutdown_server = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,16 +37,18 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int result = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Bug_1627_Regression/server.cpp b/TAO/tests/Bug_1627_Regression/server.cpp
index 63308e1c36c..213bcede6ac 100644
--- a/TAO/tests/Bug_1627_Regression/server.cpp
+++ b/TAO/tests/Bug_1627_Regression/server.cpp
@@ -3,6 +3,7 @@
//
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
#include "Test_i.h"
#include "tao/IORTable/IORTable.h"
@@ -12,7 +13,7 @@ const char *object_key = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,14 +36,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Test_i server_impl;
@@ -91,7 +94,7 @@ main (int argc, char *argv[])
adapter->bind("Name-with-hyphens", ior.in());
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
+ FILE *output_file= ACE_OS::fopen ("server.ior", ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"SERVER (%P): Cannot open output file "
diff --git a/TAO/tests/Bug_1627_Regression/Bug_1627_Regression.mpc b/TAO/tests/Bug_1627_Regression/test.mpc
index 93a6bb0d168..66bcbf45c86 100644
--- a/TAO/tests/Bug_1627_Regression/Bug_1627_Regression.mpc
+++ b/TAO/tests/Bug_1627_Regression/test.mpc
@@ -1,15 +1,14 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, iortable {
+project(Bug_1627_Server): taoserver, iortable {
Source_Files {
Test_i.cpp
server.cpp
}
}
-project(*Client): taoclient, anytypecode {
- after += *Server
+project(Bug_1627_Client): taoclient, anytypecode {
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Bug_1635_Regression/client.cpp b/TAO/tests/Bug_1635_Regression/client.cpp
index 9db84a9a4f5..b5cece3cd35 100644
--- a/TAO/tests/Bug_1635_Regression/client.cpp
+++ b/TAO/tests/Bug_1635_Regression/client.cpp
@@ -2,16 +2,19 @@
// $Id$
//
#include "tao/ORB.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/tests/Bug_1636_Regression/client.cpp b/TAO/tests/Bug_1636_Regression/client.cpp
index 51a28417346..28ae7804af1 100644
--- a/TAO/tests/Bug_1636_Regression/client.cpp
+++ b/TAO/tests/Bug_1636_Regression/client.cpp
@@ -3,15 +3,18 @@
//
#include "tao/DynamicInterface/Request.h"
#include "tao/DynamicAny/DynAnyFactory.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv,
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
"" /* the ORB name, it can be anything! */
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Bug_1639_Regression/struct_client.cpp b/TAO/tests/Bug_1639_Regression/struct_client.cpp
index 16ba27452ea..7e330f72993 100644
--- a/TAO/tests/Bug_1639_Regression/struct_client.cpp
+++ b/TAO/tests/Bug_1639_Regression/struct_client.cpp
@@ -4,14 +4,16 @@
#include "tao/DynamicAny/DynAnyFactory.h"
#include "structC.h"
#include <ace/streams.h>
+#include "ace/Argv_Type_Converter.h"
using namespace StructTest;
using namespace DynamicAny;
//--------------------------------------------------------------------
-int main (int argc, char * argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR * argv[])
//--------------------------------------------------------------------
{
+ ACE_Argv_Type_Converter convert (argc, argv);
// Generic catch handler
try {
@@ -20,7 +22,7 @@ int main (int argc, char * argv[])
// ------------------
CORBA::ORB_var orb; // _var, so we don't need/may not CORBA::release(orb)
try {
- orb = CORBA::ORB_init (argc, argv);
+ orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv());
} catch (...) {
cerr << "Cannot initialize ORB" << endl;
throw;
diff --git a/TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc b/TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc
index 5e8364ab993..828fa8ce052 100644
--- a/TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc
+++ b/TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, amh {
project(*Client): taoserver, amh {
exename = client
- after += *Server
Source_Files {
client.cpp
}
diff --git a/TAO/tests/Bug_1670_Regression/client.cpp b/TAO/tests/Bug_1670_Regression/client.cpp
index bf5e3b6385c..a21c37f39be 100644
--- a/TAO/tests/Bug_1670_Regression/client.cpp
+++ b/TAO/tests/Bug_1670_Regression/client.cpp
@@ -9,6 +9,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1670_Regression, client, "$Id$")
@@ -17,7 +18,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,15 +42,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Bug_1670_Regression/server.cpp b/TAO/tests/Bug_1670_Regression/server.cpp
index ca6e5d7aebb..8ff6c8633d5 100644
--- a/TAO/tests/Bug_1670_Regression/server.cpp
+++ b/TAO/tests/Bug_1670_Regression/server.cpp
@@ -12,6 +12,7 @@
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
#include "ace/Reactor.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_1670_Regression, server, "$Id$")
@@ -100,7 +101,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -124,12 +125,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -149,7 +152,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TAO::Utils::Servant_Var<Simple_C> simple_c_impl(
@@ -164,7 +167,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_1693_Test/client.cpp b/TAO/tests/Bug_1693_Test/client.cpp
index d95a5916742..44ba0bb5ff6 100644
--- a/TAO/tests/Bug_1693_Test/client.cpp
+++ b/TAO/tests/Bug_1693_Test/client.cpp
@@ -3,20 +3,22 @@
#include "tao/CodecFactory/CodecFactory.h"
#include "testC.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Codec,
client,
"$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
"my_orb"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Bug_1812_Regression/test.cpp b/TAO/tests/Bug_1812_Regression/test.cpp
index d3b463ab1f1..62d9335d9cd 100755
--- a/TAO/tests/Bug_1812_Regression/test.cpp
+++ b/TAO/tests/Bug_1812_Regression/test.cpp
@@ -6,7 +6,7 @@
* This test does not run - successful compile and link == successful test.
*/
int
-main (int, char *[])
+ACE_TMAIN (int, ACE_TCHAR *[])
{
return 0;
}
diff --git a/TAO/tests/Bug_1813_Regression/test.cpp b/TAO/tests/Bug_1813_Regression/test.cpp
index d3b463ab1f1..62d9335d9cd 100755
--- a/TAO/tests/Bug_1813_Regression/test.cpp
+++ b/TAO/tests/Bug_1813_Regression/test.cpp
@@ -6,7 +6,7 @@
* This test does not run - successful compile and link == successful test.
*/
int
-main (int, char *[])
+ACE_TMAIN (int, ACE_TCHAR *[])
{
return 0;
}
diff --git a/TAO/tests/Bug_1869_Regression/AMI.idl b/TAO/tests/Bug_1869_Regression/AMI.idl
deleted file mode 100644
index d0c2a9eb238..00000000000
--- a/TAO/tests/Bug_1869_Regression/AMI.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-module AMI_test {
- interface adder {
- long add(in long a, in long b);
- };
-};
diff --git a/TAO/tests/Bug_1869_Regression/Bug_1869_Regression.mpc b/TAO/tests/Bug_1869_Regression/Bug_1869_Regression.mpc
deleted file mode 100644
index 15f79878b23..00000000000
--- a/TAO/tests/Bug_1869_Regression/Bug_1869_Regression.mpc
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable, ami, exceptions {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, ami, exceptions {
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1869_Regression/client.cpp b/TAO/tests/Bug_1869_Regression/client.cpp
deleted file mode 100644
index b34fc2fa70c..00000000000
--- a/TAO/tests/Bug_1869_Regression/client.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-#include "AMIS.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_unistd.h"
-
-class AdderCallback
- : public POA_AMI_test::AMI_adderHandler,
- public ACE_Task_Base {
-
- public:
- AdderCallback(CORBA::ORB_ptr orb)
- : orb(CORBA::ORB::_duplicate(orb)) {
- activate();
- }
-
- virtual void add (
- CORBA::Long ami_return_val
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
- {
- ACE_DEBUG ((LM_DEBUG, "Return value: %d\n", ami_return_val));
- }
-
- virtual void add_excep (
- ::Messaging::ExceptionHolder *
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
- {
- ACE_DEBUG ((LM_DEBUG, "Caught exception in _excep\n"));
- }
-
- virtual int svc() {
- orb->run();
-
- return 0;
- }
-
- CORBA::ORB_var orb;
-
-};
-
-int main (int argc, char* argv[]) {
-
- try {
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- // Get reference to Root POA
- CORBA::Object_var obj
- = orb->resolve_initial_references ("RootPOA");
-
- PortableServer::POA_var rootPOA = PortableServer::POA::_narrow (obj.in ());
-
- // Activate POA manager
- PortableServer::POAManager_var mgr
- = rootPOA->the_POAManager ();
-
- mgr->activate();
-
- // Resolve Adder Reference
- obj = orb->string_to_object("corbaloc:iiop:127.0.0.1:4711/Adder");
- AMI_test::adder_var adder = AMI_test::adder::_narrow(obj.in ());
-
- AdderCallback cb_servant(orb.in ());
-
- while(true) {
- try
- {
- adder->sendc_add(cb_servant._this(), 3, 2);
- }
- catch(...)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Caught exception after sendc_add\n"));
- }
- ACE_OS::sleep (1);
- }
- }
- catch(...)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Caught exception in main\n"));
- return 1;
- }
-
- return 0;
-}
-
-
-
diff --git a/TAO/tests/Bug_1869_Regression/run_test.pl b/TAO/tests/Bug_1869_Regression/run_test.pl
deleted file mode 100644
index 2a6eb183455..00000000000
--- a/TAO/tests/Bug_1869_Regression/run_test.pl
+++ /dev/null
@@ -1,40 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBEndpoint iiop://127.0.0.1:4711");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://127.0.0.1:4711");
-}
-$CL = new PerlACE::Process ("client", "");
-
-$SV->Spawn ();
-
-$client = $CL->Spawn (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-sleep (5);
-
-print STDERR "Kill server\n";
-$server = $SV->Kill ();
-
-sleep (5);
-
-print STDERR "Restart server\n";
-$SV->Spawn ();
-
-sleep (30);
-
-exit $status;
diff --git a/TAO/tests/Bug_1869_Regression/server.cpp b/TAO/tests/Bug_1869_Regression/server.cpp
deleted file mode 100644
index 6b741d07984..00000000000
--- a/TAO/tests/Bug_1869_Regression/server.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id$
-
-#include "AMIS.h"
-#include "tao/IORTable/IORTable.h"
-
-class AdderServant :
- public POA_AMI_test::adder {
-
-public:
- AdderServant (void) {}
-
- virtual ~AdderServant (void) {}
-
- virtual
- CORBA::Long add (
- CORBA::Long a,
- CORBA::Long b
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- )) {
- return a + b;
- }
-};
-
-
-int main (int argc, char* argv[]) {
-
- try {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- // Get reference to Root POA
- CORBA::Object_var obj
- = orb->resolve_initial_references ("RootPOA");
-
- PortableServer::POA_var rootPOA = PortableServer::POA::_narrow (obj.in ());
-
- // Activate POA manager
- PortableServer::POAManager_var mgr
- = rootPOA->the_POAManager ();
-
- mgr->activate();
-
- // Create Persistent Lifespan Policy and User Id Policy
- PortableServer::LifespanPolicy_var lifespan =
- rootPOA->create_lifespan_policy(PortableServer::PERSISTENT);
- PortableServer::IdAssignmentPolicy_var idassignment =
- rootPOA->create_id_assignment_policy(PortableServer::USER_ID);
-
- // Stuff them into a policy list
- CORBA::PolicyList policies(2);
- policies.length(2);
- policies[0] = PortableServer::IdAssignmentPolicy::_duplicate(idassignment.in());
- policies[1] = PortableServer::LifespanPolicy::_duplicate(lifespan.in());
-
- // Create the Child POA
- PortableServer::POA_var persistentPOA =
- rootPOA->create_POA("persistentPOA", mgr.in(), policies);
-
- // Policies are no longer needed
- idassignment->destroy();
- lifespan->destroy();
-
- AdderServant servant;
-
- // Create an id
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId("Adder");
-
- // Activate the object (with id)
- persistentPOA->activate_object_with_id(oid.in(), & servant);
-
- CORBA::Object_var ref = persistentPOA->id_to_reference(oid.in());
- CORBA::String_var iors = orb->object_to_string(ref.in());
-
- CORBA::Object_var tobj = orb->resolve_initial_references("IORTable");
- IORTable::Table_var table = IORTable::Table::_narrow(tobj.in());
- table->bind("Adder", iors.in ());
-
- orb->run();
- } catch (...) {
- ACE_ERROR ((LM_ERROR, "ERROR: Caught exception in server"));
- return 1;
- }
- return 0;
-}
-
diff --git a/TAO/tests/Bug_2084_Regression/Bug_2084_Regression.mpc b/TAO/tests/Bug_2084_Regression/Bug_2084_Regression.mpc
deleted file mode 100644
index b4263adaa64..00000000000
--- a/TAO/tests/Bug_2084_Regression/Bug_2084_Regression.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- exename = server
-}
diff --git a/TAO/tests/Bug_2084_Regression/Client_Task.cpp b/TAO/tests/Bug_2084_Regression/Client_Task.cpp
deleted file mode 100644
index 1bf4dbf8ace..00000000000
--- a/TAO/tests/Bug_2084_Regression/Client_Task.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "TestC.h"
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/PortableServer/PortableServer.h"
-
-ACE_RCSID(Bug_2084_Regression,
- Client_Task,
- "$Id$")
-
-Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , input_ (ior)
- , corb_ (CORBA::ORB::_duplicate (corb))
-
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->corb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl = 0;
- ACE_NEW_RETURN (hello_impl,
- Hello (this->corb_.in (),
- ACE_Thread::self ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello_servant = hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_DEBUG((LM_DEBUG,"Client (%t) optimize_collocation_objects=%d use_global_collocation=%d\n",
- corb_->orb_core()->optimize_collocation_objects(),
- corb_->orb_core()->use_global_collocation ()));
-
- CORBA::Object_var tmp =
- this->corb_->string_to_object (input_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::EventNode_var evNode=
- Test::EventNode::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (evNode.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::EventNode reference <%s>\n",
- input_),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Client starting\n"));
-
- evNode->registerHello( hello_servant.in() ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
-
- evNode->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
diff --git a/TAO/tests/Bug_2084_Regression/Client_Task.h b/TAO/tests/Bug_2084_Regression/Client_Task.h
deleted file mode 100644
index 98ea06eca46..00000000000
--- a/TAO/tests/Bug_2084_Regression/Client_Task.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef COLLOCATED_TEST_CLIENT_TASK_H
-#define COLLOCATED_TEST_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/ORB.h"
-
-
-/// Implement a Task to run the client as a thread
-class Client_Task : public ACE_Task_Base
-{
-public:
-
- /// Constructor
- Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Bug_2084_Regression/Collocated_Test.cpp b/TAO/tests/Bug_2084_Regression/Collocated_Test.cpp
deleted file mode 100644
index a16745c918a..00000000000
--- a/TAO/tests/Bug_2084_Regression/Collocated_Test.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-//$Id$
-#include "Server_Task.h"
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/SString.h"
-#include "ace/Manual_Event.h"
-#include <ace/ARGV.h>
-#include <iostream>
-
-const char *output = "test.ior";
-const char *input = "file://test.ior";
-// static int named_orbs = 0;
-ACE_CString server_orb;
-ACE_CString client_orb;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:o:n");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- output = get_opts.opt_arg ();
- break;
- case 'k':
- input = get_opts.opt_arg ();
- break;
- case 'n':
- // named_orbs = 1;
- server_orb.set ("server_orb");
- client_orb.set ("client_orb");
- break;
- case '?':
- default:
- // This is a hack but that is okay!
- return 0;
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
-
- // Keep a copy of the ORB options args
- ACE_ARGV orb_args;
- for (int i = 1; i < argc; ++i)
- {
- if (orb_args.add (argv[i]) == -1)
- return -1;
- }
-
- ACE_Argv_Type_Converter satc (argc, argv);
-
- CORBA::ORB_var sorb =
- CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv (),
- server_orb.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Manual_Event me;
- Server_Task server_task (output,
- sorb.in (),
- me,
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE,
- 1,
- 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
-
- // Wait for the server thread to do some processing
- me.wait ();
-
- // This eats all orb-specific options!
- ACE_Argv_Type_Converter catc (argc, argv);
- CORBA::ORB_var corb =
- CORBA::ORB_init (catc.get_argc(),
- catc.get_TCHAR_argv(),
- client_orb.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (input,
- corb.in (),
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE,
- 1,
- 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
-
- // Wait for the client and server to finish
- ACE_Thread_Manager::instance ()->wait ();
-
- // Now that all threads have completed we can destroy the ORB
- sorb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (server_orb != client_orb)
- {
- corb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Bug_2084_Regression/EventNode.cpp b/TAO/tests/Bug_2084_Regression/EventNode.cpp
deleted file mode 100644
index 3ce3f1bf30e..00000000000
--- a/TAO/tests/Bug_2084_Regression/EventNode.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-// $Id$
-//
-#include "EventNode.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(EventNode, EventNode, "$Id$")
-
-EventNode::EventNode (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
-{
-}
-
-void EventNode::registerHello ( ::Test::Hello_ptr h ACE_ENV_ARG_DECL )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) EventNode: registerHello will call get_string...\n"));
-
- if (ACE_Thread::self () == this->thr_id_)
- {
- if (this->orb_->orb_core ()->optimize_collocation_objects () &&
- this->orb_->orb_core ()->use_global_collocation ())
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: A remote call has been made "
- " exiting ..\n"));
- ACE_OS::abort ();
- }
- else if (this->orb_->orb_core ()->optimize_collocation_objects () &&
- this->orb_->orb_core ()->use_global_collocation () == 0)
- {
- TAO::ORB_Table * const orb_table =
- TAO::ORB_Table::instance ();
-
- if (orb_table->find ("server_orb") == 0)
- {
- // We are running on a single ORB and this is an error.
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: A remote call has been made "
- " with a single ORB "
- " exiting ..\n"));
- ACE_OS::abort ();
- }
- }
- }
-
- CORBA::String_var str = h->get_string( (::CORBA::Long) ACE_Thread::self() );
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - EventNode: string returned <%s>\n", str.in ()));
-}
-
-void
-EventNode::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2084_Regression/EventNode.h b/TAO/tests/Bug_2084_Regression/EventNode.h
deleted file mode 100644
index e2209a632ac..00000000000
--- a/TAO/tests/Bug_2084_Regression/EventNode.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef EVENT_NODE_H
-#define EVENT_NODE_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#include "ace/OS.h"
-
-/// Implement the Test::EventNode interface
-class EventNode
- : public virtual POA_Test::EventNode
-{
-public:
- /// Constructor
- EventNode (CORBA::ORB_ptr orb,
- ACE_thread_t thr_id);
-
- // = The skeleton methods
- virtual void registerHello ( ::Test::Hello_ptr h ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (( CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-
- ACE_thread_t thr_id_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2084_Regression/Hello.cpp b/TAO/tests/Bug_2084_Regression/Hello.cpp
deleted file mode 100644
index e19ff455c09..00000000000
--- a/TAO/tests/Bug_2084_Regression/Hello.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
- Hello::Hello (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
-{
-}
-
-char *
-Hello::get_string (::CORBA::Long caller_threadid ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Upcall in process ..\n"));
-
- // Use portable thread IDs
- ACE_Thread_ID this_ID;
- this_ID.id(this->thr_id_);
-
- if ((::CORBA::Long)ACE_Thread::self () != caller_threadid) // this means a remote call was made
- {
- if (this->orb_->orb_core ()->optimize_collocation_objects () &&
- this->orb_->orb_core ()->use_global_collocation ())
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: A remote call has been made "
- " exiting ..\n"));
- ACE_OS::abort ();
- }
- else if (this->orb_->orb_core ()->optimize_collocation_objects () &&
- this->orb_->orb_core ()->use_global_collocation () == 0)
- {
- TAO::ORB_Table * const orb_table =
- TAO::ORB_Table::instance ();
-
- if (orb_table->find ("server_orb") == 0)
- {
- // We are running on a single ORB and this is an error.
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: A remote call has been made "
- " with a single ORB "
- " exiting ..\n"));
- ACE_OS::abort ();
- }
- }
- }
-
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Give the client thread time to return from the collocated
- // call to this method before shutting down the ORB. We sleep
- // to avoid BAD_INV_ORDER exceptions on fast dual processor machines.
- ACE_OS::sleep (1);
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2084_Regression/Hello.h b/TAO/tests/Bug_2084_Regression/Hello.h
deleted file mode 100644
index 30e9552d68c..00000000000
--- a/TAO/tests/Bug_2084_Regression/Hello.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#include "ace/OS.h"
-
-/// Implement the Test::Hello interface
-class Hello
- : public virtual POA_Test::Hello
-{
-public:
- /// Constructor
- Hello (CORBA::ORB_ptr orb,
- ACE_thread_t thr_id);
-
- // = The skeleton methods
- virtual char * get_string ( ::CORBA::Long caller_threadid ACE_ENV_ARG_DECL )
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-
- ACE_thread_t thr_id_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2084_Regression/Server_Task.cpp b/TAO/tests/Bug_2084_Regression/Server_Task.cpp
deleted file mode 100644
index b5e9fb0ffce..00000000000
--- a/TAO/tests/Bug_2084_Regression/Server_Task.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "TestS.h"
-#include "EventNode.h"
-
-#include "ace/Manual_Event.h"
-#include "tao/ORB_Core.h"
-
-ACE_RCSID(Collocated_Test,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , output_ (output)
- , me_ (me)
- , sorb_ (CORBA::ORB::_duplicate (sorb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- EventNode *evnode_impl = new EventNode(this->sorb_.in(),ACE_Thread::self());
- PortableServer::ServantBase_var owner_transfer(evnode_impl);
- Test::EventNode_var evNode = evnode_impl->_this(ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_DEBUG((LM_DEBUG,"Server (%t) optimize_collocation_objects=%d use_global_collocation=%d\n",
- sorb_->orb_core()->optimize_collocation_objects(),
- sorb_->orb_core()->use_global_collocation ()));
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (evNode.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <this->output_>
- FILE *output_file= ACE_OS::fopen (this->output_,
- "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- this->output_),
- 1);
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
- {
- // Periodically we get a bad inv order on fast machines.
- // It's a false negative and is safe to ignore.
- ACE_UNUSED_ARG (ex);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2084_Regression/Server_Task.h b/TAO/tests/Bug_2084_Regression/Server_Task.h
deleted file mode 100644
index 60006aae0ba..00000000000
--- a/TAO/tests/Bug_2084_Regression/Server_Task.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef COLLOCATED_SERVER_TASK_H
-#define COLLOCATED_SERVER_TASK_H
-
-#include /**/ "ace/pre.h"
-
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/ORB.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-/// Implement a Task to run the server in a single thread
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (const char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Output file for IOR
- const char *output_;
-
- /// Manual event to wake up the main thread to create a client
- /// thread.
- ACE_Manual_Event &me_;
-
- CORBA::ORB_var sorb_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/Bug_2084_Regression/Test.idl b/TAO/tests/Bug_2084_Regression/Test.idl
deleted file mode 100644
index 37a1ca19b7d..00000000000
--- a/TAO/tests/Bug_2084_Regression/Test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A very simple interface
- interface Hello
- {
- /// Return a simple string
- string get_string ( in long caller_threadid );
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-
- /// The server side
- interface EventNode
- {
- void registerHello( in Hello h );
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Bug_2084_Regression/run_test.pl b/TAO/tests/Bug_2084_Regression/run_test.pl
deleted file mode 100755
index df9a75e42d4..00000000000
--- a/TAO/tests/Bug_2084_Regression/run_test.pl
+++ /dev/null
@@ -1,82 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with per-orb \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with no collocation \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation no");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in default mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n ");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in per-orb mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in no collocation mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2122_Regression/test.cpp b/TAO/tests/Bug_2122_Regression/test.cpp
index 6002cf0c9e9..1bd647775d1 100644
--- a/TAO/tests/Bug_2122_Regression/test.cpp
+++ b/TAO/tests/Bug_2122_Regression/test.cpp
@@ -6,7 +6,7 @@
#include "TestC.h"
-int main( int argc, char* argv[] )
+int ACE_TMAIN( int argc, ACE_TCHAR* argv[] )
{
ACE_UNUSED_ARG( argc ) ;
ACE_UNUSED_ARG( argv ) ;
diff --git a/TAO/tests/Bug_2124_Regression/test.cpp b/TAO/tests/Bug_2124_Regression/test.cpp
index 6002cf0c9e9..1bd647775d1 100644
--- a/TAO/tests/Bug_2124_Regression/test.cpp
+++ b/TAO/tests/Bug_2124_Regression/test.cpp
@@ -6,7 +6,7 @@
#include "TestC.h"
-int main( int argc, char* argv[] )
+int ACE_TMAIN( int argc, ACE_TCHAR* argv[] )
{
ACE_UNUSED_ARG( argc ) ;
ACE_UNUSED_ARG( argv ) ;
diff --git a/TAO/tests/Bug_2126_Regression/test.cpp b/TAO/tests/Bug_2126_Regression/test.cpp
index 6002cf0c9e9..1bd647775d1 100644
--- a/TAO/tests/Bug_2126_Regression/test.cpp
+++ b/TAO/tests/Bug_2126_Regression/test.cpp
@@ -6,7 +6,7 @@
#include "TestC.h"
-int main( int argc, char* argv[] )
+int ACE_TMAIN( int argc, ACE_TCHAR* argv[] )
{
ACE_UNUSED_ARG( argc ) ;
ACE_UNUSED_ARG( argv ) ;
diff --git a/TAO/tests/Bug_2134_Regression/Bug_2134_Regression.mpc b/TAO/tests/Bug_2134_Regression/Bug_2134_Regression.mpc
deleted file mode 100644
index ed86746eeca..00000000000
--- a/TAO/tests/Bug_2134_Regression/Bug_2134_Regression.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Test) : taoserver, iortable {
- exename = server
- avoids += minimum_corba
- Source_Files {
- Hello.cpp
- }
-}
diff --git a/TAO/tests/Bug_2134_Regression/Hello.cpp b/TAO/tests/Bug_2134_Regression/Hello.cpp
deleted file mode 100644
index 53eb63216e5..00000000000
--- a/TAO/tests/Bug_2134_Regression/Hello.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// $Id$
-
-#include "tao/corba.h"
-#include "tao/IORTable/IORTable.h"
-#include "ace/OS_NS_string.h"
-#include "ace/SString.h"
-
-#include "HelloS.h"
-
-namespace Test
-{
-class Hello_impl: virtual public POA_Test::Hello
-{
-public:
- void say_hello() ACE_THROW_SPEC ((CORBA::SystemException)) { };
-
-};
-}
-
-int main(int argc, char* argv[])
-{
- CORBA::ORB_var orb = CORBA::ORB::_nil();
-
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB
- orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // create Hello object
- Test::Hello_impl hello_i;
- ACE_TRY_CHECK;
-
- Test::Hello_var hello = hello_i._this ();
- ACE_TRY_CHECK;
-
- // give our object a friendly name
- CORBA::Object_var iorTableObj =
- orb->resolve_initial_references ("IORTable");
- ACE_TRY_CHECK;
-
- IORTable::Table_var iorTable
- = IORTable::Table::_narrow (iorTableObj.in ());
- ACE_TRY_CHECK;
-
- CORBA::String_var ior_string = orb->object_to_string (hello.in ());
- ACE_TRY_CHECK;
-
- iorTable->bind("hello", ior_string.in ());
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Created binding of name 'hello' in IOR table for IOR:\n%s\n", ior_string.in ()));
-
- // Get the root POA
- CORBA::Object_var obj_root = orb->resolve_initial_references ("RootPOA");
- ACE_TRY_CHECK;
-
- PortableServer::POA_var rootPOA = PortableServer::POA::_narrow (obj_root.in ());
- ACE_TRY_CHECK;
-
- // Activate the POA manager
- PortableServer::POAManager_var poaManager = rootPOA->the_POAManager ();
- ACE_TRY_CHECK;
-
- poaManager->activate ();
- ACE_TRY_CHECK;
-
- // try and access the object with its friendly name
- ACE_CString full_corbaloc (ior_string.in (), 0, 1);
-
- CORBA::ULong first_slash = full_corbaloc.find ("/", 0);
-
- ACE_CString friendly_corbaloc =
- full_corbaloc.substring (0,
- first_slash);
-
- friendly_corbaloc += "/hello";
-
- ACE_DEBUG ((LM_DEBUG, "Trying to access object with object ref:\n%s\n", friendly_corbaloc.c_str ()));
-
- CORBA::Object_var obj = orb->string_to_object (friendly_corbaloc.c_str ());
- ACE_TRY_CHECK;
-
- Test::Hello_var hello2 = Test::Hello::_narrow (obj.in ());
- ACE_TRY_CHECK;
-
- hello2->say_hello ();
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Test succeeded !!!\n"));
-
- orb->destroy();
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Error - test failed - exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2134_Regression/Hello.idl b/TAO/tests/Bug_2134_Regression/Hello.idl
deleted file mode 100644
index 44f72bfbfbe..00000000000
--- a/TAO/tests/Bug_2134_Regression/Hello.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-module Test {
- interface Hello {
- void say_hello();
- };
-};
diff --git a/TAO/tests/Bug_2134_Regression/README b/TAO/tests/Bug_2134_Regression/README
deleted file mode 100644
index e8164d894ef..00000000000
--- a/TAO/tests/Bug_2134_Regression/README
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-
-This test checks that a collocated object ref bound into the local IOR table can be used.
-
-
diff --git a/TAO/tests/Bug_2134_Regression/run_test.pl b/TAO/tests/Bug_2134_Regression/run_test.pl
deleted file mode 100755
index a5aca85b1b0..00000000000
--- a/TAO/tests/Bug_2134_Regression/run_test.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$CL = new PerlACE::Process ("server", "-ORBObjRefStyle URL");
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2144_Regression/test.cpp b/TAO/tests/Bug_2144_Regression/test.cpp
index c7b795b0d04..b8c200f122b 100755
--- a/TAO/tests/Bug_2144_Regression/test.cpp
+++ b/TAO/tests/Bug_2144_Regression/test.cpp
@@ -2,7 +2,7 @@
#include "testC.h"
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
ACE_UNUSED_ARG (argc);
ACE_UNUSED_ARG (argv);
diff --git a/TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc b/TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc
index c01584c3559..1d3d307ea3e 100644
--- a/TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc
+++ b/TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Bug_2174_Regression/client.cpp b/TAO/tests/Bug_2174_Regression/client.cpp
index dc0b7923d30..9c46c96981b 100644
--- a/TAO/tests/Bug_2174_Regression/client.cpp
+++ b/TAO/tests/Bug_2174_Regression/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_2174_Regression, client, "$Id$")
@@ -12,7 +13,7 @@ int max_timeout = 20;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:l:h:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:l:h:");
int c;
while ((c = get_opts ()) != -1)
@@ -42,15 +43,17 @@ int result = 1;
// 4 : CORBA::OBJECT_NOT_EXIST exception
// 5 : CORBA::TRANSIENT exception
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Bug_2174_Regression/run_test.pl b/TAO/tests/Bug_2174_Regression/run_test.pl
index 02366a5ebb4..bdc879d8a18 100755
--- a/TAO/tests/Bug_2174_Regression/run_test.pl
+++ b/TAO/tests/Bug_2174_Regression/run_test.pl
@@ -13,22 +13,11 @@ unlink $iorfile;
# Test A: object exists (_non_existent() returns false)
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
+$SV = new PerlACE::Process ("server", "-o $iorfile");
$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+$SV->Spawn ();
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill ();
exit 1;
@@ -45,15 +34,10 @@ if ($client != 2) {
# Test B: object does not exist (_non_existent() returns true)
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -r");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -r");
-}
+$SV = new PerlACE::Process ("server", "-o $iorfile -r");
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill ();
exit 1;
diff --git a/TAO/tests/Bug_2174_Regression/server.cpp b/TAO/tests/Bug_2174_Regression/server.cpp
index bc39027c4ac..29733de3adb 100644
--- a/TAO/tests/Bug_2174_Regression/server.cpp
+++ b/TAO/tests/Bug_2174_Regression/server.cpp
@@ -3,6 +3,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Bug_2174_Regression, server, "$Id$")
@@ -12,7 +13,7 @@ bool remove_object = false;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:r");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:r");
int c;
while ((c = get_opts ()) != -1)
@@ -41,15 +42,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var poa_object =
@@ -95,7 +98,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc b/TAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc
index ff28e59983f..62cffce1ede 100755
--- a/TAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc
+++ b/TAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, strategies {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Bug_2183_Regression/client.cpp b/TAO/tests/Bug_2183_Regression/client.cpp
index 913d3153ae9..5f78dfb98eb 100755
--- a/TAO/tests/Bug_2183_Regression/client.cpp
+++ b/TAO/tests/Bug_2183_Regression/client.cpp
@@ -2,6 +2,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Hello, client, "client.cpp,v 1.5 2002/01/29 20:21:07 okellogg Exp")
@@ -10,7 +11,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,15 +35,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Bug_2183_Regression/run_test.pl b/TAO/tests/Bug_2183_Regression/run_test.pl
index 483b71e5ebc..a7f866baf63 100755
--- a/TAO/tests/Bug_2183_Regression/run_test.pl
+++ b/TAO/tests/Bug_2183_Regression/run_test.pl
@@ -12,12 +12,7 @@ use PerlACE::Run_Test;
$server_ior_file = PerlACE::LocalFile ("server.ior");
# The client and server processes
-if (PerlACE::is_vxworks_test()) {
- $SERVER = new PerlACE::ProcessVX(PerlACE::LocalFile("server"));
-}
-else {
- $SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-}
+$SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
$perl_executable = $^X;
$perl_executable =~ s/\.exe//g;
$DUMMY_CLIENT = new PerlACE::Process($perl_executable);
@@ -26,20 +21,10 @@ $CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
$DUMMY_CLIENT->Arguments("hang_client.pl");
$DUMMY_CLIENT->IgnoreExeSubDir(1);
-if (PerlACE::is_vxworks_test()) {
- $SERVER->Arguments("-o server.ior -ORBEndpoint iiop://:15000 -ORBSvcConf server.conf");
-}
-else {
- $SERVER->Arguments("-o $server_ior_file -ORBEndpoint iiop://:15000 -ORBSvcConf server.conf");
-}
+$SERVER->Arguments("-o $server_ior_file -ORBEndpoint iiop://:15000 -ORBSvcConf server.conf");
# Fire up the server
-$sv = $SERVER->Spawn();
-
-if ($sv != 0) {
- print STDERR "ERROR: server returned $sv\n";
- exit 1;
-}
+$SERVER->Spawn();
# We can wait on the IOR file
if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
diff --git a/TAO/tests/Bug_2183_Regression/server.cpp b/TAO/tests/Bug_2183_Regression/server.cpp
index 4853611a134..05f42b04d89 100755
--- a/TAO/tests/Bug_2183_Regression/server.cpp
+++ b/TAO/tests/Bug_2183_Regression/server.cpp
@@ -3,6 +3,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/Strategies/advanced_resource.h"
ACE_RCSID (Hello,
@@ -14,7 +15,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -38,12 +39,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -63,7 +66,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -81,7 +84,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Bug_2186_Regression/Bug_2186_Regression.mpc b/TAO/tests/Bug_2186_Regression/Bug_2186_Regression.mpc
deleted file mode 100644
index 0f6d8164108..00000000000
--- a/TAO/tests/Bug_2186_Regression/Bug_2186_Regression.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, strategies {
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, strategies {
- exename = client
- Source_Files {
- Hello.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2186_Regression/Hello.cpp b/TAO/tests/Bug_2186_Regression/Hello.cpp
deleted file mode 100644
index c45f7947354..00000000000
--- a/TAO/tests/Bug_2186_Regression/Hello.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Received call back !!!\n"));
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Hello::request_callback (Test::Hello_ptr call_me ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Making call back !!!\n"));
- ACE_TRY
- {
- CORBA::String_var result = call_me->get_string ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception attempting to callback client obj ref: \n");
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Call back succeeded !!!\n"));
-}
diff --git a/TAO/tests/Bug_2186_Regression/Hello.h b/TAO/tests/Bug_2186_Regression/Hello.h
deleted file mode 100644
index cf49f8dc3de..00000000000
--- a/TAO/tests/Bug_2186_Regression/Hello.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Hello interface
-class Hello
- : public virtual POA_Test::Hello
-{
-public:
- /// Constructor
- Hello (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void request_callback (Test::Hello_ptr call_me ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2186_Regression/README b/TAO/tests/Bug_2186_Regression/README
deleted file mode 100644
index 3cd6316fe16..00000000000
--- a/TAO/tests/Bug_2186_Regression/README
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-This test is the old fave TAO/tests/Hello with some minor(ish) differences.
-
-1/ A ::request_callback method has been added that takes a Hello ref and which prompts a callback to the ::get_string method on that ref.
-2/ The server (only) uses a server.conf file which specifies the wait on read client policy (RW).
-3/ The client now hosts a transient Hello servant too.
-4/ The client calls the servers ::request_callback method passing the reference to the client servant.
-5/ The server will call the client back.
-6/ The client will exit when its ::request_callback call returns.
-
-The script runs the server as:
-
-server -ORBSvcConf server.conf
-
-And then runs the client *TWICE* as:
-
-client -ORBEndpoint iiop://:23232
-
-The regression error output looks like:
-
-[sm@beatrice Bug_2186_Regression]$ ./run_test.pl
-(1310|3077687968) - Sending client obj ref to the server and requesting a callback.
-(1309|3077687968) - Making call back !!!
-(1310|3077687968) - Received call back !!!
-(1309|3077687968) - Call back succeeded !!!
-(1310|3077687968) - Test (client) Succeeded !!!
-(1315|3077687968) - Sending client obj ref to the server and requesting a callback.
-(1309|3077687968) - Making call back !!!
-(1309|3077687968) EXCEPTION, Exception attempting to callback client obj ref:
-
-system exception, ID 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'
-TAO exception, minor code = 6 (failed to recv request response; ENOENT), completed = MAYBE
-
-(1315|3077687968) - Test (client) Failed !!!
-(1315|3077687968) EXCEPTION, Exception caught:
-system exception, ID 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'
-TAO exception, minor code = 6 (failed to recv request response; ENOENT), completed = MAYBE
-
-ERROR: REGRESSION - Second client spawn returned 1
-INFO: server being killed.
-
-This demonstrates that dropped connections are written to blindly even after the peer has gone when the RW policy is in effect. If the 'server' is started without the -ORBSvcConf argument then the default client connection handler is used and the test runs suceesfully.
-
-This successful output looks like:
-
-[sm@beatrice Bug_2186_Regression]$ ./run_test.pl
-(1906|3077687968) - Sending client obj ref to the server and requesting a callback.
-(1901|3077687968) - Making call back !!!
-(1906|3077687968) - Received call back !!!
-(1901|3077687968) - Call back succeeded !!!
-(1906|3077687968) - Test (client) Succeeded !!!
-(1911|3077687968) - Sending client obj ref to the server and requesting a callback.
-(1901|3077687968) - Making call back !!!
-(1911|3077687968) - Received call back !!!
-(1901|3077687968) - Call back succeeded !!!
-(1911|3077687968) - Test (client) Succeeded !!!
-INFO: server being killed.
-
-
diff --git a/TAO/tests/Bug_2186_Regression/Test.idl b/TAO/tests/Bug_2186_Regression/Test.idl
deleted file mode 100644
index 0f5412c0210..00000000000
--- a/TAO/tests/Bug_2186_Regression/Test.idl
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A very simple interface
- interface Hello
- {
- /// Return a simple string
- string get_string ();
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
-
- void request_callback (in Hello call_me);
- };
-};
diff --git a/TAO/tests/Bug_2186_Regression/client.cpp b/TAO/tests/Bug_2186_Regression/client.cpp
deleted file mode 100644
index ca65ab90e14..00000000000
--- a/TAO/tests/Bug_2186_Regression/client.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *server_ior = "file://server.ior";
-const char *ior_output_file = "client.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- server_ior = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var server =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior.in ()),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Sending client obj ref to the server and requesting a callback.\n"));
-
- server->request_callback (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Test (client) Succeeded !!!\n"));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_ERROR, "(%P|%t) - Test (client) Failed !!!\n"));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2186_Regression/run_test.pl b/TAO/tests/Bug_2186_Regression/run_test.pl
deleted file mode 100755
index e1790866584..00000000000
--- a/TAO/tests/Bug_2186_Regression/run_test.pl
+++ /dev/null
@@ -1,63 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$port = PerlACE::uniqueid () + 10001;
-
-$serveriorfile = PerlACE::LocalFile ("server.ior");
-unlink $serveriorfile;
-$clientiorfile = PerlACE::LocalFile ("client.ior");
-unlink $clientiorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBSvcConf server.conf");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBSvcConf server.conf");
-}
-$CL = new PerlACE::Process ("client", "-ORBEndpoint iiop://:$port");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($serveriorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$serveriorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: First client spawn returned $client. Indicates a problem other than a regression.\n";
- $status = 1;
-}
-
-if ($client == 0) {
- $client = $CL->SpawnWaitKill (300);
-
- if ($client != 0) {
- print STDERR "ERROR: REGRESSION - Second client spawn returned $client\n";
- $status = 1;
- }
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $serveriorfile;
-unlink $clientiorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2186_Regression/server.conf b/TAO/tests/Bug_2186_Regression/server.conf
deleted file mode 100644
index cbb2962f41d..00000000000
--- a/TAO/tests/Bug_2186_Regression/server.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-static Client_Strategy_Factory "-ORBClientConnectionHandler RW -ORBConnectionHandlerCleanup 1"
-
diff --git a/TAO/tests/Bug_2186_Regression/server.cpp b/TAO/tests/Bug_2186_Regression/server.cpp
deleted file mode 100644
index 5c7e9180f09..00000000000
--- a/TAO/tests/Bug_2186_Regression/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2201_Regression/Bug_2201_Regression.mpc b/TAO/tests/Bug_2201_Regression/Bug_2201_Regression.mpc
deleted file mode 100644
index 9130c21b40a..00000000000
--- a/TAO/tests/Bug_2201_Regression/Bug_2201_Regression.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Test): taoclient {
- exename = test
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2201_Regression/TestData.idl b/TAO/tests/Bug_2201_Regression/TestData.idl
deleted file mode 100644
index 9c205e1df77..00000000000
--- a/TAO/tests/Bug_2201_Regression/TestData.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-
-module SeqTest {
- typedef sequence<long> LongSeq;
-
- struct Node {
- LongSeq ls;
- };
-
- typedef sequence<Node> NodeSeq;
-};
diff --git a/TAO/tests/Bug_2201_Regression/run_test.pl b/TAO/tests/Bug_2201_Regression/run_test.pl
deleted file mode 100755
index fc3d16c5bbf..00000000000
--- a/TAO/tests/Bug_2201_Regression/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("test", "");
-}
-else {
- $SV = new PerlACE::Process ("test", "");
-}
-
-$SV->Spawn ();
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2201_Regression/test.cpp b/TAO/tests/Bug_2201_Regression/test.cpp
deleted file mode 100644
index 1508d989950..00000000000
--- a/TAO/tests/Bug_2201_Regression/test.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-#include "ace/Log_Msg.h"
-#include "TestDataC.h"
-
-int
-main (int argc, char *argv[])
-{
- int retval = 0;
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- SeqTest::NodeSeq ns;
- ns.length (1);
- ns[0].ls.length (1);
- ns[0].ls[0] = 42;
-
- ns.length (0); // Shrink sequence
- ns.length (1); // Re-grow sequence; should re-initialize meber sequence
- // "as if" default constructed. I.e., the "ls" member
- // should have a length of zero.
-
- if (ns[0].ls.length() == 0) {
- ACE_DEBUG ((LM_DEBUG, "Test passed\n"));
- }
- else {
- ACE_ERROR ((LM_ERROR, "Test failed\n"));
- retval = 1;
- }
-
- return retval;
-}
diff --git a/TAO/tests/Bug_2222_Regression/test.cpp b/TAO/tests/Bug_2222_Regression/test.cpp
index 8e6a7bec7ff..95a11764105 100755
--- a/TAO/tests/Bug_2222_Regression/test.cpp
+++ b/TAO/tests/Bug_2222_Regression/test.cpp
@@ -6,7 +6,7 @@
* This test does not run - successful compile and link == successful test.
*/
int
-main (int, char *[])
+ACE_TMAIN (int, ACE_TCHAR *[])
{
Array_Typedef_slice* body3 = Array_Typedef_alloc();
Array_Typedef_slice* body31 = Array_Typedef_dup (body3);
diff --git a/TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc b/TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc
index 26c4972e1db..6ae49e52085 100644
--- a/TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc
+++ b/TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc
@@ -14,7 +14,6 @@ project (*client) : taoclient,anytypecode {
}
project (*server) : taoserver,pi_server {
- after += *client
IDL_Files {
Test.idl
}
diff --git a/TAO/tests/Bug_2234_Regression/client.cpp b/TAO/tests/Bug_2234_Regression/client.cpp
index 52180b29d5a..99812f42d3a 100644
--- a/TAO/tests/Bug_2234_Regression/client.cpp
+++ b/TAO/tests/Bug_2234_Regression/client.cpp
@@ -6,12 +6,15 @@
#include "TestC.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
int
-main(
+ACE_TMAIN(
int argc,
- char** argv)
+ ACE_TCHAR** argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
CORBA::Boolean testFailed= 0;
@@ -19,7 +22,7 @@ main(
ACE_TRY
{
CORBA::ORB_var
- orb= CORBA::ORB_init( argc, argv, 0 ACE_ENV_ARG_PARAMETER );
+ orb= CORBA::ORB_init( convert.get_argc(), convert.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER );
ACE_TRY_CHECK;
CORBA::Object_var
object= orb->string_to_object( "file://server.ior" ACE_ENV_ARG_PARAMETER );
@@ -105,13 +108,13 @@ main(
rVS= foo->TestVarStruct( aVS.in(), bVS.out(), cVS.inout() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG( (LM_INFO, "a is %s, b is %s, c is %s, r is %s: ", aVS->val.in(), bVS->val.in(), cVS->val.in(), rVS->val.in()) );
- if ((0 != *aVS->val) && (0 != ACE_OS::strcmp(aVS->val, "1"))) {
+ if ((0 != *aVS->val) && (0 != ACE_OS::strcmp(aVS->val.in(), "1"))) {
ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if ((0 != *bVS->val) && (0 != ACE_OS::strcmp(bVS->val, "2"))) {
+ else if ((0 != *bVS->val) && (0 != ACE_OS::strcmp(bVS->val.in(), "2"))) {
ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if ((0 != *cVS->val) && (0 != ACE_OS::strcmp(cVS->val, "4"))) {
+ else if ((0 != *cVS->val) && (0 != ACE_OS::strcmp(cVS->val.in(), "4"))) {
ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if ((0 != *rVS->val) && (0 != ACE_OS::strcmp(rVS->val, "7"))) {
+ else if ((0 != *rVS->val) && (0 != ACE_OS::strcmp(rVS->val.in(), "7"))) {
ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
else
ACE_DEBUG( (LM_INFO, "OK\n") );
@@ -264,22 +267,22 @@ main(
cB,
rB;
ACE_DEBUG( (LM_INFO, "a is ") );
- if ((aB= (aA>>= aL)))
+ if (aB= (aA>>= aL))
ACE_DEBUG( (LM_INFO, "%d", aL) );
else
ACE_DEBUG( (LM_INFO, "?") );
ACE_DEBUG( (LM_INFO, ", b is ") );
- if ((bB= (bA>>= bL)))
+ if (bB= (bA>>= bL))
ACE_DEBUG( (LM_INFO, "%d", bL) );
else
ACE_DEBUG( (LM_INFO, "?") );
ACE_DEBUG( (LM_INFO, ", c is ") );
- if ((cB= (cA>>= cL)))
+ if (cB= (cA>>= cL))
ACE_DEBUG( (LM_INFO, "%d", cL) );
else
ACE_DEBUG( (LM_INFO, "?") );
ACE_DEBUG( (LM_INFO, ", r is ") );
- if ((rB= (rA>>= rL)))
+ if (rB= (rA>>= rL))
ACE_DEBUG( (LM_INFO, "%d", rL) );
else
ACE_DEBUG( (LM_INFO, "?") );
diff --git a/TAO/tests/Bug_2234_Regression/run_test.pl b/TAO/tests/Bug_2234_Regression/run_test.pl
index dcdfcbce7e8..41e141ec41d 100755
--- a/TAO/tests/Bug_2234_Regression/run_test.pl
+++ b/TAO/tests/Bug_2234_Regression/run_test.pl
@@ -14,22 +14,13 @@ $server_ior_file= PerlACE::LocalFile( "server.ior" );
unlink $server_ior_file;
# The client and server processes
-if (PerlACE::is_vxworks_test()) {
- $SERVER= new PerlACE::ProcessVX( PerlACE::LocalFile( "server" ) );
-}
-else {
- $SERVER= new PerlACE::Process( PerlACE::LocalFile( "server" ) );
-}
+$SERVER= new PerlACE::Process( PerlACE::LocalFile( "server" ) );
$CLIENT= new PerlACE::Process( PerlACE::LocalFile( "client" ) );
# Fire up the server
-$sv = $SERVER->Spawn();
+$SERVER->Spawn();
-if ($sv != 0) {
- print STDERR "ERROR: server returned $sv\n";
- exit 1;
-}
# We can wait on the IOR file
if (PerlACE::waitforfile_timed( $server_ior_file, 10 ) == -1)
{
diff --git a/TAO/tests/Bug_2234_Regression/server.cpp b/TAO/tests/Bug_2234_Regression/server.cpp
index deb065f016f..24b0e949b42 100644
--- a/TAO/tests/Bug_2234_Regression/server.cpp
+++ b/TAO/tests/Bug_2234_Regression/server.cpp
@@ -18,6 +18,7 @@
#include "tao/PI_Server/PI_Server.h"
#include "tao/ORBInitializer_Registry.h"
#include "tao/PortableServer/Root_POA.h"
+#include "ace/Argv_Type_Converter.h"
CORBA::ORB_ptr orb;
@@ -676,8 +677,10 @@ private:
AnInterceptor *interceptor_;
};
-int main( int argc, char *argv[] )
+int ACE_TMAIN( int argc, ACE_TCHAR *argv[] )
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
ACE_DEBUG( (LM_INFO, "Server start\n") );
@@ -690,7 +693,7 @@ int main( int argc, char *argv[] )
initialiser= initialiser_p;
PortableInterceptor::register_orb_initializer( initialiser.in() );
- orb= CORBA::ORB_init( argc, argv, 0 ACE_ENV_ARG_PARAMETER );
+ orb= CORBA::ORB_init( convert.get_argc(), convert.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER );
ACE_TRY_CHECK;
CORBA::Object_var
Object = orb->resolve_initial_references( "RootPOA" ACE_ENV_ARG_PARAMETER );
diff --git a/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc b/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc
deleted file mode 100644
index bf8946a0384..00000000000
--- a/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable {
- exename = server
- idlflags += -Gp -Gd -Sa -St
- Source_Files {
- server.cpp
- MyInterfaceImpl.cpp
- }
-}
-
-project(*Client): taoserver, iortable {
- exename = client
- idlflags += -Gp -Gd -Sa -St
- after += *Server
- Source_Files {
- client.cpp
- MyInterfaceImpl.cpp
- }
-}
diff --git a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp b/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp
deleted file mode 100644
index da5c2832189..00000000000
--- a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $Id$
-//
-
-#include "MyInterfaceImpl.h"
-
-const char*
-MyInterfaceImpl::my_string = "a string";
-
-MyInterfaceImpl::MyInterfaceImpl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-CORBA::Boolean
-MyInterfaceImpl::myMethod (const char* mystring ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return mystring == my_string;
-}
-
diff --git a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h b/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h
deleted file mode 100644
index a7f76261396..00000000000
--- a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// $Id$
-//
-
-#include "TestS.h"
-
-class MyInterfaceImpl
- : public virtual POA_MyInterface
-{
- public:
- MyInterfaceImpl (CORBA::ORB_ptr orb);
-
- static const char* my_string;
-
- // = The skeleton methods
- virtual CORBA::Boolean myMethod (const char* stringParam ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
diff --git a/TAO/tests/Bug_2289_Regression/README b/TAO/tests/Bug_2289_Regression/README
deleted file mode 100644
index 0e4df56f029..00000000000
--- a/TAO/tests/Bug_2289_Regression/README
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id$
-
-This test checks that collocation optimisation takes effect after a location forward is received to an in process servant.
-
-It comprises:
-1/ A trivial IDL interface (Test.idl) with a single method that passes a string and returns a boolean, this interface is implemented with a servant (MyInterfaceImpl) that returns true if the address of the string passed matches the address of a static string defined as a public member of the servant.
-2/ A server which initialises a listener and binds a file:// type IOR for the client's servant into its IORTable against a name.
-4/ A client which initialises an in process MyInterfaceImpl servant.
-
-The client uses a corbaloc based on the server's endpoint and the name that its (the client's) reference is bound against in the server IORTable.
-
-Narrowing this results in a remote is_a which causes the server ORB to send a locate_forward to the client directing it to the 'in process' servant.
-
-If the fix is present the client ORB will pass the string by reference and the addresses will be equal in the servant - if the fix is not present it will attempt to marshal and demarshal the string, the addresses will differ, causing the test to fail.
-
-__Regression Output__
-
-[sm@beatrice Bug_2289_Regression]$ ./run_test.pl
-Test failed
-ERROR: Bug #TAO135 Regression failed. Non zero result from client.
-
-__Successful Output__
-
-[sm@beatrice Bug_2289_Regression]$ ./run_test.pl
-Test succeeded
-INFO: /home/sm/doc_cvs/ACE_wrappers/TAO/tests/Bug_2289_Regression/server being killed.
diff --git a/TAO/tests/Bug_2289_Regression/Test.idl b/TAO/tests/Bug_2289_Regression/Test.idl
deleted file mode 100644
index 0a599c8fbd3..00000000000
--- a/TAO/tests/Bug_2289_Regression/Test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-typedef string MyString;
-
-interface MyInterface
-{
- boolean myMethod (in MyString stringParam);
-};
diff --git a/TAO/tests/Bug_2289_Regression/client.cpp b/TAO/tests/Bug_2289_Regression/client.cpp
deleted file mode 100644
index cb82452c574..00000000000
--- a/TAO/tests/Bug_2289_Regression/client.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-//
-// $Id$
-//
-#include "TestS.h"
-#include "MyInterfaceImpl.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-const char *server_ior = "";
-
-const char *ior_output_file = "client.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- server_ior = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int result = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- MyInterfaceImpl *test_impl;
- ACE_NEW_RETURN (test_impl,
- MyInterfaceImpl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- MyInterface_var test_ref =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test_ref.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file != 0)
- {
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK
-
- CORBA::Object_var tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- MyInterface_var server =
- MyInterface::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil server reference <%s>\n",
- ior.in()),
- 1);
- }
-
-
- CORBA::Boolean temp = server->myMethod (MyInterfaceImpl::my_string ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (temp)
- {
- ACE_DEBUG ((LM_DEBUG, "Test succeeded\n"));
- }
- else
- {
- ACE_DEBUG ((LM_ERROR, "Test failed\n"));
- result = 1;
- }
-
- //hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- //ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return result;
-}
diff --git a/TAO/tests/Bug_2289_Regression/run_test.pl b/TAO/tests/Bug_2289_Regression/run_test.pl
deleted file mode 100755
index f25f0ae4f60..00000000000
--- a/TAO/tests/Bug_2289_Regression/run_test.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file = PerlACE::LocalFile ("server.ior");
-$client_ior_file = PerlACE::LocalFile ("client.ior");
-unlink $server_ior_file;
-unlink $client_ior_file;
-
-# The client and server processes
-if (PerlACE::is_vxworks_test()) {
- $SERVER = new PerlACE::ProcessVX(PerlACE::LocalFile("server"));
-}
-else {
- $SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-}
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-
-# We want the server to run on a fixed port
-$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-
-$SERVER->Arguments("-ORBEndpoint iiop://:$port -ORBDottedDecimalAddresses 1");
-
-# Fire up the server
-$sv = $SERVER->Spawn();
-
-if ($sv != 0) {
- print STDERR "ERROR: server returned $sv\n";
- exit 1;
-}
-
-# We can wait on the IOR file
-if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-$CLIENT->Arguments("-k corbaloc::127.0.0.1:$port/collocated_ior_bound_in_remote_iortable -ORBDottedDecimalAddresses 1 -ORBCollocationStrategy thru_poa");
-if ($CLIENT->SpawnWaitKill (60) != 0)
-{
- print STDERR "ERROR: Bug 2289 Regression failed. Non zero result from client.\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Clean up and return
-$SERVER->TerminateWaitKill (5);
-unlink $server_ior_file;
-unlink $client_ior_file;
-exit 0;
diff --git a/TAO/tests/Bug_2289_Regression/server.cpp b/TAO/tests/Bug_2289_Regression/server.cpp
deleted file mode 100644
index 47f749d99bd..00000000000
--- a/TAO/tests/Bug_2289_Regression/server.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-//
-// $Id$
-//
-
-#include "MyInterfaceImpl.h"
-#include "TestS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/IORTable/IORTable.h"
-
-ACE_RCSID (Hello,
- server,
- "server.cpp,v 1.6 2003/11/01 11:15:11 dhinton Exp")
-
-const char *ior_output_file = "server.ior";
-
-const char *client_ior = "file://client.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- client_ior = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- MyInterfaceImpl *test_impl;
- ACE_NEW_RETURN (test_impl,
- MyInterfaceImpl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- MyInterface_var test_ref =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test_ref.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file != 0)
- {
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var table_object =
- orb->resolve_initial_references ("IORTable"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IORTable::Table_var adapter =
- IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (adapter.in ()))
- {
- ACE_ERROR ((LM_ERROR, "Nil IORTable\n"));
- }
- else
- {
- adapter->bind ("collocated_ior_bound_in_remote_iortable", client_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2319_Regression/Bug_2319_Regression.mpc b/TAO/tests/Bug_2319_Regression/Bug_2319_Regression.mpc
deleted file mode 100644
index f362da7ae93..00000000000
--- a/TAO/tests/Bug_2319_Regression/Bug_2319_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*server) : taoserver, amh {
- source_files {
- server.cpp
- }
-}
diff --git a/TAO/tests/Bug_2319_Regression/Test.idl b/TAO/tests/Bug_2319_Regression/Test.idl
deleted file mode 100644
index ef304de303a..00000000000
--- a/TAO/tests/Bug_2319_Regression/Test.idl
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// $Id$
-//
-
-/// A simple module to avoid namespace pollution
-module Test
-{
-
- /// Use a timestamp to measure the roundtrip delay
- typedef unsigned long long Timestamp;
-
- /// Measure roundtrip Delay
- interface Roundtrip
- {
- oneway void test_method (in Timestamp send_time);
- };
-};
diff --git a/TAO/tests/Bug_2319_Regression/run_test.pl b/TAO/tests/Bug_2319_Regression/run_test.pl
deleted file mode 100755
index 1c118935b70..00000000000
--- a/TAO/tests/Bug_2319_Regression/run_test.pl
+++ /dev/null
@@ -1,24 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that tests AMH exceptions
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$AMH = new PerlACE::Process ("server", "");
-
-# Run the AMH server.
-$AMH->Spawn ();
-
-$amhserver= $AMH->WaitKill (60);
-if ($amhserver != 0) {
- print STDERR "ERROR: AMH Server returned $amhserver\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2319_Regression/server.cpp b/TAO/tests/Bug_2319_Regression/server.cpp
deleted file mode 100644
index fba7b7ed01c..00000000000
--- a/TAO/tests/Bug_2319_Regression/server.cpp
+++ /dev/null
@@ -1,367 +0,0 @@
-
-// $Id$
-
-#include "ace/Thread_Manager.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/Get_Opt.h"
-
-#include "TestS.h"
-#include "TestC.h"
-
-int num_calls = 10; // total calls client is going to make
-const int sleep_time = 1; // sleep for 1 sec on each call
-
-// This should equal num_calls within 'sleep * num_calls' seconds
-int calls_received = 0;
-
-const char *ior = "file://test.ior";
-const char *ior_file = "test.ior";
-
-
-
-/***************************/
-/*** Servant Declaration ***/
-/***************************/
-
-class ST_AMH_Servant
- : public virtual POA_Test::AMH_Roundtrip
- {
- public:
-
- ST_AMH_Servant (CORBA::ORB_ptr orb);
-
- void test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- protected:
- CORBA::ORB_ptr orb_;
- };
-
-
-
-/****************************/
-/**** Server Declaration ****/
-/****************************/
-
-/**
- Class that performs all 'dirty' initialisation work that is common to
- all the AMH servers and 'hides' all the common ORB functions.
- */
-class ST_AMH_Server
- {
- public:
- ST_AMH_Server (int *argc, char **argv);
- virtual ~ST_AMH_Server ();
-
- /// ORB inititalisation stuff
- int start_orb_and_poa (const CORBA::ORB_var &_orb);
-
- /// register the servant with the poa
- virtual void register_servant (ST_AMH_Servant *servant);
-
- /// orb-perform_work () abstraction
- virtual void run_event_loop ();
-
- public:
-
- protected:
- int *argc_;
- char **argv_;
- char *ior_output_file_;
- CORBA::ORB_ptr orb_;
- PortableServer::POA_var root_poa_;
-
- private:
- /// Write servant IOR to file specified with the '-o' option
- int write_ior_to_file (CORBA::String_var ior);
- };
-
-
-
-// ------------------------------------------------------------------------
-// ------------------------------------------------------------------------
-// ------------------------------------------------------------------------
-
-
-
-// ------------------------------------------------------------------------
-//
-int parse_args (int argc, char *argv[])
-{
-ACE_Get_Opt get_opts (argc, argv, "n:");
-int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- num_calls = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- default:
- break;
- }
- return 0;
-}
-
-
-
-
-/***************************/
-/*** Servant Definition ***/
-/***************************/
-
-// ------------------------------------------------------------------------
-//
-ST_AMH_Servant::ST_AMH_Servant (CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-// ------------------------------------------------------------------------
-//
-void
-ST_AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- printf("Recieved Timestamp # %d \n", calls_received);
- ACE_OS::sleep(1);
- calls_received++;
-
- ACE_UNUSED_ARG (send_time);
- ACE_UNUSED_ARG (_tao_rh);
-
- // When _tao_rh destructor is called, it shouldn't send anything to
- // the client as well
-}
-
-
-
-
-
-/*** Server Declaration ***/
-
-// ------------------------------------------------------------------------
-//
-ST_AMH_Server::ST_AMH_Server (int* argc, char **argv)
- : argc_ (argc), argv_ (argv)
-{
- this->ior_output_file_ = const_cast<char*>(ior_file);
-}
-
-// ------------------------------------------------------------------------
-//
-ST_AMH_Server::~ST_AMH_Server ()
-{
- ACE_TRY_NEW_ENV
- {
- this->root_poa_->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-
-}
-
-// ------------------------------------------------------------------------
-//
-int ST_AMH_Server::start_orb_and_poa (const CORBA::ORB_var &_orb)
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_ = CORBA::ORB::_duplicate(_orb.ptr());
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- this->root_poa_ = PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ------------------------------------------------------------------------
-//
-void ST_AMH_Server::register_servant (ST_AMH_Servant *servant)
-{
- ACE_TRY_NEW_ENV
- {
- Test::Roundtrip_var roundtrip = servant->_this(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var iorstr = this->orb_->object_to_string(roundtrip.ptr());
- ACE_TRY_CHECK;
-
- (void) this->write_ior_to_file(iorstr);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-}
-
-// ------------------------------------------------------------------------
-//
-void ST_AMH_Server::run_event_loop ()
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- ACE_Time_Value period (1, 0);
- while (1)
- {
- this->orb_->perform_work (&period);
- ACE_TRY_CHECK;
-
- // when all calls from client have been recieved, exit
- if (calls_received == num_calls )
- return;
- }
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {}
- ACE_ENDTRY;
-}
-
-// ------------------------------------------------------------------------
-//
-int
-ST_AMH_Server::write_ior_to_file (CORBA::String_var iorstr)
-{
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ST_AMH_Server::ior_output_file_, "w");
- if (output_file == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ST_AMH_Server::ior_output_file_));
- return -1;
- }
-
- ACE_OS::fprintf (output_file, "%s", iorstr.ptr());
- ACE_OS::fclose (output_file);
- return 0;
-}
-
-
-// ------------------------------------------------------------------------
-//
-static ACE_THR_FUNC_RETURN start_server(void* _arg)
-{
-ST_AMH_Server *amh_server = static_cast<ST_AMH_Server*>(_arg);
- amh_server->run_event_loop();
- return 0;
-}
-
-// ------------------------------------------------------------------------
-//
-static ACE_THR_FUNC_RETURN start_client(void* _arg)
-{
-Test::Roundtrip_var roundtrip(static_cast<Test::Roundtrip_ptr>(_arg));
-
- // Do a couple of calls on the server. If the sever is trying to
- // do something stupid like sending an exception to us, then it
- // won't be able to handle more than 1 request from us.
-Test::Timestamp time = 10;
-
- for (int i = 0; i < num_calls; i++)
- {
- roundtrip->test_method(time);
- ACE_DEBUG ((LM_DEBUG, "Sent call # %d \n", i));
- ACE_TRY_CHECK;
- }
-
- return 0;
-}
-
-
-// ------------------------------------------------------------------------
-//
-int main (int argc, char *argv[])
-{
- if (parse_args (argc, argv) != 0)
- return 1;
-
-ST_AMH_Server amh_server (&argc, argv);
-CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "");
-
- ACE_TRY_CHECK;
-
- amh_server.start_orb_and_poa(orb);
-
-ST_AMH_Servant servant(orb.in());
-
- amh_server.register_servant(&servant);
-
-
-
-CORBA::Object_var object = orb->string_to_object(ior);
- ACE_TRY_CHECK;
-Test::Roundtrip_var roundtrip = Test::Roundtrip::_narrow(object.ptr());
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil(roundtrip.in()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
-
-ACE_thread_t serverThr;
-ACE_thread_t clientThr;
-
- ACE_Thread_Manager::instance()->spawn(start_server,
- (void*)&amh_server,
- THR_NEW_LWP | THR_JOINABLE,
- &serverThr
- );
-
- ACE_Thread_Manager::instance()->spawn(start_client,
- (void*)roundtrip.ptr(),
- THR_NEW_LWP | THR_JOINABLE,
- &clientThr
- );
-
- ACE_Thread_Manager::instance()->join(clientThr);
- printf("End client\n");
- ACE_Thread_Manager::instance()->join(serverThr);
- printf("End server\n");
-
- orb->destroy();
- ACE_TRY_CHECK;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2328_Regression/Bug_2328_Regression.mpc b/TAO/tests/Bug_2328_Regression/Bug_2328_Regression.mpc
deleted file mode 100644
index 5fce9b69306..00000000000
--- a/TAO/tests/Bug_2328_Regression/Bug_2328_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, codeset {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2328_Regression/Hello.cpp b/TAO/tests/Bug_2328_Regression/Hello.cpp
deleted file mode 100644
index ac4c1c6fe85..00000000000
--- a/TAO/tests/Bug_2328_Regression/Hello.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (const char * A, const char * B, const char * C)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Received: <%s>, <%s>, <%s>\n", A, B, C));
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2328_Regression/Hello.h b/TAO/tests/Bug_2328_Regression/Hello.h
deleted file mode 100644
index 4ef97cd1b6c..00000000000
--- a/TAO/tests/Bug_2328_Regression/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Hello interface
-class Hello
- : public virtual POA_Test::Hello
-{
-public:
- /// Constructor
- Hello (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual char * get_string (const char * A, const char * B, const char * C ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2328_Regression/README b/TAO/tests/Bug_2328_Regression/README
deleted file mode 100644
index 53f14a09bed..00000000000
--- a/TAO/tests/Bug_2328_Regression/README
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
-
-@page Bug_2328_Regression README File
-
-This test sends 3 strings to the server. The server is using the codeset
-library, the client is configured that it doesn't use it. This gives a marshal
-exception in TAO 1.4.7 because it uses UTF8 Latin1 to demarshal the strings
-which then causes things to go wrong in the stream.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Bug_2328_Regression/Test.idl b/TAO/tests/Bug_2328_Regression/Test.idl
deleted file mode 100644
index 528f0c5485c..00000000000
--- a/TAO/tests/Bug_2328_Regression/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A very simple interface
- interface Hello
- {
- /// Return a simple string
- string get_string (in string A, in string B, in string C);
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Bug_2328_Regression/client.cpp b/TAO/tests/Bug_2328_Regression/client.cpp
deleted file mode 100644
index d39919e7d85..00000000000
--- a/TAO/tests/Bug_2328_Regression/client.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var A = CORBA::string_dup ("DKWC");
- CORBA::String_var B = CORBA::string_dup ("kwc");
- CORBA::String_var C = CORBA::string_dup ("MV-files");
- CORBA::String_var the_string =
- hello->get_string (A.in (), B.in (), C.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2328_Regression/run_test.pl b/TAO/tests/Bug_2328_Regression/run_test.pl
deleted file mode 100755
index f5831bdb8e9..00000000000
--- a/TAO/tests/Bug_2328_Regression/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBNegotiateCodesets 0");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2328_Regression/server.cpp b/TAO/tests/Bug_2328_Regression/server.cpp
deleted file mode 100644
index 69fe7692d76..00000000000
--- a/TAO/tests/Bug_2328_Regression/server.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/Codeset/Codeset.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2345_Regression/Bug_2345_Regression.mpc b/TAO/tests/Bug_2345_Regression/Bug_2345_Regression.mpc
deleted file mode 100644
index 7223fb9069c..00000000000
--- a/TAO/tests/Bug_2345_Regression/Bug_2345_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server) : taoserver, imr_client, exceptions {
- Source_Files {
- server.cpp
- }
-}
diff --git a/TAO/tests/Bug_2345_Regression/run_test.pl b/TAO/tests/Bug_2345_Regression/run_test.pl
deleted file mode 100755
index fa8e977afd2..00000000000
--- a/TAO/tests/Bug_2345_Regression/run_test.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-ORBUseIMR 1 -ORBDefaultInitRef corbaloc:iiop:localhost:12345");
-
-$server = $SV->SpawnWaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2345_Regression/server.cpp b/TAO/tests/Bug_2345_Regression/server.cpp
deleted file mode 100644
index f134a745d3b..00000000000
--- a/TAO/tests/Bug_2345_Regression/server.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id$
-
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/ImR_Client/ImR_Client.h"
-
-int main(int argc, char* argv[])
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB::_nil();
-
- // Initialize the ORB.
- //
- orb = CORBA::ORB_init(argc, argv);
- CORBA::Object_var poa_obj = orb->resolve_initial_references("RootPOA");
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow(poa_obj.in ());
-
- // Create a PERSISTENT POA
- //
- // Create the policy list
- CORBA::PolicyList policies(2);
- policies.length(2);
- policies[0] = root_poa->create_lifespan_policy(PortableServer::PERSISTENT);
- policies[1] = root_poa->create_id_assignment_policy(PortableServer::USER_ID);
-
- // create the poa.
- // for ORBUseIMR=1 -ORBDefaultInitRef corbaloc:iiop:<HOST>:<PORT>
- // this will cause an access violation if no IMR server is found.
- // The access violation WILL NOT HAPPEN if a POAManager is created and
- // given as a parameter to create_POA (instead of a nil POAManager)
- PortableServer::POA_var persistent_poa =
- root_poa->create_POA("myPoa", PortableServer::POAManager::_nil(), policies);
-
- return 0;
- }
- catch (CORBA::Exception&)
- {
- // ... normally print an error here
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_2349_Regression/Bug_2349_Regression.mpc b/TAO/tests/Bug_2349_Regression/Bug_2349_Regression.mpc
deleted file mode 100644
index 3d5cf5b5deb..00000000000
--- a/TAO/tests/Bug_2349_Regression/Bug_2349_Regression.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*server): taoserver, exceptions {
- idlflags += -Sa -St
- Source_Files {
- server.cpp
- }
-}
-
-project(*client): taoclient, exceptions {
- after += *Server
- Source_Files {
- fooC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2349_Regression/client.cpp b/TAO/tests/Bug_2349_Regression/client.cpp
deleted file mode 100644
index c2c7cbc30f5..00000000000
--- a/TAO/tests/Bug_2349_Regression/client.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id$
-
-#include "fooC.h"
-#include "ace/Log_Msg.h"
-
-const char* ior = "file://server.ior";
-
-int
-main (int argc, char** argv)
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var tmp = orb->string_to_object(ior);
-
- foo_var server = foo::_narrow(tmp.in ());
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil foo reference <%s>\n",
- ior),
- 1);
- }
-
- server->shutdown ();
-
- orb->destroy ();
- }
- catch (const CORBA::Exception& ex)
- {
- ex._tao_print_exception ("CORBA::Exception");
- }
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2349_Regression/foo.idl b/TAO/tests/Bug_2349_Regression/foo.idl
deleted file mode 100644
index e954afbb6ea..00000000000
--- a/TAO/tests/Bug_2349_Regression/foo.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface foo
-{
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2349_Regression/run_test.pl b/TAO/tests/Bug_2349_Regression/run_test.pl
deleted file mode 100755
index 356e2015525..00000000000
--- a/TAO/tests/Bug_2349_Regression/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-$CL = new PerlACE::Process ("client");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (10);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2349_Regression/server.cpp b/TAO/tests/Bug_2349_Regression/server.cpp
deleted file mode 100644
index 670a5a73f2d..00000000000
--- a/TAO/tests/Bug_2349_Regression/server.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// $Id$
-
-#include "fooS.h"
-#include "ace/OS_NS_stdio.h"
-
-const char* ior_output_file = "server.ior";
-
-class foo_i: public POA_foo
-{
-public:
- foo_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)) {
- }
-
- void shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-void
-foo_i::shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // This causes an OBJECT_NOT_EXIST exception, but it should
- // be a BAD_INV_ORDER exception.
- this->orb_->destroy ();
-
- // This works as it should.
- //this->orb_->shutdown ();
-}
-
-
-int
-main (int argc, char** argv)
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ());
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager ();
-
- foo_i* server_impl = 0;
- ACE_NEW_RETURN (server_impl,
- foo_i (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(server_impl);
-
- foo_var server = server_impl->_this ();
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ());
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate ();
-
- orb->run ();
-
- root_poa->destroy (1, 1);
- orb->destroy ();
- }
- catch (const CORBA::Exception& ex)
- {
- ex._tao_print_exception ("CORBA::Exception");
- }
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2375_Regression/Bug_2375_Regression.mpc b/TAO/tests/Bug_2375_Regression/Bug_2375_Regression.mpc
deleted file mode 100755
index d428b0fce50..00000000000
--- a/TAO/tests/Bug_2375_Regression/Bug_2375_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project (*Test) : taoserver, valuetype {
- exename = test
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2375_Regression/README b/TAO/tests/Bug_2375_Regression/README
deleted file mode 100755
index 97b642530a1..00000000000
--- a/TAO/tests/Bug_2375_Regression/README
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-A build only test to check that the c++ source produced from an IDL file with a valuetype factory in it compiles OK.
-
-If it builds it's passed.
diff --git a/TAO/tests/Bug_2375_Regression/test.cpp b/TAO/tests/Bug_2375_Regression/test.cpp
deleted file mode 100755
index 2a2d57db0e7..00000000000
--- a/TAO/tests/Bug_2375_Regression/test.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-#include "testC.h"
-class MyTestValuetypeFactory : public TestValuetype_init {
-public:
- virtual TestValuetype* create (::CORBA::Boolean, ::CORBA::Short) {return 0;};
- virtual TAO_OBV_CREATE_RETURN_TYPE (TestValuetype) create_for_unmarshal (void) {return 0;};
-};
-int main (int , char *[]) {
- MyTestValuetypeFactory myFactory;
- return 0;
-}
diff --git a/TAO/tests/Bug_2375_Regression/test.idl b/TAO/tests/Bug_2375_Regression/test.idl
deleted file mode 100755
index a6ee7413825..00000000000
--- a/TAO/tests/Bug_2375_Regression/test.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-valuetype TestValuetype {
- factory create(in boolean b, in short s);
-};
-
diff --git a/TAO/tests/Bug_2399_Regression/Bug_2399_Regression.mpc b/TAO/tests/Bug_2399_Regression/Bug_2399_Regression.mpc
deleted file mode 100644
index 6397809c1be..00000000000
--- a/TAO/tests/Bug_2399_Regression/Bug_2399_Regression.mpc
+++ /dev/null
@@ -1,11 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project (*Test) : taoserver {
- exename = test
- idlflags += -t ./mytmp
-
- Source_Files {
- test.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2399_Regression/README b/TAO/tests/Bug_2399_Regression/README
deleted file mode 100644
index a4c048250b6..00000000000
--- a/TAO/tests/Bug_2399_Regression/README
+++ /dev/null
@@ -1,8 +0,0 @@
-# $Id$
-
-This is a build only test. A failure in the IDL compilation will probably indicate a regression.
-
-The IDL is compiled with a temporary file location specified using the -t parameter. The location is ./mytmp/.
-
-The file included.idl in ./mytmp/. is uncompilable - the test is intended to prove that it is not getting included instead of the correct included.idl (the one in *this* directory).
-
diff --git a/TAO/tests/Bug_2399_Regression/included.idl b/TAO/tests/Bug_2399_Regression/included.idl
deleted file mode 100644
index ed8e9a102a1..00000000000
--- a/TAO/tests/Bug_2399_Regression/included.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-interface Parent
-{
-};
diff --git a/TAO/tests/Bug_2399_Regression/mytmp/included.idl b/TAO/tests/Bug_2399_Regression/mytmp/included.idl
deleted file mode 100644
index df4a6fa7b06..00000000000
--- a/TAO/tests/Bug_2399_Regression/mytmp/included.idl
+++ /dev/null
@@ -1,3 +0,0 @@
-// $Id$
-
-This file should not be compiled at all.
diff --git a/TAO/tests/Bug_2399_Regression/test.cpp b/TAO/tests/Bug_2399_Regression/test.cpp
deleted file mode 100644
index 1b3f75330f2..00000000000
--- a/TAO/tests/Bug_2399_Regression/test.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-#include "testC.h"
-
-int
-main (int , char *[])
-{
- return 0;
-}
-
diff --git a/TAO/tests/Bug_2399_Regression/test.idl b/TAO/tests/Bug_2399_Regression/test.idl
deleted file mode 100644
index b0e1cbac672..00000000000
--- a/TAO/tests/Bug_2399_Regression/test.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-#include "included.idl"
-
-interface Child : Parent
-{
-};
diff --git a/TAO/tests/Bug_2417_Regression/Bug_2417_Regression.mpc b/TAO/tests/Bug_2417_Regression/Bug_2417_Regression.mpc
deleted file mode 100644
index 27d1cc5fd95..00000000000
--- a/TAO/tests/Bug_2417_Regression/Bug_2417_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging, threads {
- Source_Files {
- publisher_impl.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, threads {
- exename = client
- after += *Server
- Source_Files {
- subscriber_impl.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2417_Regression/client.cpp b/TAO/tests/Bug_2417_Regression/client.cpp
deleted file mode 100644
index df96fb1565d..00000000000
--- a/TAO/tests/Bug_2417_Regression/client.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// $Id$
-
-#include "subscriber_impl.h"
-#include "publisherC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-class ThreadPool : public ACE_Task_Base
-{
-public:
- ThreadPool (CORBA::ORB_ptr orb);
- virtual int svc (void);
-private:
- CORBA::ORB_var orb_;
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
- CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA");
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), 1);
-
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager();
-
- Subscriber_impl subscriber(orb.in ());
- Subscriber_var subscriber_var = subscriber._this();
-
- CORBA::Object_var object = orb->string_to_object("file://ior.out");
- Publisher_var publisher = Publisher::_narrow(object.in());
-
- publisher->subscribe(subscriber_var.in());
-
- poa_manager->activate();
-
- ThreadPool pool (orb.in ());
- if (pool.activate(THR_NEW_LWP | THR_JOINABLE, 5) != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot activate client threads\n"), 1);
-
- pool.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-ThreadPool::ThreadPool(CORBA::ORB_ptr orb)
-: orb_(CORBA::ORB::_duplicate (orb))
-{
-}
-
-int ThreadPool::svc (void)
-{
- try
- {
- this->orb_->run ();
- }
- catch (...)
- {
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_2417_Regression/publisher.idl b/TAO/tests/Bug_2417_Regression/publisher.idl
deleted file mode 100644
index 51fb10a1e23..00000000000
--- a/TAO/tests/Bug_2417_Regression/publisher.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-#include "subscriber.idl"
-
-interface Publisher
-{
- void subscribe(in Subscriber _subscriber);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2417_Regression/publisher_impl.cpp b/TAO/tests/Bug_2417_Regression/publisher_impl.cpp
deleted file mode 100644
index e62ad292470..00000000000
--- a/TAO/tests/Bug_2417_Regression/publisher_impl.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-// $Id$
-
-#include "publisher_impl.h"
-#include "ace/OS_NS_sys_time.h"
-#include "ace/Task.h"
-#include "ace/Process_Mutex.h"
-#include "ace/OS_NS_unistd.h"
-#include <vector>
-
-using namespace std;
-
-struct _Subscriber
-{
- Subscriber_var subscriber;
- bool unsubscribed;
- unsigned int count;
-};
-
-class Publisher_impl::Worker : public ACE_Task_Base
-{
-public:
- Worker(Publisher_impl * _owner);
- ~Worker();
- void addSubscriber(Subscriber_ptr subscriber);
- virtual int svc (void);
- void terminate();
-private:
- bool terminated;
- vector<_Subscriber> subscribers;
- ACE_Thread_Mutex mutex;
- Publisher_impl * owner;
-};
-
-Publisher_impl::Worker::Worker(Publisher_impl * _owner)
-: owner(_owner)
-{
- terminated = false;
-}
-
-Publisher_impl::Worker::~Worker()
-{
- terminated = true;
-}
-
-void Publisher_impl::Worker::addSubscriber(Subscriber_ptr subscriber)
-{
- ACE_Guard<ACE_Thread_Mutex> guard(mutex, 1, 1);
- subscribers.push_back(_Subscriber());
- _Subscriber& s = subscribers.back();
- s.unsubscribed = false;
- s.subscriber = Subscriber::_duplicate(subscriber);
- s.count = 0;
-}
-
-int Publisher_impl::Worker::svc (void)
-{
- double data = 0.0;
- bool doShutdown = false;
- unsigned long iteration = 0;
- ACE_Time_Value tv;
- tv.set(0.01);
- while (!terminated)
- {
- data += 0.01;
- ++iteration;
- {
- ACE_Guard<ACE_Thread_Mutex> guard(mutex, 1, 1);
- doShutdown = subscribers.size() > 0;
- for (vector<_Subscriber>::iterator iter = subscribers.begin(); iter != subscribers.end(); ++iter)
- {
- if (!iter->unsubscribed)
- {
- doShutdown = false;
- try
- {
- if (!CORBA::is_nil(iter->subscriber.in ()))
- iter->subscriber->onData(data);
- else
- iter->unsubscribed = true;
- ++iter->count;
- }
- catch (...)
- {
- iter->unsubscribed = true;
- }
- }
- }
- }
- if (iteration % 1000 == 0)
- {
- ACE_Guard<ACE_Thread_Mutex> guard(mutex, 1, 1);
- for (vector<_Subscriber>::iterator iter = subscribers.begin(); iter != subscribers.end(); ++iter)
- {
- if (!iter->unsubscribed)
- {
- try
- {
- iter->subscriber->isAlive();
- }
- catch (...)
- {
- iter->unsubscribed = true;
- }
- }
- }
- }
- if (doShutdown)
- owner->shutdown();
- else
- ACE_OS::sleep(tv);
- }
- return 0;
-}
-
-void Publisher_impl::Worker::terminate()
-{
- terminated = true;
-}
-
-Publisher_impl::Publisher_impl(CORBA::ORB_ptr orb)
-: orb_ (CORBA::ORB::_duplicate (orb))
-{
- worker = new Worker(this);
- worker->activate();
-}
-
-Publisher_impl::~Publisher_impl()
-{
- worker->terminate();
- worker->thr_mgr()->wait();
- delete worker;
-}
-
-void subscribe (
- ::Subscriber_ptr subscriber
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
-void
-Publisher_impl::subscribe(
- ::Subscriber_ptr subscriber
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- worker->addSubscriber(subscriber);
-}
-
-void
-Publisher_impl::shutdown (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- this->orb_->shutdown (0);
- worker->terminate();
-}
-
diff --git a/TAO/tests/Bug_2417_Regression/publisher_impl.h b/TAO/tests/Bug_2417_Regression/publisher_impl.h
deleted file mode 100644
index 43a62ae54ac..00000000000
--- a/TAO/tests/Bug_2417_Regression/publisher_impl.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id$
-
-#ifndef EXPLOIT_PUBLISHER_IMPL_H
-#define EXPLOIT_PUBLISHER_IMPL_H
-
-#include "publisherS.h"
-#include "subscriberC.h"
-
-class Publisher_impl : public POA_Publisher
-{
- public:
- Publisher_impl(CORBA::ORB_ptr orb);
- ~Publisher_impl();
-
- virtual void subscribe (
- ::Subscriber_ptr subscriber
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void shutdown (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- private:
- CORBA::ORB_var orb_;
- class Worker;
- friend class Worker;
- Worker * worker;
-};
-
-#endif
diff --git a/TAO/tests/Bug_2417_Regression/run_test.pl b/TAO/tests/Bug_2417_Regression/run_test.pl
deleted file mode 100755
index 21cd1ff1714..00000000000
--- a/TAO/tests/Bug_2417_Regression/run_test.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("ior.out");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $SV = new PerlACE::Process ("server", "");
-}
-
-$CL1 = new PerlACE::Process ("client", "");
-
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn ();
-
-$client = $CL1->WaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-$server = $SV->WaitKill (35);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status
diff --git a/TAO/tests/Bug_2417_Regression/server.cpp b/TAO/tests/Bug_2417_Regression/server.cpp
deleted file mode 100644
index 8a8ba4c1a2c..00000000000
--- a/TAO/tests/Bug_2417_Regression/server.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-#include "publisher_impl.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-class ThreadPool : public ACE_Task_Base
-{
-public:
- ThreadPool (CORBA::ORB_ptr orb);
- virtual int svc (void);
-private:
- CORBA::ORB_var orb_;
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
- CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA");
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), 1);
-
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager();
-
- Publisher_impl publisher(orb.in ());
- Publisher_var publisher_var = publisher._this();
-
- CORBA::String_var ior = orb->object_to_string(publisher_var.in());
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in()));
-
- // output the ior
- FILE *output_file= ACE_OS::fopen ("ior.out", "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: ior.out"), 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate();
-
- const CORBA::Object_var pmobj ( orb->resolve_initial_references( "ORBPolicyManager" ) );
- CORBA::PolicyManager_var policy_manager = CORBA::PolicyManager::_narrow( pmobj.in() );
-
- CORBA::Any orb_level;
- orb_level <<= Messaging::SYNC_NONE;
- CORBA::PolicyList policy_list;
- policy_list.length(1);
- policy_list[0] = orb->create_policy(Messaging::SYNC_SCOPE_POLICY_TYPE, orb_level);
- policy_manager->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE);
-
- ThreadPool pool (orb.in ());
- if (pool.activate(THR_NEW_LWP | THR_JOINABLE, 5) != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot activate client threads\n"), 1);
-
- pool.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-ThreadPool::ThreadPool(CORBA::ORB_ptr orb)
-: orb_(CORBA::ORB::_duplicate (orb))
-{
-}
-
-int ThreadPool::svc (void)
-{
- try
- {
- this->orb_->run ();
- }
- catch (...)
- {
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_2417_Regression/subscriber.idl b/TAO/tests/Bug_2417_Regression/subscriber.idl
deleted file mode 100644
index 4bc284d2979..00000000000
--- a/TAO/tests/Bug_2417_Regression/subscriber.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-interface Subscriber
-{
- oneway void onData(in double value);
- boolean isAlive();
-};
diff --git a/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp b/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
deleted file mode 100644
index 61f25e23349..00000000000
--- a/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-#include "subscriber_impl.h"
-#include "ace/OS_NS_stdio.h"
-
-Subscriber_impl::Subscriber_impl(CORBA::ORB_ptr orb)
-: orb_ (CORBA::ORB::_duplicate (orb))
-, count(0)
-{
-}
-
-Subscriber_impl::~Subscriber_impl()
-{
-}
-
-void
-Subscriber_impl::onData (
- ::CORBA::Double
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- ++count;
- if (count > 100)
- shutdown();
-}
-
-::CORBA::Boolean
-Subscriber_impl::isAlive (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- return true;
-}
-
-void Subscriber_impl::shutdown()
-{
- this->orb_->shutdown (0);
-}
-
diff --git a/TAO/tests/Bug_2417_Regression/subscriber_impl.h b/TAO/tests/Bug_2417_Regression/subscriber_impl.h
deleted file mode 100644
index 4b37f8f7529..00000000000
--- a/TAO/tests/Bug_2417_Regression/subscriber_impl.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id$
-
-#ifndef EXPLOIT_PUBLISHER_IMPL_H
-#define EXPLOIT_PUBLISHER_IMPL_H
-
-#include "subscriberS.h"
-
-class Subscriber_impl : public POA_Subscriber
-{
- public:
- Subscriber_impl(CORBA::ORB_ptr orb);
- ~Subscriber_impl();
-
- virtual void onData (
- ::CORBA::Double value
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
- virtual ::CORBA::Boolean isAlive (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- void shutdown();
- private:
- CORBA::ORB_var orb_;
- unsigned int count;
-};
-
-#endif
diff --git a/TAO/tests/Bug_2419_Regression/Bug_2419_Regression.mpc b/TAO/tests/Bug_2419_Regression/Bug_2419_Regression.mpc
deleted file mode 100644
index 073f1f25679..00000000000
--- a/TAO/tests/Bug_2419_Regression/Bug_2419_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project (*Client) : taoserver, messaging {
- exename = client
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2419_Regression/README b/TAO/tests/Bug_2419_Regression/README
deleted file mode 100644
index 0adb564c7ae..00000000000
--- a/TAO/tests/Bug_2419_Regression/README
+++ /dev/null
@@ -1,3 +0,0 @@
-// $Id$
-
-This is a build only test - if it compiles it passes. See the bugzilla ticket for details.
diff --git a/TAO/tests/Bug_2419_Regression/abstract_parent.idl b/TAO/tests/Bug_2419_Regression/abstract_parent.idl
deleted file mode 100644
index 84e5521f296..00000000000
--- a/TAO/tests/Bug_2419_Regression/abstract_parent.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-abstract interface abstract_parent
-{
- void method (in abstract_parent aParent);
-};
diff --git a/TAO/tests/Bug_2419_Regression/client.cpp b/TAO/tests/Bug_2419_Regression/client.cpp
deleted file mode 100644
index 326096e87fa..00000000000
--- a/TAO/tests/Bug_2419_Regression/client.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include "local_childS.h"
-
-int main (int, char*[])
-{
- return 0;
-}
diff --git a/TAO/tests/Bug_2419_Regression/local_child.idl b/TAO/tests/Bug_2419_Regression/local_child.idl
deleted file mode 100644
index f993399b138..00000000000
--- a/TAO/tests/Bug_2419_Regression/local_child.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-#include "abstract_parent.idl"
-
-local interface local_child : abstract_parent
-{
-};
diff --git a/TAO/tests/Bug_2424_Regression/Bug_2424_Regression.mpc b/TAO/tests/Bug_2424_Regression/Bug_2424_Regression.mpc
deleted file mode 100644
index 72053dc671f..00000000000
--- a/TAO/tests/Bug_2424_Regression/Bug_2424_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project (*Client) : taoserver {
- exename = client
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2424_Regression/OneLineCosNaming.idl b/TAO/tests/Bug_2424_Regression/OneLineCosNaming.idl
deleted file mode 100644
index 0e5d486d864..00000000000
--- a/TAO/tests/Bug_2424_Regression/OneLineCosNaming.idl
+++ /dev/null
@@ -1,2 +0,0 @@
-// $Id$
-/** * CORBA Common Object Services: Naming Service. * <p> * The detailed specification is available from the * <a href="http://www.omg.org">Object Management Group</a>. * * @author OMG * @version Version 00-11-01 */ module CosNaming { typedef string Istring; struct NameComponent { Istring id; Istring kind; }; typedef sequence <NameComponent> Name; enum BindingType { nobject, ncontext }; struct Binding { Name binding_name; BindingType binding_type; }; typedef sequence <Binding> BindingList; interface BindingIterator; /** * The NamingContext interface provides operations which support the following: * <ul> * <li> binding objects * <li> name resolution * <li> unbinding * <li> creating naming contexts * <li> deleting contexts * <li> listing a naming context * </ul> */ interface NamingContext { enum NotFoundReason { missing_node, not_context, not_object }; /** * Indicates the name does not identify a binding. */ exception NotFound { NotFoundReason why; Name rest_of_name; }; /** * Indicates that the implementation has given up for some reason. The * client, however, may be able to continue the operation at the returned * naming context. */ exception CannotProceed { NamingContext cxt; Name rest_of_name; }; /** * Indicates the name is invalid. (A name of length 0 is invalid; * implementations may place other restrictions on names.) */ exception InvalidName {}; /** * Indicates an object is already bound to the specified name. Only one * object can be bound to a particular name in a context. */ exception AlreadyBound {}; /** * Indicates that a naming context has bindings. */ exception NotEmpty {}; /** * Creates a binding of a name and an object in the naming * context. Naming contexts that are bound using bind do not * participate in name resolution when compound names are passed to be * resolved. A bind operation that is passed a compound name is * defined as follows: * * <pre> * ctx->bind(< c1 ; c2 ; ... ; cn >, obj) := * (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind(< cn >, obj) * </pre> * * @parm n - binding name. * @parm obj - object to bind. * @raises AlreadyBound - if the name is bound in the context. */ void bind (in Name n, in Object obj) raises (NotFound, CannotProceed, InvalidName, AlreadyBound); /** * Creates a binding of a name and an object in the naming context * even if the name is already bound in the context. Naming contexts * that are bound using rebind do not participate in name resolution * when compound names are passed to be resolved. * * @parm n - binding name. * @parm obj - object to bind. */ void rebind (in Name n, in Object obj) raises (NotFound, CannotProceed, InvalidName); /** * Names an object that is a naming context. Naming contexts that are * bound using bind_context() participate in name resolution when * compound names are passed to be resolved. A bind_context operation * that is passed a compound name is defined as follows: * <pre> * ctx->bind_context(< c1 ; c2 ; ... ; cn >, nc) := * (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind_context(< cn >, nc) * </pre> * * @parm n - binding name. * @parm nc - naming context to bind. * @raises AlreadyBound - if the name is bound in the context. */ void bind_context (in Name n, in NamingContext nc) raises (NotFound, CannotProceed, InvalidName, AlreadyBound); /** * Creates a binding of a name and a naming context in the naming * context even if the name is already bound in the context. Naming * contexts that are bound using rebind_context() participate in name * resolution when compound names are passed to be resolved. * * @parm n - binding name. * @parm nc - naming context to bind. */ void rebind_context (in Name n, in NamingContext nc) raises (NotFound, CannotProceed, InvalidName); /** * The resolve operation is the process of retrieving an object bound * to a name in a given context. The given name must exactly match the * bound name. The naming service does not return the type of the * object. Clients are responsible for "narrowing" the object to the * appropriate type. That is, clients typically cast the returned * object from Object to a more specialized interface. Names can have * multiple components; therefore, name resolution can traverse * multiple contexts. * A compound resolve is defined as follows: * <pre> * ctx->resolve(< c1 ; c2 ; ... ; cn >) := * ctx->resolve(< c1 ; c2 ; ... ; cn-1 >)->resolve(< cn >) * </pre> * * @parm n - binding name. * @returns bound object. */ Object resolve (in Name n) raises (NotFound, CannotProceed, InvalidName); /** * The unbind operation removes a name binding from a context. * A unbind operation that is passed a compound name is defined as follows: * <pre> * ctx->unbind(< c1 ; c2 ; ... ; cn >) := * (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->unbind(< cn >) * </pre> * * @parm n - binding name. */ void unbind (in Name n) raises (NotFound, CannotProceed, InvalidName); /** * This operation returns a naming context implemented by the same * naming server as the context on which the operation was * invoked. The new context is not bound to any name. * * @returns new binding context. */ NamingContext new_context (); /** * This operation creates a new context and binds it to the name * supplied as an argument. The newly-created context is implemented * by the same naming server as the context in which it was bound * (that is, the naming server that implements the context denoted by * the name argument excluding the last component). A bind_new_context * that is passed a compound name is defined as follows: * * <pre> * ctx->bind_new_context(< c1 ; c2 ; ... ; cn >) := * (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind_new_context(< cn >) * </pre> * * @parm n - binding name. * @returns new binding context. * @raises AlreadyBound - if the name is bound in the context. */ NamingContext bind_new_context (in Name n) raises (NotFound, CannotProceed, InvalidName, AlreadyBound); /** * The destroy operation deletes a naming context. The list operation * allows a client to iterate through a set of bindings in a naming * context. * * @raises NotEmpty - if the naming context contains bindings. */ void destroy () raises (NotEmpty); /** * The list operation returns at most the requested number of bindings in * BindingList bl. * <ul> * <li> If the naming context contains additional bindings, the list * operation returns a BindingIterator with the additional bindings. * <li> If the naming context does not contain additional bindings, the * binding iterator is a nil object reference. * </ul> * * @parm how_many - maximum number of binding to return in bl. * @parm bl - list of bindings. * @parm bi - iterator over remaining bindings. */ void list (in unsigned long how_many, out BindingList bl, out BindingIterator bi); }; /** * The BindingIterator interface allows a client to iterate through the * bindings using the next_one or next_n operations. */ interface BindingIterator { /** * This operation returns the next binding. If there are no more * bindings, false is returned. * * @parm b - next binding. */ boolean next_one (out Binding b); /** * This operation returns at most the requested number of bindings. * * @parm how_many - maximum number of binding to return in bl. * @parm bl - list of bindings. */ boolean next_n (in unsigned long how_many, out BindingList bl); /** * This operation destroys the iterator. */ void destroy (); }; /** * The NamingContextExt Interface provides the extensions to the * NamingContext Interface as proposed by the Interoperable * Naming Service Extension. */ interface NamingContextExt: NamingContext { typedef string StringName; typedef string Address; typedef string URLString; /** * This operation accepts a Name and returns a stringified Name. * * @param n - Name (a sequence of NameComponents) * @raises InvalidName - if the Name is invalid. */ StringName to_string (in Name n) raises (InvalidName); /** * This operation accepts a StringifiedName and returns a Name. * * @param n - a StringifiedName * @raises InvalidName - if the Name is invalid. */ Name to_name (in StringName sn) raises (InvalidName); /** * Indicates a syntactically invalid address component. */ exception InvalidAddress {}; /** * This operation accepts a URL address component and a stringified * name and returns a URL string. * * @param n - a Stringified name. * @raises addr - URL address component. */ URLString to_url (in Address addr, in StringName sn) raises (InvalidAddress, InvalidName); /** * This is a convenience operation that performs a resolve in the same * manner as NamingContext::resolve. * * @param n - a Stringified name. * @raises NotFound, CannotProceed, InvalidName */ Object resolve_str (in StringName n) raises (NotFound, CannotProceed, InvalidName); }; };
diff --git a/TAO/tests/Bug_2424_Regression/README b/TAO/tests/Bug_2424_Regression/README
deleted file mode 100644
index a0e0c8a1dad..00000000000
--- a/TAO/tests/Bug_2424_Regression/README
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-This is a compile only test to check that the IDL compiler can deal with IDL containing unfeasibly long lines. If it builds - it's passed.
-
-The file OneLineCosNaming.idl is the complete IDL for the Naming Service, including comments, with all the newlines removed.
diff --git a/TAO/tests/Bug_2424_Regression/client.cpp b/TAO/tests/Bug_2424_Regression/client.cpp
deleted file mode 100644
index 4bca89b3009..00000000000
--- a/TAO/tests/Bug_2424_Regression/client.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include "OneLineCosNamingC.h"
-
-int main (int, char*[])
-{
- return 0;
-}
diff --git a/TAO/tests/Bug_2429_Regression/Bug_2429_Regression.mpc b/TAO/tests/Bug_2429_Regression/Bug_2429_Regression.mpc
deleted file mode 100644
index 27af500c3e6..00000000000
--- a/TAO/tests/Bug_2429_Regression/Bug_2429_Regression.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server) : taoserver, messaging {
- exename = server
- idlflags += -Ge 1 -GC
-
- Source_Files {
- server.cpp
- ChildServant.cpp
- }
-}
-
-project(*Client) : taoclient, messaging {
- exename = client
- idlflags += -Ge 1 -GC
-
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2429_Regression/Child.idl b/TAO/tests/Bug_2429_Regression/Child.idl
deleted file mode 100644
index 166b36367ce..00000000000
--- a/TAO/tests/Bug_2429_Regression/Child.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include "Parent.idl"
-
-interface Child : Parent
-{
- void childMethod ();
-};
diff --git a/TAO/tests/Bug_2429_Regression/ChildServant.cpp b/TAO/tests/Bug_2429_Regression/ChildServant.cpp
deleted file mode 100644
index f6617bc55d9..00000000000
--- a/TAO/tests/Bug_2429_Regression/ChildServant.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-#include "ChildServant.h"
-
-ChildServant::ChildServant(CORBA::ORB_ptr orb)
-: orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-void
-ChildServant::childMethod ()
-ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // No-op
-}
-
-void
-ChildServant::parentMethod ()
-ACE_THROW_SPEC((CORBA::SystemException))
-{
- // Just throw an exception
- ACE_THROW (CORBA::INTERNAL ());
-}
-
-void
-ChildServant::shutdown ()
-ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2429_Regression/ChildServant.h b/TAO/tests/Bug_2429_Regression/ChildServant.h
deleted file mode 100644
index 55d601d3cc0..00000000000
--- a/TAO/tests/Bug_2429_Regression/ChildServant.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef CHILDSERVANT_H
-#define CHILDSERVANT_H
-
-// $Id$
-
-#include "ChildS.h"
-
-class ChildServant
- : public virtual POA_Child
-{
- public:
- ChildServant (CORBA::ORB_ptr orb);
- virtual void parentMethod ()
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void childMethod ()
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- private:
- CORBA::ORB_var orb_;
-};
-
-#endif
diff --git a/TAO/tests/Bug_2429_Regression/Parent.idl b/TAO/tests/Bug_2429_Regression/Parent.idl
deleted file mode 100644
index b142f1939e3..00000000000
--- a/TAO/tests/Bug_2429_Regression/Parent.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface Parent
-{
- void parentMethod ();
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2429_Regression/README b/TAO/tests/Bug_2429_Regression/README
deleted file mode 100644
index f5f06b3dffb..00000000000
--- a/TAO/tests/Bug_2429_Regression/README
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Id$
-
-This test makes a call via AMI and then waits to receive a call back. The server throws an exception so the client expects to receive that. The method called is a method inherited from a parent interface (parentMethod).
-
-_Expected Success Result_
-
-Successfully received an Internal Excep*ion as expected.
-event loop finished
-
-_Regression Result_
-
-_Perfect_Hash_OpTable:find for operation 'parentMethod_excep' (length=18) failed
-ERROR: /home/sm/bugs/tao321/client timedout
-ERROR: Regression - Non zero result from client or client timed out.
-
-
diff --git a/TAO/tests/Bug_2429_Regression/client.cpp b/TAO/tests/Bug_2429_Regression/client.cpp
deleted file mode 100644
index ded3a38e9d6..00000000000
--- a/TAO/tests/Bug_2429_Regression/client.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "tao/Messaging/Messaging.h"
-#include "ChildS.h"
-
-class Reply_Handler
- : public POA_AMI_ChildHandler
-{
- public:
- Reply_Handler()
- : parentMethod_count (0),
- parentMethod_excep_count (0)
- {
- }
-
- virtual void
- childMethod (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- }
-
- virtual void
- childMethod_excep (Messaging::ExceptionHolder *
- excep_holder ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_TRY
- {
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::SystemException, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Reply_Handler::childMethod_excep: ");
- }
- ACE_ENDTRY;
- }
-
- virtual void
- parentMethod (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "client: parentMethod reply %d @ %T\n",
- ++parentMethod_count));
-
- }
-
- virtual void
- parentMethod_excep (Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_TRY
- {
- ++parentMethod_excep_count;
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::INTERNAL, iex)
- {
- ACE_DEBUG ((LM_DEBUG, "Successfully received an Internal Excep*ion as expected.\n"));
- }
- ACE_CATCH (CORBA::SystemException, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Reply_Handler::childMethod_excep: ");
- }
- ACE_ENDTRY;
- }
-
- CORBA::ULong reply_count (void) { return parentMethod_count + parentMethod_excep_count; };
-
- private:
- // Count of replies and excep
- CORBA::ULong parentMethod_count;
- CORBA::ULong parentMethod_excep_count;
-};
-
-// Server ior.
-static const char * server_ior = "file://server.ior";
-
-static int
-client_parse_args(int argc, char *argv[])
-{
- ACE_Get_Opt
- get_opts(argc, argv, "f:");
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'f':
- server_ior = get_opts.opt_arg();
- break;
- case '?':
- default:
- ACE_DEBUG((LM_ERROR,
- "usage: %s "
- "-f server IOR file\n"));
- return 1;
- }
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main(int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- CORBA::ORB_var orb;
-
- ACE_TRY
- {
- // Initialize the ORB.
- orb = CORBA::ORB_init(argc, argv, 0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize options based on command-line arguments.
- int parse_args_result = client_parse_args(argc, argv);
- if (parse_args_result != 0)
- {
- return 1;
- }
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get an object reference from the nominated file
- object = orb->string_to_object (server_ior);
-
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Child_var child = Child::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
-
- Reply_Handler reply_handler_servant;
-
- AMI_ChildHandler_var reply_handler_object =
- reply_handler_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoke the AMI parentMethod
- child->sendc_parentMethod (reply_handler_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Loop until all replies have been received.
- while (reply_handler_servant.reply_count () == 0)
- {
- orb->perform_work ();
- }
-
- // Shutdown server.
- child->shutdown ();
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2429_Regression/run_test.pl b/TAO/tests/Bug_2429_Regression/run_test.pl
deleted file mode 100755
index 542e46da4ff..00000000000
--- a/TAO/tests/Bug_2429_Regression/run_test.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-#$Id$
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file = PerlACE::LocalFile ("server.ior");
-unlink $server_ior_file;
-
-# The client and server processes
-$SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-
-$SERVER->Arguments("-o $server_ior_file");
-
-# Fire up the server
-$SERVER->Spawn();
-
-# We can wait on the IOR file
-if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-$CLIENT->Arguments("-f file://$server_ior_file");
-if ($CLIENT->SpawnWaitKill (10) != 0)
-{
- print STDERR "ERROR: Regression - Non zero result from client or client timed out.\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Clean up and return
-$SERVER->TerminateWaitKill (5);
-unlink $server_ior_file;
-exit 0;
diff --git a/TAO/tests/Bug_2429_Regression/server.cpp b/TAO/tests/Bug_2429_Regression/server.cpp
deleted file mode 100644
index 8059c43febb..00000000000
--- a/TAO/tests/Bug_2429_Regression/server.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// $Id$
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "ChildServant.h"
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- ChildServant servant (orb.in ());
-
- Child_var server =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2494_Regression/Bug_2494_Regression.mpc b/TAO/tests/Bug_2494_Regression/Bug_2494_Regression.mpc
deleted file mode 100644
index ef312844a93..00000000000
--- a/TAO/tests/Bug_2494_Regression/Bug_2494_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoexe, portableserver {
- idlflags += -Sc -St
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe {
- idlflags += -Sc -St
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2494_Regression/README b/TAO/tests/Bug_2494_Regression/README
deleted file mode 100644
index 726419360b1..00000000000
--- a/TAO/tests/Bug_2494_Regression/README
+++ /dev/null
@@ -1,34 +0,0 @@
-# $Id$
-
-Description:
-
- This test a modification of MT_Server. In this case the client is also
-multi-threaded. The client sends very large strings to the server, which it
-echoes back, for the sake of keeping the server busy doing I/O. When the
-client is abruptly killed, the server should close the connection and continue
-running.
-
-Expected output:
- The server prints out the IOR of the object it serves and the
-results of server shutdown (aborted or shutdown cleanly).
-
- Regression:
-Activated as
-<IOR:012a2a2a1600000049444c3a53696d706c655f5365727665723a312e30002a2a0100000000000000740000000101022a130000006f6369313332392e6f63697765622e636f6d002a19842a2a1b00000014010f0052535420c93244520b04000000000001000000010000002a020000000000000008000000012a2a2a004f41540100000018000000012a2a2a0100010001000000010001050901010000000000>
-***Client has been killed***
-ACE_ASSERT (32395|3067820976): file Transport.cpp, line 172 assertion
-failed for 'this->head_ == 0'.Aborting...
-ERROR: cannot find file
-</tao_builds/mitza/1.4a/ACE_wrappers/TAO/tests/Bug_2494_Regression/server_terminated>
--- server has not shut down cleanly.
-(perl script returns 1)
-
- Correct run:
-Activated as
-<IOR:012a2a2a1600000049444c3a53696d706c655f5365727665723a312e30002a2a0100000000000000740000000101022a130000006f6369313332392e6f63697765622e636f6d002a34842a2a1b00000014010f0052535488d03244438d04000000000001000000010000002a020000000000000008000000012a2a2a004f41540100000018000000012a2a2a0100010001000000010001050901010000000000>
-***Client has been killed***
-event loop finished
-(perl script returns 0)
-
-How to run:
- Use the run_test.pl script to run it.
diff --git a/TAO/tests/Bug_2494_Regression/client.cpp b/TAO/tests/Bug_2494_Regression/client.cpp
deleted file mode 100644
index 3ec481e7167..00000000000
--- a/TAO/tests/Bug_2494_Regression/client.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_string.h"
-#include "testC.h"
-
-ACE_RCSID(Bug_2494_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int nthreads = 5;
-int do_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "[-n <nthreads> | -x]"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-namespace
-{
- const char *twohundredbytes =
- "12345678901234567890123456789012345678901234567890"
- "12345678901234567890123456789012345678901234567890"
- "12345678901234567890123456789012345678901234567890"
- "12345678901234567890123456789012345678901234567890"
- ;
-}
-
-struct Worker : ACE_Task_Base
-{
-
- Worker (Simple_Server_ptr srv)
- : srv_(Simple_Server::_duplicate(srv))
- {
- }
-
- Simple_Server_var srv_;
-
- int svc ()
- {
- char* str = CORBA::string_alloc (200*2000 + 1);
- if (!str) return 1;
- str[0] = CORBA::Char('\0');
- for (int i=0; i < 2000; ++i)
- {
- ACE_OS::strcat(str, twohundredbytes);
- }
-
- while (1)
- {
- try
- {
- const char *ret = srv_->test_method (str);
- ACE_TRY_CHECK;
- if (0 != ACE_OS::strcmp (str, ret)) return 1;
- }
- catch (CORBA::Exception& ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Exception caught:");
- return 1;
- }
- }
- return 0;
- }
-
-};
-
-int
-main (int argc, char *argv[])
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object = orb->string_to_object (ior);
-
- Simple_Server_var server = Simple_Server::_narrow (object.in ());
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior), 1);
- }
-
- if (do_shutdown)
- {
- server->shutdown ();
- }
- else
- {
- Worker wrk (server.in ());
- wrk.activate (THR_NEW_LWP|THR_JOINABLE|THR_INHERIT_SCHED, nthreads);
- wrk.thr_mgr ()->wait ();
- }
- }
- catch (CORBA::Exception& ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Exception caught:");
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2494_Regression/run_test.pl b/TAO/tests/Bug_2494_Regression/run_test.pl
deleted file mode 100755
index b622265a7de..00000000000
--- a/TAO/tests/Bug_2494_Regression/run_test.pl
+++ /dev/null
@@ -1,68 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$srv_threads = '4';
-$cli_threads = '30';
-$iorfile = PerlACE::LocalFile ("test.ior");
-$srvdownfile = PerlACE::LocalFile ("server_terminated");
-
-unlink $iorfile;
-unlink $srvdownfile;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile -n $srv_threads");
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -n $cli_threads");
-$CLS = new PerlACE::Process ("client", "-k file://$iorfile -x");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$CL->Spawn ();
-#Client will not terminate on its own, kill it after 30 seconds
-$CL->TimedWait (30);
-$CL->Kill ();
-
-print "***Client has been killed***\n";
-
-#Server should still be running at this point, now start the client that asks
-#the server to shut itself down
-
-$client = $CLS->SpawnWaitKill (5);
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-#Server should now be shut down
-if (PerlACE::waitforfile_timed ($srvdownfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$srvdownfile>".
- " -- server has not shut down cleanly.\n";
- $SV->Kill ();
- exit 1;
-}
-
-$server = $SV->WaitKill (1);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-unlink $srvdownfile;
-
-exit $status
diff --git a/TAO/tests/Bug_2494_Regression/server.cpp b/TAO/tests/Bug_2494_Regression/server.cpp
deleted file mode 100644
index 8a87e86c160..00000000000
--- a/TAO/tests/Bug_2494_Regression/server.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(Bug_2494_Regression, server, "$Id$")
-
-const char *ior_output_file = "file://test.ior";
-int nthreads = 4;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Worker : public ACE_Task_Base
-{
- // = TITLE
- // Run a server thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run server threads
- //
-public:
- Worker (CORBA::ORB_ptr orb);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-};
-
-int
-main (int argc, char *argv[])
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ());
-
- PortableServer::POAManager_var poa_manager = root_poa->the_POAManager ();
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server = server_impl._this ();
-
- CORBA::String_var ior = orb->object_to_string (server.in ());
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate ();
-
- Worker worker (orb.in ());
- if (worker.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- worker.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- const char *fname = "server_terminated";
- FILE *output_file= ACE_OS::fopen (fname, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing: ",
- fname),
- 1);
- ACE_OS::fprintf (output_file, "%s", "OK\n");
- ACE_OS::fclose (output_file);
- }
- catch (CORBA::Exception& ex)
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
-
- return 0;
-}
-
-// ****************************************************************
-
-Worker::Worker (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Worker::svc (void)
-{
- try
- {
- this->orb_->run ();
- }
- catch (CORBA::Exception&)
- {
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_2494_Regression/test.idl b/TAO/tests/Bug_2494_Regression/test.idl
deleted file mode 100644
index 335009e627f..00000000000
--- a/TAO/tests/Bug_2494_Regression/test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-//
-// $Id$
-//
-
-interface Simple_Server
-{
- string test_method (in string str);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2494_Regression/test_i.cpp b/TAO/tests/Bug_2494_Regression/test_i.cpp
deleted file mode 100644
index bfccb378f26..00000000000
--- a/TAO/tests/Bug_2494_Regression/test_i.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_unistd.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.inl"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(Bug_2494_Regression, test_i, "$Id$")
-
-char *
-Simple_Server_i::test_method (const char *x)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Request in thread %t\n"));
- ACE_Time_Value tv (2);
- ACE_OS::sleep (tv);
- return CORBA::string_dup(x);
-}
-
-void
-Simple_Server_i::shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/Bug_2494_Regression/test_i.h b/TAO/tests/Bug_2494_Regression/test_i.h
deleted file mode 100644
index cd8971dc7a6..00000000000
--- a/TAO/tests/Bug_2494_Regression/test_i.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id$
-
-#ifndef TAO_BUG_2494_REGRESSION_TEST_I_H
-#define TAO_BUG_2494_REGRESSION_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- char *test_method (const char *x)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.inl"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_BUG_2494_REGRESSION_TEST_I_H */
diff --git a/TAO/tests/Bug_2494_Regression/test_i.inl b/TAO/tests/Bug_2494_Regression/test_i.inl
deleted file mode 100644
index 97524552ff4..00000000000
--- a/TAO/tests/Bug_2494_Regression/test_i.inl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/CDR/alignment.cpp b/TAO/tests/CDR/alignment.cpp
index 70cbd85c629..ba5d61fb1a3 100644
--- a/TAO/tests/CDR/alignment.cpp
+++ b/TAO/tests/CDR/alignment.cpp
@@ -21,7 +21,7 @@
#include "ace/Log_Msg.h"
-int main(int, char*[])
+int ACE_TMAIN(int, ACE_TCHAR*[])
{
int status = 0;
@@ -76,13 +76,13 @@ int main(int, char*[])
ACE_HEX_DUMP ((LM_DEBUG,
j->rd_ptr (),
j->length (),
- "Output CDR stream"));
+ ACE_TEXT("Output CDR stream")));
}
TAO_InputCDR debug (cdr);
ACE_HEX_DUMP ((LM_DEBUG,
debug.rd_ptr (),
debug.length (),
- "Input CDR stream"));
+ ACE_TEXT("Input CDR stream")));
}
}
diff --git a/TAO/tests/CDR/allocator.cpp b/TAO/tests/CDR/allocator.cpp
index dfbae63cc44..1ddb772e30c 100644
--- a/TAO/tests/CDR/allocator.cpp
+++ b/TAO/tests/CDR/allocator.cpp
@@ -26,6 +26,7 @@
#include "ace/Get_Opt.h"
#include "ace/High_Res_Timer.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(CDR, allocator, "$Id$")
@@ -65,10 +66,12 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv());
int tss = 0;
int iterations = 500;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
int quiet = 0;
ACE_RANDR_TYPE seed = time(0);
- ACE_Get_Opt get_opt (argc, argv, "tn:f:m:s:a:b:r:q");
+ ACE_Get_Arg_Opt<char> get_opt (convert.get_argc(), convert.get_ASCII_argv(), "tn:f:m:s:a:b:r:q");
int opt;
while ((opt = get_opt ()) != EOF)
diff --git a/TAO/tests/CDR/basic_types.cpp b/TAO/tests/CDR/basic_types.cpp
index a1035e4c150..f5e57706dea 100644
--- a/TAO/tests/CDR/basic_types.cpp
+++ b/TAO/tests/CDR/basic_types.cpp
@@ -24,6 +24,7 @@
#include "ace/Get_Opt.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (CDR,
basic_types,
@@ -212,17 +213,19 @@ test_get (TAO_InputCDR &cdr, const CDR_Test_Types &test_types)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- ACE_Get_Opt get_opt (argc, argv, "dn:l:");
+ ACE_Get_Arg_Opt<char> get_opt (convert.get_argc(), convert.get_ASCII_argv(), "dn:l:");
int opt;
while ((opt = get_opt ()) != EOF)
diff --git a/TAO/tests/CDR/growth.cpp b/TAO/tests/CDR/growth.cpp
index cc70e4ea277..755a6d03eb1 100644
--- a/TAO/tests/CDR/growth.cpp
+++ b/TAO/tests/CDR/growth.cpp
@@ -20,6 +20,7 @@
#include "ace/Get_Opt.h"
#include "ace/High_Res_Timer.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB.h"
#include "tao/debug.h"
@@ -63,15 +64,17 @@ test_read (TAO_InputCDR &cdr, int n)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int n = 100;
int low = 64;
int hi = 4096;
int s = 4;
int quiet = 0;
- ACE_Get_Opt get_opt (argc, argv, "dn:l:h:s:q");
+ ACE_Get_Arg_Opt<char> get_opt (convert.get_argc(), convert.get_ASCII_argv(), "dn:l:h:s:q");
int opt;
while ((opt = get_opt ()) != EOF)
diff --git a/TAO/tests/CDR/octet_sequence.cpp b/TAO/tests/CDR/octet_sequence.cpp
index fd8a8026ab5..5f8d00bd1b0 100644
--- a/TAO/tests/CDR/octet_sequence.cpp
+++ b/TAO/tests/CDR/octet_sequence.cpp
@@ -40,7 +40,7 @@ void dump(const char * msg)
m3->data_block()->reference_count()));
}
-int main(int, char*[])
+int ACE_TMAIN(int, ACE_TCHAR*[])
{
// setup mb's
char buf[1024];
diff --git a/TAO/tests/CDR/tc.cpp b/TAO/tests/CDR/tc.cpp
index 0b814f3d523..e52531d641a 100644
--- a/TAO/tests/CDR/tc.cpp
+++ b/TAO/tests/CDR/tc.cpp
@@ -18,12 +18,13 @@
// ============================================================================
#include "tao/AnyTypeCode/TypeCode.h"
-#include "tao/AnyTypeCode/TypeCode_Constants.h"
+#include "tao/AnyTypeCode/TC_Constants_Forward.h"
#include "tao/ORB.h"
#include "tao/SystemException.h"
#include "tao/debug.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (CDR,
@@ -34,12 +35,14 @@ ACE_RCSID (CDR,
// verify that CDR offers the services needed for Typecode...
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/CSD_TP_Broken.mpc b/TAO/tests/CSD_Strategy_Tests/Broken/CSD_TP_Broken.mpc
deleted file mode 100644
index 016caef75ef..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/CSD_TP_Broken.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_b {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_b {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.cpp
deleted file mode 100644
index 0fbab91f139..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_B_ClientEngine.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-
-ClientApp::ClientApp()
-: TestAppBase("TP_Test_3_Client"),
- client_task_ (true), // shutdown orb after client is done.
- num_servants_ (1),
- num_csd_threads_ (1),
- num_orb_threads_ (1),
- ior_("Not Set"),
- client_kind_(0),
- client_id_(0)
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
-
- return this->check_validity () ? 0 : -1;
-}
-
-
-int
-ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- TheAppShutdown->init(this->orb_.in(), num_servants_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ClientApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ClientApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-}
-
-
-void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Turn the ior_ into a Foo_B obj ref.
- Foo_B_var foo = RefHelper<Foo_B>::string_to_ref(this->orb_.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->servants_.create_and_activate(1, // number of callback servants
- this->poa_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ServantListType::T_stub_var cb = this->servants_.objref(0);
-
- // Create the ClientEngine object, and give it the Foo_B and Callback object
- // references.
- ClientEngine_Handle engine
- = new Foo_B_ClientEngine(foo.in(), cb.in (), this->client_id_);
- this->client_task_.add_engine(engine.in());
-}
-
-
-void
-ClientApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ClientApp::run_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->client_task_.open() != 0)
- {
- ACE_THROW (TestAppException ());
- }
-}
-
-
-void
-ClientApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-PortableServer::POA_ptr
-ClientApp::create_poa(CORBA::ORB_ptr orb, const char* poa_name ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-void
-ClientApp::cleanup()
-{
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "i:k:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case 'k':
- result = set_arg(this->client_kind_,
- get_opts.opt_arg(),
- c,
- "client_kind");
- break;
-
- case 'n':
- result = set_arg(this->client_id_,
- get_opts.opt_arg(),
- c,
- "client_id");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ClientApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-i <ior>]\n"
- "\t[-k <client_kind>]\n"
- "\t[-n <client_id>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ClientApp::arg_dependency_checks()
-{
- if (this->ior_ == "Not Set")
- {
- ACE_ERROR((LM_ERROR,
- "Error: Missing required command-line option (-i <ior>).\n"));
- this->usage_statement();
- return -1;
- }
- if (this->client_id_ <= 0)
- {
- ACE_ERROR((LM_ERROR,
- "Error: Invalid command-line option (-n <client id>). \n"
- " The client id should be positive integer. \n"));
- this->usage_statement();
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ClientApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-bool
-ClientApp::check_validity ()
-{
- // Check whether the clients return any errors.
- if (this->client_task_.failure_count () > 0)
- {
- return false;
- }
-
- return true;
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.h
deleted file mode 100644
index 846384224f5..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ClientEngine.h"
-#include "ServantList_T.h"
-#include "Callback_i.h"
-#include "ClientTask.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "tao/ORB.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
-
- typedef ServantList<Callback_i> ServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- ServantListType servants_;
-
- ClientTask client_task_;
-
- ACE_CString exe_name_;
-
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
-
- ACE_CString ior_;
- unsigned client_kind_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.cpp
deleted file mode 100644
index e48955f8c06..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.cpp
+++ /dev/null
@@ -1,427 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_B_SimpleClientEngine.h"
-#include "Callback_i.h"
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_3_Server"),
- ior_filename_prefix_("foo"),
- num_servants_(1),
- num_csd_threads_(1),
- num_orb_threads_(1),
- num_remote_clients_(1),
- num_collocated_clients_(0),
- collocated_client_kind_(0)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->collocated_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
- return this->check_validity () ? 0 : -1;
-}
-
-
-int
-ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- TheAppShutdown->init(this->orb_.in(), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_poa_ = this->create_poa(this->orb_.in(),
- "CallbackPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
-// We don't apply the strategy for this test to show that the bug isn't
-// part of the CSD ThreadPool Strategy code.
-#if 0
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-#endif
-
- // Use another poa and strategy for callbacks. This would resolve
- // the deadlock situation that happens when having number of csd
- // threads less than number of collocated clients.
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_tp_strategy_ = new TAO::CSD::TP_Strategy();
-// We don't apply the strategy for this test to show that the bug isn't
-// part of the CSD ThreadPool Strategy code.
-#if 0
- if (!this->cb_tp_strategy_->apply_to(this->cb_poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to callback poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-#endif
- }
-}
-
-
-void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->foo_servants_.create_and_activate(this->num_servants_,
- this->orb_.in (),
- this->poa_.in (),
- this->ior_filename_prefix_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::collocated_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ == 0)
- return;
-
- this->cb_servants_.create_and_activate(1, // number of callback servants
- this->cb_poa_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CallbackServantListType::T_stub_var cb = this->cb_servants_.objref(0);
-
- unsigned client_id = this->num_remote_clients_;
-
- for (unsigned i = 0; i < this->num_collocated_clients_; i++)
- {
- client_id ++;
- // Dole out the servant object references in a round-robin fashion.
- unsigned servant_index = i % this->num_servants_;
-
- FooServantListType::T_stub_var foo
- = this->foo_servants_.objref(servant_index);
- ClientEngine_Handle engine
- = new Foo_B_SimpleClientEngine(foo.in(), cb.in (), client_id, true);
- this->collocated_client_task_.add_engine(engine.in());
- }
-}
-
-
-void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ > 0)
- {
- if (this->collocated_client_task_.open() == -1)
- {
- ACE_THROW (TestAppException ());
- }
- }
-}
-
-
-void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-void
-ServerApp::cleanup()
-{
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "p:s:n:t:r:c:k:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'p':
- this->ior_filename_prefix_ = get_opts.opt_arg();
- break;
-
- case 's':
- result = set_arg(this->num_servants_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 'n':
- result = set_arg(this->num_csd_threads_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 't':
- result = set_arg(this->num_orb_threads_,
- get_opts.opt_arg(),
- c,
- "num_orb_threads",
- 1);
- break;
-
- case 'r':
- result = set_arg(this->num_remote_clients_,
- get_opts.opt_arg(),
- c,
- "num_remote_clients");
- break;
-
- case 'c':
- result = set_arg(this->num_collocated_clients_,
- get_opts.opt_arg(),
- c,
- "num_collocated_clients");
- break;
-
- case 'k':
- result = set_arg(this->collocated_client_kind_,
- get_opts.opt_arg(),
- c,
- "collocated_client_kind");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ServerApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-p <ior_filename_prefix>]\n"
- "\t[-s <num_servants>]\n"
- "\t[-n <num_csd_threads>]\n"
- "\t[-t <num_orb_threads>]\n"
- "\t[-r <num_remote_clients>]\n"
- "\t[-c <num_collocated_clients>]\n"
- "\t[-k <collocated_client_kind>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ServerApp::arg_dependency_checks()
-{
- return (this->num_remote_clients_
- + this->num_collocated_clients_) > 0 ? 0 : -1;
-}
-
-
-int
-ServerApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-PortableServer::POA_ptr
-ServerApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-bool
-ServerApp::check_validity ()
-{
- return true;
-#if 0
- // Check whether the clients return any errors.
- if (this->num_collocated_clients_ > 0
- && this->collocated_client_task_.failure_count () > 0)
- {
- return false;
- }
-
- Foo_B_Statistics stats (this->num_remote_clients_,
- this->num_collocated_clients_);
-
- Foo_B_SimpleClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->foo_servants_.servant(i)->gather_stats (stats);
- }
-
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_servants_.servant (0)->gather_stats (stats);
- }
-
- return stats.actual_vs_expected ();
-#endif
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.h
deleted file mode 100644
index c90b7671534..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "ServantList_T.h"
-#include "ClientTask.h"
-#include "Foo_B_i.h"
-#include "Callback_i.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
- void collocated_setup(ACE_ENV_SINGLE_ARG_DECL);
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
- typedef ServantList<Foo_B_i> FooServantListType;
- typedef ServantList<Callback_i> CallbackServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- PortableServer::POA_var cb_poa_;
- TAO::CSD::TP_Strategy_Handle cb_tp_strategy_;
-
- FooServantListType foo_servants_;
- CallbackServantListType cb_servants_;
-
- ClientTask collocated_client_task_;
-
- ACE_CString exe_name_;
-
- ACE_CString ior_filename_prefix_;
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned collocated_client_kind_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/Broken/client_main.cpp
deleted file mode 100644
index 3814bef5ff9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/client_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl b/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl
deleted file mode 100755
index 6d3802bc59f..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my $status = 0;
-
-my $iorfname_prefix = "servant";
-my $num_servants = 1;
-my $num_orb_threads = 1;
-my $num_remote_clients = 1;
-my $num_csd_threads = 1;
-my $num_collocated_clients = 0;
-my $collocated_client_kind = 0;
-my $client_kind = 0;
-
-my $i;
-my $j;
-my @iorfile;
-
-my $ARGC = @ARGV;
-
-if ($ARGC > 0)
-{
- if ($ARGC > 1)
- {
- print STDERR "ERROR: Too many command-line arguments for $0.\n";
- exit 1;
- }
-
- my $subtest = $ARGV[0];
-
- if ($subtest eq 'remote')
- {
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'collocated')
- {
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
- $num_csd_threads=1;
- }
- elsif ($subtest eq 'remote_orbthreads')
- {
- $num_orb_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_servants')
- {
- $num_servants = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_csdthreads')
- {
- $num_csd_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'usage')
- {
- print STDOUT "Usage: $0 [<subtest>]\n" .
- "\n" .
- "Supported <subtest> values:\n" .
- "\n" .
- "\tremote\n" .
- "\tcollocated\n" .
- "\tremote_orbthreads\n" .
- "\tremote_servants\n" .
- "\tremote_csdthreads\n" .
- "\tremote_big\n" .
- "\tusage\n" .
- "\n";
- exit 0;
- }
- else
- {
- print STDERR "ERROR: invalid subtest argument for $0: $subtest\n";
- exit 1;
- }
-}
-
-#Delete old ior files.
-for ($i = 0; $i < $num_servants; $i++) {
- my $servant_id = sprintf("%02d", ($i + 1));
- $iorfile[$i] = PerlACE::LocalFile($iorfname_prefix . "_$servant_id.ior");
- unlink $iorfile[$i];
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main",
-# "-ORBNegotiateCodesets 0 " .
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-else {
- $SV = new PerlACE::Process("server_main",
-# "-ORBNegotiateCodesets 0 " .
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-
-
-
-$SV->Spawn();
-
-# Wait for the servant ior files created by server.
-for ($i = 0; $i < $num_servants; $i++) {
- if (PerlACE::waitforfile_timed
- ($iorfile[$i],
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile[$i]>\n";
- $SV->Kill();
- $SV->TimedWait(1);
- exit 1;
- }
-}
-
-my $count = 0;
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client_id = $i + 1;
-
- $j = $i % $num_servants;
-
- $CLS[$i] = new PerlACE::Process("client_main",
- "-i file://$iorfile[$j] ".
- "-k $client_kind ".
- "-n $client_id");
- $CLS[$i]->Spawn();
-}
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client = $CLS[$i]->WaitKill(60);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill(60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-#Delete ior files generated by this run.
-for ($i = 0; $i < $num_servants; $i++) {
- unlink $iorfile[$i];
-}
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/Broken/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/README b/TAO/tests/CSD_Strategy_Tests/README
deleted file mode 100644
index 4ab0940d42b..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/README
+++ /dev/null
@@ -1,117 +0,0 @@
-This directory contains tests for the Custom Servant Dispatching (CSD)
-feature implemented within TAO. Specifically, these tests use the reference
-implementation CSD Strategy, called the Thread Pool (TP) CSD Strategy.
-
-Each sub-directory should contain its own README file which describes the
-contents of the particular sub-directory in more detail. The following
-is a list of sub-directories located here under the
-$TAO_ROOT/tests/CSD_Strategy_Tests directory:
-
-TP_Test_Lib
------------
-
- This sub-directory contains source code used to build the
- "CSD_TP_Test" library (ie, libCSD_TP_Test.so). This library contains
- infrastructure code used by all of the CSD test applications. The
- purpose of this library is code re-use and ease of maintenance (ie,
- change/fix something in this library, and all applications using it
- will gain the benefit.)
-
-
-TP_Foo_A
---------
-
- This sub-directory contains source code used to build the
- "CSD_TP_Foo_A" library (ie, libCSD_TP_Foo_A.so). This library contains
- one IDL file which declares the "Foo_A" interface. All of the other
- source code in this library is used to support client and/or server
- applications that will use the Foo_A interface.
-
-
-TP_Foo_B
---------
-
- This sub-directory contains source code used to build the
- "CSD_TP_Foo_B" library (ie, libCSD_TP_Foo_B.so). This library contains
- one IDL file which declares the "Foo_B" interface. All of the other
- source code in this library is used to support client and/or server
- applications that will use the Foo_B interface.
-
-
-TP_Foo_C
---------
-
- This sub-directory contains source code used to build the
- "CSD_TP_Foo_C" library (ie, libCSD_TP_Foo_C.so). This library contains
- one IDL file which declares the "Foo_C" interface. All of the other
- source code in this library is used to support client and/or server
- applications that will use the Foo_C interface.
-
-
-TP_Test_1
----------
-
- This sub-directory contains source code that is used to build a
- client application and a server application. These applications
- make use of the Foo_A interface (see the TP_Foo_A directory).
- This particular pair of applications do not use all of the infrastructure
- types made available to them by the TP_Test_Lib.
-
- The TP_Test_1 application code is really more of an example than a test.
- Other test applications (ie, TP_Test_2) do the same thing as TP_Test_1,
- except that the other test applications take advantage of the
- infrastructure types provided by the TP_Test_Lib. Another big difference
- is that the TP_Test_1 does not perform any "actual" vs. "expected"
- results checking - and the other TP tests do perform these checks.
-
-
-TP_Test_2
----------
-
- This sub-directory contains source code that is used to build a
- client application and a server application. These applications
- make use of the Foo_A interface (see the TP_Foo_A directory).
-
- The Foo_A interface is a simple interface with just a few simple
- operations (both one-way and two-way).
-
- Each launched client application (ie, client process) represents a
- "remote" client of a Foo_A servant object that lives in a server
- process. The server application can be instructed, upon start up,
- to use any number of "collocated clients". Each collocated client is
- essentially a new thread in the server process that will perform the
- same logic that is performed by the remote client application.
-
-
-TP_Test_3
----------
-
- This sub-directory contains source code that is used to build a
- client application and a server application. These applications
- make use of the Foo_B interface (see the TP_Foo_B directory).
-
- The Foo_B interface has a rich set of operations, using a wide variety
- of argument types.
-
- The TP_Test_3 applications are nearly identical to their TP_Test_2
- counterparts, except for the fact that Foo_B is the interface type
- used in TP_Test_3, and Foo_A is the interface type used in TP_Test_2.
-
-
-TP_Test_4
----------
-
- This sub-directory contains source code that is used to build a
- client application and a server application. These applications
- make use of the Foo_C interface (see the TP_Foo_C directory).
-
- The Foo_C interface is a simple interface with just a few simple
- operations (both one-way and two-way). It is nearly (if not exactly)
- identical to the Foo_A interface.
-
- The TP_Test_4 applications are nearly identical to the TP_Test_2
- applications with one significant difference: the TP_Test_4 server
- application makes use of the "custom requests" feature provided by
- the CSD Thread Pool Strategy. These custom requests are performed
- by the collocated client code within the server application.
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp
deleted file mode 100644
index db2d1ec202e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// $Id$
-#include "AppHelper.h"
-
-void
-AppHelper::ref_to_file(CORBA::ORB_ptr orb,
- CORBA::Object_ptr obj,
- const char* filename
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var ior = orb->object_to_string(obj);
-
- FILE* ior_file = ACE_OS::fopen(filename, (const ACE_TCHAR *)("w"));
-
- if (ior_file == 0)
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Cannot open output file [%s] to write IOR.",
- filename));
- ACE_THROW (TestAppException());
- }
-
- ACE_OS::fprintf(ior_file, "%s", ior.in());
- ACE_OS::fclose(ior_file);
-}
-
-
-PortableServer::POA_ptr
-AppHelper::create_poa(const char* name,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr mgr,
- CORBA::PolicyList& policies
- ACE_ENV_ARG_DECL)
-{
- PortableServer::POA_var child_poa = root_poa->create_POA(name,
- mgr,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- if (CORBA::is_nil(child_poa.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to create child POA: %s.\n", name));
- ACE_THROW_RETURN (TestAppException(), PortableServer::POA::_nil ());
- }
-
- return child_poa._retn();
-}
-
-
-CORBA::Object_ptr
-AppHelper::activate_servant(PortableServer::POA_ptr poa,
- PortableServer::Servant servant
- ACE_ENV_ARG_DECL)
-{
- // Activate the servant using the Child POA.
- PortableServer::ObjectId_var oid
- = poa->activate_object(servant ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- CORBA::Object_var obj
- = poa->servant_to_reference(servant ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- if (CORBA::is_nil(obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to convert servant_to_ref.\n"));
- ACE_THROW_RETURN (TestAppException(), CORBA::Object::_nil ());
- }
-
- return obj._retn();
-}
-
-
-bool
-AppHelper::validate_connection (CORBA::Object_ptr obj)
-{
- for (CORBA::ULong j = 0; j != 100; ++j)
- {
- ACE_TRY_NEW_ENV
- {
-#if (TAO_HAS_CORBA_MESSAGING == 1)
- CORBA::PolicyList_var unused;
- obj->_validate_connection (unused
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#else
- obj->_is_a ("Not_An_IDL_Type"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_MESSAGING == 1 */
- return true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
- }
-
- return false;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h
deleted file mode 100644
index 06a6ac721a2..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// $Id$
-#ifndef APPHELPER_H
-#define APPHELPER_H
-
-#include "CSD_TP_Test_Export.h"
-#include "TestAppExceptionC.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/ORB.h"
-#include "ace/OS.h"
-#include "ace/Log_Msg.h"
-
-
-template <typename T>
-struct RefHelper
-{
- typedef typename T::_ptr_type T_ptr;
- typedef typename T::_var_type T_var;
-
- static T_ptr string_to_ref(CORBA::ORB_ptr orb,
- const char* ior
- ACE_ENV_ARG_DECL)
- {
- CORBA::Object_var obj = orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN(T::_nil ());
-
- if (CORBA::is_nil(obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to convert IOR string to obj ref.\n"));
- ACE_THROW_RETURN (TestAppException(), T::_nil ());
- }
-
- T_var t_obj = T::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN(T::_nil ());
-
- if (CORBA::is_nil(t_obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to narrow obj ref to T interface.\n"));
- ACE_THROW_RETURN (TestAppException(), T::_nil ());
- }
-
- return t_obj._retn();
- }
-
- static T_ptr resolve_initial_ref(CORBA::ORB_ptr orb,
- const char* name
- ACE_ENV_ARG_DECL)
- {
- CORBA::Object_var obj
- = orb->resolve_initial_references(name ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (T::_nil ());
-
- if (CORBA::is_nil(obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to resolve initial ref for '%s'.\n",
- name));
- ACE_THROW_RETURN (TestAppException(), T::_nil ());
- }
-
- T_var t_obj = T::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (T::_nil ());
-
-
- if (CORBA::is_nil(t_obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to narrow resolved initial ref '%s'.\n",
- name));
- ACE_THROW_RETURN (TestAppException(), T::_nil ());
- }
-
- return t_obj._retn();
- }
-
-};
-
-struct CSD_TP_Test_Export AppHelper
-{
-
- static void ref_to_file(CORBA::ORB_ptr orb,
- CORBA::Object_ptr obj,
- const char* filename
- ACE_ENV_ARG_DECL);
-
- static PortableServer::POA_ptr create_poa
- (const char* name,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr mgr,
- CORBA::PolicyList& policies
- ACE_ENV_ARG_DECL);
-
- static CORBA::Object_ptr activate_servant(PortableServer::POA_ptr poa,
- PortableServer::Servant servant
- ACE_ENV_ARG_DECL);
-
- // This helper method is used because there is a chance that the
- // initial CORBA request made to the target ORB will fail during
- // connection establishment with a TRANSIENT CORBA SystemException.
- // This occurs for some platforms (ie, windows) when several clients
- // make their initial CORBA request to the same ORB at the same time,
- // causing the ORB to attempt to handle several connection establishments
- // at one time. Apparently, under certain conditions, it will throw the
- // TRANSIENT exception to tell the client application to "try again later".
- // The analogy is making a phone call. Sometimes you get a busy tone.
- // This means "try again later".
- // This helper function will retry until the connection establishment
- // works - or until it decides that enough is enough.
- static bool validate_connection (CORBA::Object_ptr obj);
-};
-
-#endif
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.cpp
deleted file mode 100644
index 53dec90290a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_unistd.h"
-
-
-AppShutdown::AppShutdown()
- : num_clients_(0),
- num_clients_shutdown_(0)
-{
-}
-
-
-AppShutdown::~AppShutdown()
-{
-}
-
-
-void
-AppShutdown::init(CORBA::ORB_ptr orb,
- unsigned num_clients
- ACE_ENV_ARG_DECL)
-{
- if ((!CORBA::is_nil(this->orb_.in())) ||
- (CORBA::is_nil(orb)) ||
- (num_clients == 0))
- {
- // Already init()'ed, or bad argument values.
- ACE_THROW(TestAppException());
- }
- else
- {
- this->orb_ = CORBA::ORB::_duplicate(orb);
- this->num_clients_ = num_clients;
- this->num_clients_shutdown_ = 0;
- }
-}
-
-
-void
-AppShutdown::wait ()
-{
- this->orb_shutdown_task_.wait();
-}
-
-
-void
-AppShutdown::client_done()
-{
- if ((this->num_clients_ == 0) || (CORBA::is_nil(this->orb_.in())))
- {
- ACE_ERROR((LM_ERROR, "(%P|%t) AppShutdown was never initialized.\n"));
- return;
- }
-
- unsigned cur_shutdown;
-
- {
- GuardType guard(this->lock_);
- cur_shutdown = ++this->num_clients_shutdown_;
- }
-
- if (cur_shutdown == this->num_clients_)
- {
- // Sleep for one second before shutting down the ORB. This
- // is a poor-man version of "wait until the CSD request queue drains".
- ACE_OS::sleep(1);
- this->orb_shutdown_task_.orb(this->orb_.in());
- if (this->orb_shutdown_task_.open(0) != 0)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t) AppShutdown failed to create orb "\
- "shutdown thread.\n"));
- return;
- }
- }
-}
-
-
-AppShutdown*
-AppShutdown::instance ()
-{
- static AppShutdown app_shutdown;
- return &app_shutdown;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.h
deleted file mode 100644
index d79c2aababf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-#ifndef APP_SHUTDOWN_H
-#define APP_SHUTDOWN_H
-
-#include "CSD_TP_Test_Export.h"
-#include "OrbShutdownTask.h"
-#include "tao/ORB.h"
-
-class CSD_TP_Test_Export AppShutdown
-{
- public:
-
- AppShutdown();
- virtual ~AppShutdown();
-
- void init(CORBA::ORB_ptr orb,
- unsigned num_clients
- ACE_ENV_ARG_DECL);
-
- void wait ();
-
- void client_done();
-
- static AppShutdown* instance ();
-
- private:
-
- typedef ACE_SYNCH_MUTEX LockType;
- typedef ACE_Guard<LockType> GuardType;
-
- LockType lock_;
- CORBA::ORB_var orb_;
- unsigned num_clients_;
- unsigned num_clients_shutdown_;
-
- OrbShutdownTask orb_shutdown_task_;
-};
-
-
-#define TheAppShutdown AppShutdown::instance()
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Export.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Export.h
deleted file mode 100644
index 9ebd7dc8f34..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s CSD_TP_Test
-// ------------------------------
-#ifndef CSD_TP_TEST_EXPORT_H
-#define CSD_TP_TEST_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CSD_TP_TEST_HAS_DLL)
-# define CSD_TP_TEST_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CSD_TP_TEST_HAS_DLL */
-
-#if !defined (CSD_TP_TEST_HAS_DLL)
-# define CSD_TP_TEST_HAS_DLL 1
-#endif /* ! CSD_TP_TEST_HAS_DLL */
-
-#if defined (CSD_TP_TEST_HAS_DLL) && (CSD_TP_TEST_HAS_DLL == 1)
-# if defined (CSD_TP_TEST_BUILD_DLL)
-# define CSD_TP_Test_Export ACE_Proper_Export_Flag
-# define CSD_TP_TEST_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CSD_TP_TEST_BUILD_DLL */
-# define CSD_TP_Test_Export ACE_Proper_Import_Flag
-# define CSD_TP_TEST_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CSD_TP_TEST_BUILD_DLL */
-#else /* CSD_TP_TEST_HAS_DLL == 1 */
-# define CSD_TP_Test_Export
-# define CSD_TP_TEST_SINGLETON_DECLARATION(T)
-# define CSD_TP_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CSD_TP_TEST_HAS_DLL == 1 */
-
-// Set CSD_TP_TEST_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CSD_TP_TEST_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CSD_TP_TEST_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CSD_TP_TEST_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CSD_TP_TEST_NTRACE */
-
-#if (CSD_TP_TEST_NTRACE == 1)
-# define CSD_TP_TEST_TRACE(X)
-#else /* (CSD_TP_TEST_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CSD_TP_TEST_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CSD_TP_TEST_NTRACE == 1) */
-
-#endif /* CSD_TP_TEST_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib.mpc
deleted file mode 100644
index 453ea84a1f0..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib.mpc
+++ /dev/null
@@ -1,39 +0,0 @@
-//$Id$
-project : taolib_with_idl, csd_threadpool {
- sharedname = CSD_TP_Test
- dynamicflags = CSD_TP_TEST_BUILD_DLL
- idlflags += -Wb,export_macro=CSD_TP_Test_Export \
- -Wb,export_include=CSD_TP_Test_Export.h
- includes += $(TAO_ROOT)/tao
-
- IDL_Files {
- FooException.idl
- TestAppException.idl
- CancelledException.idl
- CustomException.idl
- }
-
- Source_Files {
- AppHelper.cpp
- AppShutdown.cpp
- ClientEngine.cpp
- ClientTask.cpp
- OrbRunner.cpp
- OrbTask.cpp
- TestAppBase.cpp
- StatisticsHelper.cpp
- OrbShutdownTask.cpp
- FooExceptionC.cpp
- FooExceptionS.cpp
- TestAppExceptionC.cpp
- TestAppExceptionS.cpp
- CancelledExceptionC.cpp
- CancelledExceptionS.cpp
- CustomExceptionC.cpp
- CustomExceptionS.cpp
- }
-
- Template_Files {
- ServantList_T.cpp
- }
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/CancelledException.idl b/TAO/tests/CSD_Strategy_Tests/TP_Common/CancelledException.idl
deleted file mode 100644
index 8f9afcf68de..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/CancelledException.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#ifndef CANCELAPPXCEPTION_IDL
-#define CANCELAPPXCEPTION_IDL
-
-exception CancelledException {};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.cpp
deleted file mode 100644
index 361bb3cd465..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-#include "ClientEngine.h"
-
-
-ClientEngine::ClientEngine()
-{
-}
-
-
-ClientEngine::~ClientEngine()
-{
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.h
deleted file mode 100644
index 3fdd3efd233..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef CLIENT_ENGINE_H
-#define CLIENT_ENGINE_H
-
-#include "CSD_TP_Test_Export.h"
-#include "tao/Intrusive_Ref_Count_Base_T.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-#include "tao/Environment.h"
-#include "ace/Synch.h"
-#include "ace/CORBA_macros.h"
-
-
-class ClientEngine;
-typedef TAO_Intrusive_Ref_Count_Handle<ClientEngine> ClientEngine_Handle;
-
-
-class CSD_TP_Test_Export ClientEngine : public TAO_Intrusive_Ref_Count_Base<ACE_SYNCH_MUTEX>
-{
- public:
-
- ClientEngine();
- virtual ~ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL) = 0;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.cpp
deleted file mode 100644
index 00d92a17608..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-#include "ClientTask.h"
-#include "ClientEngine.h"
-#include "AppShutdown.h"
-#include "ace/SString.h"
-
-
-ClientTask::ClientTask(bool shutdown_after_done)
-: shutdown_after_done_(shutdown_after_done),
- failure_count_(0)
-{
-}
-
-
-ClientTask::~ClientTask()
-{
-}
-
-
-void
-ClientTask::add_engine(ClientEngine* engine)
-{
- // Pass in false so that _add_ref() is called.
- ClientEngine_Handle engine_handle(engine,false);
- this->engines_.push_back(engine_handle);
-}
-
-
-int
-ClientTask::open(void*)
-{
- size_t num_threads = this->engines_.size();
-
- if (num_threads == 0)
- {
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) ClientTask cannot activate 0 threads.\n"),
- -1);
- }
-
- if (this->activate(THR_NEW_LWP | THR_JOINABLE, num_threads) != 0)
- {
- // Assumes that when activate returns non-zero return code that
- // no threads were activated.
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) ClientTask failed to activate "
- "the %d client threads.\n", num_threads),
- -1);
- }
-
- return 0;
-}
-
-
-int
-ClientTask::svc()
-{
- ClientEngine_Handle engine;
-
- {
- GuardType guard(this->lock_);
- this->engines_.get(engine, this->engines_.size() - 1);
- this->engines_.pop_back();
- }
-
- ACE_TRY_NEW_ENV
- {
- bool exec_ret = engine->execute(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (exec_ret == false)
- {
- GuardType guard(this->lock_);
- this->failure_count_ ++;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "ClientTask::svc Caught exception from execute():");
-
- GuardType guard(this->lock_);
- this->failure_count_ ++;
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) ClientTask::svc caught unknown (...) exception "\
- "in execute() " ));
- GuardType guard(this->lock_);
- this->failure_count_ ++;
- }
- ACE_ENDTRY;
-
- if(this->shutdown_after_done_)
- {
- // This is used to shutdown orb for a client application
- // with an orb running.
- TheAppShutdown->client_done ();
- }
-
- return 0;
-}
-
-
-int
-ClientTask::close(u_long)
-{
- return 0;
-}
-
-
-unsigned
-ClientTask::failure_count () const
-{
- return this->failure_count_;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.h
deleted file mode 100644
index cc3de7ec8a2..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ClientTask.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef CLIENT_TASK_H
-#define CLIENT_TASK_H
-
-#include "CSD_TP_Test_Export.h"
-#include "ClientEngine.h"
-#include "ace/Task.h"
-#include "ace/Vector_T.h"
-#include "ace/Synch.h"
-
-
-class CSD_TP_Test_Export ClientTask : public ACE_Task_Base
-{
- public:
-
- ClientTask(bool shutdown_after_done = false);
- virtual ~ClientTask();
-
- void add_engine(ClientEngine* engine);
-
- virtual int open(void* arg = 0);
- virtual int svc();
- virtual int close(u_long);
-
- unsigned failure_count () const;
-
- private:
-
- typedef ACE_SYNCH_MUTEX LockType;
- typedef ACE_Guard<LockType> GuardType;
-
- typedef ACE_Vector<ClientEngine_Handle> EngineVector;
-
- LockType lock_;
- EngineVector engines_;
- bool shutdown_after_done_;
- unsigned failure_count_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/CustomException.idl b/TAO/tests/CSD_Strategy_Tests/TP_Common/CustomException.idl
deleted file mode 100644
index 794900c41ce..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/CustomException.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#ifndef CUSTOMEXCEPTION_IDL
-#define CUSTOMEXCEPTION_IDL
-
-exception CustomException {};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/FooException.idl b/TAO/tests/CSD_Strategy_Tests/TP_Common/FooException.idl
deleted file mode 100644
index 4f76953e24c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/FooException.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#ifndef FOOEXCEPTION_IDL
-#define FOOEXCEPTION_IDL
-
-exception FooException {};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.cpp
deleted file mode 100644
index 0cc9c9bd5ad..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id$
-#include "OrbRunner.h"
-#include "OrbTask.h"
-#include "TestAppExceptionC.h"
-
-
-OrbRunner::OrbRunner(CORBA::ORB_ptr orb, unsigned num_orb_threads)
- : orb_(CORBA::ORB::_duplicate(orb)),
- num_orb_threads_(num_orb_threads)
-{
-}
-
-
-OrbRunner::~OrbRunner()
-{
-}
-
-
-void
-OrbRunner::run(ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_ASSERT(this->num_orb_threads_ > 0);
-
- // If the num_orb_threads_ is exactly one, then just use the current
- // (mainline) thread to run the ORB event loop.
- if (this->num_orb_threads_ == 1)
- {
- // Since the num_orb_threads_ is exactly one, we just use the current
- // (mainline) thread to run the ORB event loop.
- this->orb_->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- // The num_orb_threads_ is greater than 1, so we will use an OrbTask
- // (active object) to run the ORB event loop in (num_orb_threads_ - 1)
- // threads. We use the current (mainline) thread as the other thread
- // running the ORB event loop.
- OrbTask orb_task(this->orb_.in(), this->num_orb_threads_ - 1);
-
- // Activate the OrbTask worker threads
- if (orb_task.open(0) != 0)
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to open the OrbTask.\n"));
- ACE_THROW(TestAppException());
- }
-
- // This will use the current (mainline) thread to run the ORB event loop.
- this->orb_->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Now that the current thread has unblocked from running the orb,
- // make sure to wait for all of the worker threads to complete.
- orb_task.wait();
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.h
deleted file mode 100644
index 71c7c4e358c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-#ifndef ORB_RUNNER_H
-#define ORB_RUNNER_H
-
-#include "CSD_TP_Test_Export.h"
-#include "tao/ORB.h"
-
-class CSD_TP_Test_Export OrbRunner
-{
- public:
-
- OrbRunner(CORBA::ORB_ptr orb, unsigned num_orb_threads = 1);
- virtual ~OrbRunner();
-
- void run(ACE_ENV_SINGLE_ARG_DECL);
-
-
- private:
-
- CORBA::ORB_var orb_;
- unsigned num_orb_threads_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.cpp
deleted file mode 100644
index 79ba1ba3f5e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file OrbShutdownTask.cpp
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#include "OrbShutdownTask.h"
-#include "ace/CORBA_macros.h"
-#include "ace/OS_NS_unistd.h"
-
-
-OrbShutdownTask::OrbShutdownTask()
-{
-}
-
-
-OrbShutdownTask::~OrbShutdownTask()
-{
-}
-
-
-void
-OrbShutdownTask::orb(CORBA::ORB_ptr orb)
-{
- this->orb_ = CORBA::ORB::_duplicate(orb);
-}
-
-
-int
-OrbShutdownTask::open(void*)
-{
- if (this->activate(THR_NEW_LWP | THR_JOINABLE, 1) != 0)
- {
- // Assumes that when activate returns non-zero return code that
- // no threads were activated.
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbShutdownTask failed to open().\n"),
- -1);
- }
-
- return 0;
-}
-
-
-int
-OrbShutdownTask::svc()
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Exception raised by ORB::shutdown() call "
- "in OrbShutdownTask::svc().\n"));
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
-int
-OrbShutdownTask::close(u_long)
-{
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.h
deleted file mode 100644
index 221251a7d3f..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file OrbShutdownTask.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef ORB_SHUTDOWN_TASK_H
-#define ORB_SHUTDOWN_TASK_H
-
-#include "CSD_TP_Test_Export.h"
-#include "ace/Task.h"
-#include "tao/ORB.h"
-
-
-class CSD_TP_Test_Export OrbShutdownTask : public ACE_Task_Base
-{
- public:
-
- OrbShutdownTask();
- virtual ~OrbShutdownTask();
-
- void orb(CORBA::ORB_ptr orb);
-
- virtual int open(void*);
- virtual int svc();
- virtual int close(u_long);
-
-
- private:
-
- CORBA::ORB_var orb_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.cpp
deleted file mode 100644
index ff6ad717898..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file OrbTask.cpp
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#include "OrbTask.h"
-#include "ace/CORBA_macros.h"
-
-namespace { enum { MAX_ORB_TASK_WORKER_THREADS = 20 }; }
-
-
-OrbTask::OrbTask(CORBA::ORB_ptr orb, unsigned num_threads)
- : orb_(CORBA::ORB::_duplicate(orb)),
- num_threads_(num_threads)
-{
-}
-
-
-OrbTask::~OrbTask()
-{
-}
-
-
-int
-OrbTask::open(void*)
-{
- if (this->num_threads_ < 1)
- {
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbTask failed to open. "
- "num_threads_ (%d) is less-than 1.\n",
- this->num_threads_),
- -1);
- }
-
- if (this->num_threads_ > MAX_ORB_TASK_WORKER_THREADS)
- {
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbTask failed to open. "
- "num_threads_ (%d) is too large. Max is %d.\n",
- this->num_threads_, MAX_ORB_TASK_WORKER_THREADS),
- -1);
- }
-
- if (CORBA::is_nil(this->orb_.in()))
- {
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbTask failed to open. "
- "ORB object reference is nil.\n"),
- -1);
- }
-
- if (this->activate(THR_NEW_LWP | THR_JOINABLE, this->num_threads_) != 0)
- {
- // Assumes that when activate returns non-zero return code that
- // no threads were activated.
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbTask failed to activate "
- "(%d) worker threads.\n",
- this->num_threads_),
- -1);
- }
-
- return 0;
-}
-
-
-int
-OrbTask::svc()
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Exception raised by ORB::run() method. "
- "OrbTask is stopping.\n"));
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
-int
-OrbTask::close(u_long)
-{
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.h
deleted file mode 100644
index dc01e3ca191..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file OrbTask.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef ORB_TASK_H
-#define ORB_TASK_H
-
-#include "CSD_TP_Test_Export.h"
-#include "ace/Task.h"
-#include "tao/ORB.h"
-
-class CSD_TP_Test_Export OrbTask : public ACE_Task_Base
-{
- public:
-
- OrbTask(CORBA::ORB_ptr orb, unsigned num_threads = 1);
- virtual ~OrbTask();
-
- virtual int open(void* x = 0);
- virtual int svc();
- virtual int close(u_long);
-
-
- private:
-
- CORBA::ORB_var orb_;
- unsigned num_threads_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.cpp
deleted file mode 100644
index 2727c975253..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// $Id$
-#include "ServantList_T.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-
-
-template <typename T>
-ServantList<T>::ServantList()
-{
-}
-
-
-template <typename T>
-ServantList<T>::~ServantList()
-{
-}
-
-
-template <typename T>
-void
-ServantList<T>::create_and_activate(unsigned num_servants,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- const char* ior_fname_prefix
- ACE_ENV_ARG_DECL)
-{
- for (unsigned i = 0; i < num_servants; i++)
- {
- char buf[32];
- ACE_OS::sprintf(buf, "%02d", i + 1);
- ACE_CString filename = ACE_CString(ior_fname_prefix) + "_" + buf + ".ior";
- ServantRecord record;
- record.servant_ = new T();
- record.safe_servant_ = record.servant_;
-
- CORBA::Object_var obj
- = AppHelper::activate_servant(poa,
- record.safe_servant_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- AppHelper::ref_to_file(orb, obj.in(), filename.c_str() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- record.obj_ = T_stub::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(record.obj_.in()))
- {
- ACE_THROW (TestAppException());
- }
-
- this->servant_records_.push_back(record);
- }
-}
-
-
-template <typename T>
-void
-ServantList<T>::create_and_activate(unsigned num_servants,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
-{
- for (unsigned i = 0; i < num_servants; i++)
- {
- ServantRecord record;
- record.servant_ = new T();
- record.safe_servant_ = record.servant_;
-
- CORBA::Object_var obj
- = AppHelper::activate_servant(poa,
- record.safe_servant_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- record.obj_ = T_stub::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(record.obj_.in()))
- {
- ACE_THROW (TestAppException());
- }
-
- this->servant_records_.push_back(record);
- }
-}
-
-
-// Code for reference - doesn't work right now
-#if 0
-template <typename T>
-void
-ServantList<T>::deactivate(PortableServer::POA_ptr poa)
-{
- ServantRecord record;
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableServer::ObjectId_var id =
- poa->servant_to_id(record.safe_servant_.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- poa->deactivate_object(id.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "ServantList_T::deactivate_servant ()");
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)ServantList_T::deactivate_servant "
- "Caught unknown exception \n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-#endif
-
-
-template <typename T>
-typename ServantList<T>::T_stub_ptr
-ServantList<T>::objref(unsigned index)
-{
- return T_stub::_duplicate(this->servant_records_[index].obj_.in());
-}
-
-
-template <typename T>
-T*
-ServantList<T>::servant(unsigned index)
-{
- return this->servant_records_[index].servant_;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.h
deleted file mode 100644
index 3cc61e42905..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// $Id$
-#ifndef SERVANTLIST_T_H
-#define SERVANTLIST_T_H
-
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/PortableServer/Servant_Base.h"
-#include "ace/Vector_T.h"
-
-
-// The T type is a concrete servant type.
-template <class T>
-class ServantList
-{
- public:
-
- typedef typename T::_stub_type T_stub;
- typedef typename T::_stub_ptr_type T_stub_ptr;
- typedef typename T::_stub_var_type T_stub_var;
-
- ServantList();
- ~ServantList();
-
- /// Activate servant and output ior to a file.
- void create_and_activate(unsigned num_servants,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- const char* ior_fname_prefix
- ACE_ENV_ARG_DECL);
-
- /// Activate servant and not output ior to a file.
- void create_and_activate(unsigned num_servants,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- // Code not used and not working right now - possible future addition.
- //void deactivate(PortableServer::POA_ptr poa);
-
- /// Get a (copy) of one of the object references (for a specific servant).
- T_stub_ptr objref(unsigned index);
- /// This doesn't return a copy.
- T* servant(unsigned index);
-
-
- private:
-
- struct ServantRecord
- {
- T* servant_;
- PortableServer::ServantBase_var safe_servant_;
- T_stub_var obj_;
- };
-
- typedef ACE_Vector<ServantRecord> ServantRecordVector;
-
- ServantRecordVector servant_records_;
-};
-
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ServantList_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("ServantList_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* SERVANTLIST_T_H */
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.cpp
deleted file mode 100644
index 456d7025478..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id$
-#include "StatisticsHelper.h"
-
-// swap function for integers
-void swap ( CORBA::Long& x, CORBA::Long& y )
-{
- CORBA::Long temp;
- temp = x;
- x = y;
- y = temp;
-}
-
-
-void sort ( LongVector & vector )
-{
- unsigned size = vector.size ();
-
- if (size > 0)
- {
- unsigned indexOfMin;
- unsigned pass;
- unsigned j;
-
- for ( pass = 0; pass < size - 1; pass++ )
- {
- indexOfMin = pass;
-
- for ( j = pass + 1; j < size; j++ )
- if ( vector[j] < vector[indexOfMin] )
- indexOfMin = j;
-
- swap ( vector[pass], vector[indexOfMin] );
- }
- }
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.h
deleted file mode 100644
index 7f26a4ae165..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-#ifndef STATISTICS_HELPER_H
-#define STATISTICS_HELPER_H
-
-#include "CSD_TP_Test_Export.h"
-#include "tao/Basic_Types.h"
-#include "ace/Array.h"
-#include "ace/Vector_T.h"
-#include "ace/SString.h"
-
-
-typedef ACE_Vector< CORBA::Long, 1000 > LongVector;
-typedef ACE_Vector< ACE_CString, 1000 > StringVector;
-typedef ACE_Array< CORBA::Long > LongArray;
-
-
-extern CSD_TP_Test_Export
-void swap ( CORBA::Long& x, CORBA::Long& y );
-
-extern CSD_TP_Test_Export
-void sort ( LongVector & vector );
-
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.cpp
deleted file mode 100644
index f2a2e97b7a2..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-#include "TestAppBase.h"
-
-TestAppBase::TestAppBase(const char* name)
- : name_(name)
-{
-}
-
-
-TestAppBase::~TestAppBase()
-{
-}
-
-
-const char*
-TestAppBase::name() const
-{
- return this->name_.c_str();
-}
-
-
-int
-TestAppBase::run(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int rc = this->run_i(argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Convert 1 to 0. Leave 0 and -1 as they are.
- return (rc == 1) ? 0 : rc;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.h
deleted file mode 100644
index 5138ffbf84c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id$
-#ifndef TESTAPPBASE_H
-#define TESTAPPBASE_H
-
-#include "CSD_TP_Test_Export.h"
-#include "ace/SString.h"
-#include "tao/Environment.h"
-#include "ace/CORBA_macros.h"
-
-
-class CSD_TP_Test_Export TestAppBase
-{
- public:
-
- virtual ~TestAppBase();
-
- // Returns 0 for success, and -1 for failure.
- int run(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
- const char* name() const;
-
-
- protected:
-
- TestAppBase(const char* name);
-
- // Returns -1 for failure, 0 for success
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL) = 0;
-
-
- private:
-
- ACE_CString name_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppException.idl b/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppException.idl
deleted file mode 100644
index 2ac53939b77..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppException.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#ifndef TESTAPPXCEPTION_IDL
-#define TESTAPPXCEPTION_IDL
-
-exception TestAppException {};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppMain.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppMain.h
deleted file mode 100644
index 062b6fc0c8e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppMain.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id$
-#ifndef TESTAPPMAIN_H
-#define TESTAPPMAIN_H
-
-#include "ace/Log_Msg.h"
-#include "ace/SString.h"
-#include "tao/Exception.h"
-#include "tao/Environment.h"
-
-#define TEST_APP_MAIN(APP_TYPE) \
-int \
-main(int argc, char* argv[]) \
-{ \
- ACE_LOG_MSG->priority_mask(LM_TRACE | \
- LM_DEBUG | \
- LM_INFO | \
- LM_NOTICE | \
- LM_WARNING | \
- LM_ERROR | \
- LM_CRITICAL | \
- LM_ALERT | \
- LM_EMERGENCY, \
- ACE_Log_Msg::PROCESS); \
-\
- APP_TYPE app; \
-\
- ACE_TRY_NEW_ENV \
- { \
- int ret = app.run(argc,argv ACE_ENV_ARG_PARAMETER); \
- ACE_TRY_CHECK; \
- return ret; \
- } \
- ACE_CATCHANY \
- { \
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, \
- "Caught exception:"); \
- } \
- ACE_CATCHALL \
- { \
- ACE_ERROR((LM_ERROR, \
- "(%P|%t) Unknown (...) exception caught in main() " \
- "for App [%d].\n", app.name())); \
- } \
- ACE_ENDTRY; \
- \
- return 1; \
-}
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/CSD_TP_Foo_A_Export.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/CSD_TP_Foo_A_Export.h
deleted file mode 100644
index 9b855c486d8..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/CSD_TP_Foo_A_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s CSD_TP_Foo_A
-// ------------------------------
-#ifndef CSD_TP_FOO_A_EXPORT_H
-#define CSD_TP_FOO_A_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CSD_TP_FOO_A_HAS_DLL)
-# define CSD_TP_FOO_A_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CSD_TP_FOO_A_HAS_DLL */
-
-#if !defined (CSD_TP_FOO_A_HAS_DLL)
-# define CSD_TP_FOO_A_HAS_DLL 1
-#endif /* ! CSD_TP_FOO_A_HAS_DLL */
-
-#if defined (CSD_TP_FOO_A_HAS_DLL) && (CSD_TP_FOO_A_HAS_DLL == 1)
-# if defined (CSD_TP_FOO_A_BUILD_DLL)
-# define CSD_TP_Foo_A_Export ACE_Proper_Export_Flag
-# define CSD_TP_FOO_A_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_A_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CSD_TP_FOO_A_BUILD_DLL */
-# define CSD_TP_Foo_A_Export ACE_Proper_Import_Flag
-# define CSD_TP_FOO_A_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_A_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CSD_TP_FOO_A_BUILD_DLL */
-#else /* CSD_TP_FOO_A_HAS_DLL == 1 */
-# define CSD_TP_Foo_A_Export
-# define CSD_TP_FOO_A_SINGLETON_DECLARATION(T)
-# define CSD_TP_FOO_A_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CSD_TP_FOO_A_HAS_DLL == 1 */
-
-// Set CSD_TP_FOO_A_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CSD_TP_FOO_A_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CSD_TP_FOO_A_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CSD_TP_FOO_A_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CSD_TP_FOO_A_NTRACE */
-
-#if (CSD_TP_FOO_A_NTRACE == 1)
-# define CSD_TP_FOO_A_TRACE(X)
-#else /* (CSD_TP_FOO_A_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CSD_TP_FOO_A_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CSD_TP_FOO_A_NTRACE == 1) */
-
-#endif /* CSD_TP_FOO_A_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A.idl b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A.idl
deleted file mode 100644
index e9f3b0345f8..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-#ifndef FOO_A_IDL
-#define FOO_A_IDL
-
-#include "FooException.idl"
-
-interface Foo_A
-{
- /// void return-type, no arguments
- void op1();
-
- /// void return-type, 1 "in" argument
- void op2(in long value);
-
- /// long return-type, 1 "in" argument
- long op3(in long value);
-
- /// one-way version of op2
- oneway void op4(in long value);
-
- /// Operation that always raises an exception.
- void op5() raises (FooException);
-
- /// Client calls this last. The last client to claim that it is
- /// done will cause the server to shutdown.
- void done();
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.cpp
deleted file mode 100644
index bb0d1cf1bf7..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// $Id$
-#include "Foo_A_ClientEngine.h"
-#include "Foo_A_Statistics.h"
-#include "TestAppExceptionC.h"
-#include "AppHelper.h"
-#include "ace/Log_Msg.h"
-
-Foo_A_ClientEngine::Foo_A_ClientEngine(Foo_A_ptr obj,
- unsigned client_id,
- bool collocated)
- : obj_(Foo_A::_duplicate(obj)),
- client_id_ (client_id),
- collocated_ (collocated)
-{
-}
-
-
-Foo_A_ClientEngine::~Foo_A_ClientEngine()
-{
-}
-
-
-bool
-Foo_A_ClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Make sure the connection is established before making
- // remote invocations.
- if (AppHelper::validate_connection (this->obj_.in ()) == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_ClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- // Verify the return values and return the results.
- bool check_validity = true;
-
- CORBA::Long i = this->client_id_;
-
- this->obj_->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->op2(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- CORBA::Long value = this->obj_->op3(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (value != i)
- {
- check_validity = false;
- }
-
- for (CORBA::Long j = 1; j <= 5; j++)
- {
- this->obj_->op4(495 + (i * 5) + j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- bool caught_exception = false;
-
- ACE_TRY
- {
- this->obj_->op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (FooException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- this->obj_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_A_ClientEngine::expected_results(Foo_A_Statistics& stats)
-{
- stats.expected(1, 1);
- stats.expected(2, 1);
- stats.expected(3, 1);
- stats.expected(4, 5);
- stats.expected(5, 1);
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.h
deleted file mode 100644
index 4f49888f34f..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_A_ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_A_CLIENT_ENGINE_H
-#define FOO_A_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_A_Export.h"
-#include "ClientEngine.h"
-#include "Foo_AC.h"
-
-class Foo_A_Statistics;
-
-class CSD_TP_Foo_A_Export Foo_A_ClientEngine : public ClientEngine
-{
- public:
-
- Foo_A_ClientEngine(Foo_A_ptr obj, unsigned client_id = 0, bool collocated = false);
- virtual ~Foo_A_ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_A_Statistics& stats);
-
- private:
-
- Foo_A_var obj_;
- unsigned client_id_;
- bool collocated_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.cpp
deleted file mode 100644
index 1ef8ce83cd7..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-// $Id$
-#include "Foo_A_Statistics.h"
-#include "Foo_A_ClientEngine.h"
-
-Foo_A_Statistics::Foo_A_Statistics(unsigned num_clients)
-: num_clients_ (num_clients)
-{
- for (unsigned i = 0; i < 5; i++)
- {
- this->expected_[i] = 0;
- this->actual_[i] = 0;
- }
-}
-
-
-Foo_A_Statistics::~Foo_A_Statistics()
-{
-}
-
-
-void
-Foo_A_Statistics::expected(unsigned op_num, unsigned count)
-{
- this->expected_[op_num-1] = count * this->num_clients_;
-}
-
-
-void
-Foo_A_Statistics::actual(unsigned op_num, unsigned count)
-{
- this->actual_[op_num-1] += count;
-}
-
-
-void
-Foo_A_Statistics::actual_in_values(unsigned op_num, LongVector lv)
-{
- size_t sz = lv.size();
- for (size_t i = 0; i < sz; i++)
- {
- this->actual_in_values_[op_num-1].push_back (lv[i]);
- }
-}
-
-
-bool
-Foo_A_Statistics::actual_vs_expected()
-{
- Foo_A_Statistics stats (1);
- Foo_A_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < 5; i++)
- {
- if (this->expected_[i] != this->actual_[i])
- {
- return false;
- }
-
- // Verify the "in" values.
- // Skip op1/op5 since they do not have any "in" values.
- if (i % 5 == 0 || i % 5 == 4)
- {
- continue;
- }
-
- unsigned actual_size
- = this->actual_in_values_[i].size ();
- unsigned expected_size
- = this->num_clients_ * stats.expected_[i];
- if (actual_size != expected_size)
- {
- return false;
- }
- sort (this->actual_in_values_[i]);
-
- for (unsigned j = 0; j < actual_size - 1; j++)
- {
- if (this->actual_in_values_[i][j] != this->actual_in_values_[i][j + 1] - 1)
- {
- return false;
- }
- }
- }
- return true;
-}
-
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.h
deleted file mode 100644
index d5bf9ea2c71..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id$
-#ifndef STATISTICS_A_H
-#define STATISTICS_A_H
-
-#include "CSD_TP_Foo_A_Export.h"
-#include "StatisticsHelper.h"
-
-
-class CSD_TP_Foo_A_Export Foo_A_Statistics
-{
- public:
-
- Foo_A_Statistics(unsigned num_clients);
-
- virtual ~Foo_A_Statistics();
-
- void expected(unsigned op_num, unsigned count);
- void actual(unsigned op_num, unsigned count);
- void actual_in_values(unsigned op_num, LongVector lv);
-
- bool actual_vs_expected();
-
-
- private:
-
- unsigned num_clients_;
-
- unsigned expected_[5];
- unsigned actual_[5];
-
- LongVector actual_in_values_ [5];
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.cpp
deleted file mode 100644
index a3bab7748aa..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// $Id$
-#include "Foo_A_i.h"
-#include "AppShutdown.h"
-
-
-Foo_A_i::Foo_A_i()
-{
- for (unsigned i = 0; i < 5; i++)
- {
- this->op_count_[i] = 0;
- }
-}
-
-
-Foo_A_i::~Foo_A_i()
-{
-}
-
-
-void
-Foo_A_i::op1(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[0] ++;
-}
-
-
-void
-Foo_A_i::op2(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[1].push_back (value);
- this->op_count_[1] ++;
-}
-
-
-CORBA::Long
-Foo_A_i::op3(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[2].push_back (value);
- this->op_count_[2] ++;
- return value;
-}
-
-
-void
-Foo_A_i::op4(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[3].push_back (value);
- this->op_count_[3] ++;
-}
-
-
-void
-Foo_A_i::op5(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException, FooException))
-{
- this->op_count_[4] ++;
- ACE_THROW (FooException());
-}
-
-
-void
-Foo_A_i::done(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- TheAppShutdown->client_done();
-}
-
-
-void
-Foo_A_i::gather_stats(Foo_A_Statistics& stats)
-{
- for (unsigned i = 0; i < 5; i++)
- {
- stats.actual (i + 1, this->op_count_[i]);
- stats.actual_in_values (i + 1, this->in_values_[i]);
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.h
deleted file mode 100644
index 6361baa6ca7..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id$
-#ifndef FOO_A_I_H
-#define FOO_A_I_H
-
-#include "CSD_TP_Foo_A_Export.h"
-#include "Foo_AS.h"
-#include "Foo_A_Statistics.h"
-
-
-class CSD_TP_Foo_A_Export Foo_A_i : public virtual POA_Foo_A
-{
- public:
-
- Foo_A_i();
- virtual ~Foo_A_i();
-
- virtual void op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op2(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual CORBA::Long op3(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op4(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException, FooException));
-
- virtual void done(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- void gather_stats (Foo_A_Statistics& stats) ;
-
- private:
-
- LongVector in_values_ [5];
- unsigned op_count_ [5];
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/csd_tp_foo_a_lib.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/csd_tp_foo_a_lib.mpc
deleted file mode 100644
index 7f2027a9f5d..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/csd_tp_foo_a_lib.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-//$Id$
-project : csd_tp_test_lib {
- sharedname = CSD_TP_Foo_A
- dynamicflags = CSD_TP_FOO_A_BUILD_DLL
- idlflags += -Wb,export_macro=CSD_TP_Foo_A_Export -Wb,export_include=CSD_TP_Foo_A_Export.h
- includes += $(TAO_ROOT)/tao
-
- IDL_Files {
- Foo_A.idl
- }
-
- Source_Files {
- Foo_AC.cpp
- Foo_AS.cpp
- Foo_A_ClientEngine.cpp
- Foo_A_i.cpp
- Foo_A_Statistics.cpp
- }
-
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/CSD_TP_Foo_B_Export.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/CSD_TP_Foo_B_Export.h
deleted file mode 100644
index c6e2f4cd967..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/CSD_TP_Foo_B_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s CSD_TP_Foo_B
-// ------------------------------
-#ifndef CSD_TP_FOO_B_EXPORT_H
-#define CSD_TP_FOO_B_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CSD_TP_FOO_B_HAS_DLL)
-# define CSD_TP_FOO_B_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CSD_TP_FOO_B_HAS_DLL */
-
-#if !defined (CSD_TP_FOO_B_HAS_DLL)
-# define CSD_TP_FOO_B_HAS_DLL 1
-#endif /* ! CSD_TP_FOO_B_HAS_DLL */
-
-#if defined (CSD_TP_FOO_B_HAS_DLL) && (CSD_TP_FOO_B_HAS_DLL == 1)
-# if defined (CSD_TP_FOO_B_BUILD_DLL)
-# define CSD_TP_Foo_B_Export ACE_Proper_Export_Flag
-# define CSD_TP_FOO_B_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_B_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CSD_TP_FOO_B_BUILD_DLL */
-# define CSD_TP_Foo_B_Export ACE_Proper_Import_Flag
-# define CSD_TP_FOO_B_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_B_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CSD_TP_FOO_B_BUILD_DLL */
-#else /* CSD_TP_FOO_B_HAS_DLL == 1 */
-# define CSD_TP_Foo_B_Export
-# define CSD_TP_FOO_B_SINGLETON_DECLARATION(T)
-# define CSD_TP_FOO_B_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CSD_TP_FOO_B_HAS_DLL == 1 */
-
-// Set CSD_TP_FOO_B_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CSD_TP_FOO_B_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CSD_TP_FOO_B_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CSD_TP_FOO_B_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CSD_TP_FOO_B_NTRACE */
-
-#if (CSD_TP_FOO_B_NTRACE == 1)
-# define CSD_TP_FOO_B_TRACE(X)
-#else /* (CSD_TP_FOO_B_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CSD_TP_FOO_B_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CSD_TP_FOO_B_NTRACE == 1) */
-
-#endif /* CSD_TP_FOO_B_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback.idl b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback.idl
deleted file mode 100644
index 49be42260cb..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-#ifndef CALLBACK_IDL
-#define CALLBACK_IDL
-
-interface Callback
-{
- void test_method();
-};
-
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.cpp
deleted file mode 100644
index 8438b572ce2..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-#include "Callback_i.h"
-
-Callback_i::Callback_i()
- : num_callbacks_(0)
-{
-}
-
-
-Callback_i::~Callback_i ()
-{
-}
-
-
-void
-Callback_i::test_method(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->num_callbacks_ ++;
-}
-
-
-void
-Callback_i::gather_stats(Foo_B_Statistics& stats)
-{
- stats.actual_callbacks(this->num_callbacks_);
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.h
deleted file mode 100644
index 8948435ceed..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id$
-#ifndef CALLBACK_I_H
-#define CALLBACK_I_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "CallbackS.h"
-#include "Foo_B_Statistics.h"
-
-
-class CSD_TP_Foo_B_Export Callback_i
- : public virtual POA_Callback
-{
- public:
-
- Callback_i();
-
- virtual ~Callback_i();
-
- virtual void test_method(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- void gather_stats(Foo_B_Statistics& stats);
-
-
- private:
-
- unsigned num_callbacks_;
-};
-
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B.idl b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B.idl
deleted file mode 100644
index 2b6b7382fab..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B.idl
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id$
-#ifndef FOO_B_IDL
-#define FOO_B_IDL
-
-#include "FooException.idl"
-#include "Callback.idl"
-
-
-typedef sequence<char, 32> Bounded_Var_Size;
-typedef sequence<char> Unbounded_Var_Size;
-typedef long Fixed_Array[20];
-typedef string Var_Array [3];
-
-struct TimeOfDay {
- short hour; // 0 - 23
- short minute; // 0 - 59
- short second; // 0 - 59
-};
-interface Foo_B
-{
- /// void return-type, no arguments
- void op1();
-
- /// void return-type, 1 "in" argument
- void op2(in long value);
-
- /// long return-type, 1 "in" argument
- long op3(in long value);
-
- /// one-way version of op2
- oneway void op4(in long value);
-
- /// Operation that always raises an exception.
- void op5() raises (FooException);
-
- /// Test fixed size "in" argument and the "inout" parameter.
- boolean op6(in TimeOfDay t,
- inout string message);
-
- /// Callback test.
-
- /// Pass the callback object and the server invoke operation on
- /// the callback object reference.
- void op7 (in Callback cb) raises (FooException);
-
- oneway void test_unbounded_string_arg(in string message);
-
- oneway void test_bounded_string_arg(in string<20> message);
-
- oneway void test_fixed_array_arg(in Fixed_Array message);
-
- oneway void test_var_array_arg(in Var_Array messages);
-
- oneway void test_bounded_var_size_arg(in Bounded_Var_Size message);
-
- oneway void test_unbounded_var_size_arg(in Unbounded_Var_Size message);
-
- oneway void test_fixed_size_arg (in TimeOfDay t);
-
- oneway void test_special_basic_arg(in boolean value, in long client_id);
-
- oneway void test_objref_arg (in Callback cb);
-
- /// Client calls this last. The last client to claim that it is
- /// done will cause the server to shutdown.
- void done();
-};
-
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.cpp
deleted file mode 100644
index 93f48ae9055..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-// $Id$
-#include "Foo_B_ClientEngine.h"
-#include "Callback_i.h"
-#include "Foo_B_Statistics.h"
-#include "TestAppExceptionC.h"
-#include "AppHelper.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS.h"
-
-const char* ONEWAY_ARG_TEST_STR = "TEST";
-
-Foo_B_ClientEngine::Foo_B_ClientEngine(Foo_B_ptr obj,
- Callback_ptr callback,
- unsigned client_id,
- bool collocated)
- : obj_(Foo_B::_duplicate(obj)),
- callback_(Callback::_duplicate(callback)),
- client_id_(client_id),
- collocated_(collocated)
-{
-}
-
-
-Foo_B_ClientEngine::~Foo_B_ClientEngine()
-{
-}
-
-
-bool
-Foo_B_ClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Make sure the connection is established before making
- // remote invocations.
- if (AppHelper::validate_connection (this->obj_.in ()) == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_ClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- // Verify the return values and return the results.
- bool check_validity = true;
-
- this->obj_->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->op2(this->client_id_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- CORBA::Long value = this->obj_->op3(this->client_id_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (value != static_cast<CORBA::Long>(this->client_id_))
- {
- check_validity = false;
- }
-
- for (CORBA::ULong j = 1; j <= 5; j++)
- {
- this->obj_->op4(495 + (this->client_id_ * 5) + j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- bool caught_exception = false;
-
- ACE_TRY
- {
- this->obj_->op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (FooException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- TimeOfDay t;
- t.hour = 12;
- t.minute = 30;
- t.second = 10;
-
- char test_str [20];
- ACE_OS::sprintf (test_str, "%d %s", this->client_id_, ONEWAY_ARG_TEST_STR);
-
- char buffer [20];
-
- // Two-Way calls with "inout" and fixed size "in" arguments.
- CORBA::String_var message = CORBA::string_dup(test_str);
-
- CORBA::Boolean result = this->obj_->op6( t, message.inout() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- ACE_UNUSED_ARG(result);
-
- ACE_OS::sprintf (buffer, "%d %s %d:%d:%d", this->client_id_, ONEWAY_ARG_TEST_STR,
- t.hour, t.minute, t.second);
-
- if (ACE_OS::strncmp (message.in (), buffer, ACE_OS::strlen (buffer)) != 0)
- {
- check_validity = false;
- }
-
- // Callback test.
- this->obj_->op7 (this->callback_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- // One-Way calls with various arguments.
- CORBA::String_var ub_string = CORBA::string_dup( test_str );
- this->obj_->test_unbounded_string_arg (ub_string.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- CORBA::String_var bd_string = CORBA::string_dup( test_str );
- this->obj_->test_bounded_string_arg (bd_string.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- Fixed_Array fixed_array;
-
- for (CORBA::ULong m = 0 ; m < 20; m ++)
- {
- fixed_array[m] = this->client_id_ + m;
- }
-
- this->obj_->test_fixed_array_arg (fixed_array ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- Var_Array var_array;
-
- for (CORBA::ULong k = 0; k < 3; k++)
- {
- ACE_OS::sprintf (buffer, "%d %s %d",
- this->client_id_, ONEWAY_ARG_TEST_STR, k);
- var_array[k] = CORBA::string_dup(buffer);
- }
-
- this->obj_->test_var_array_arg (var_array ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- Bounded_Var_Size_var bd_var_size_string = new Bounded_Var_Size();
-
- bd_var_size_string->replace (bd_var_size_string->maximum (),
- ACE_OS::strlen (test_str) + 1,
- test_str);
- this->obj_->test_bounded_var_size_arg (bd_var_size_string.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- Unbounded_Var_Size_var ub_var_size_string = new Unbounded_Var_Size(100);
- ub_var_size_string->replace (ub_var_size_string->maximum (),
- ACE_OS::strlen (test_str) + 1,
- test_str);
- this->obj_->test_unbounded_var_size_arg (ub_var_size_string.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->test_fixed_size_arg (t ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->test_special_basic_arg (this->client_id_ % 2,
- this->client_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->test_objref_arg (this->callback_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- // Sleep for 5 seconds before invoking done().
- // This is a workaround with the problem that some oneway requests lost
- // when the server has multiple orb threads.
- ACE_OS::sleep (5);
- this->obj_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_B_ClientEngine::expected_results(Foo_B_Statistics& stats)
-{
- stats.expected(1, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(2, 1, Foo_B_Statistics::FOO_B_STAT_LONG);
- stats.expected(3, 1, Foo_B_Statistics::FOO_B_STAT_LONG);
- stats.expected(4, 5, Foo_B_Statistics::FOO_B_STAT_LONG);
- stats.expected(5, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(6, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(7, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(8, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(9, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(10, 1, Foo_B_Statistics::FOO_B_STAT_LONG);
- stats.expected(11, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(12, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(13, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(14, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(15, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(16, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected_callbacks (1);
-}
-
-
-unsigned
-Foo_B_ClientEngine::expected_callbacks ()
-{
- return 1;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.h
deleted file mode 100644
index a6e8e51667b..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_B_ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_B_CLIENT_ENGINE_H
-#define FOO_B_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "ClientEngine.h"
-#include "Foo_BC.h"
-
-class Foo_B_Statistics;
-class Callback_i;
-
-class CSD_TP_Foo_B_Export Foo_B_ClientEngine : public ClientEngine
-{
- public:
-
- Foo_B_ClientEngine(Foo_B_ptr obj,
- Callback_ptr callback,
- unsigned client_id = 0,
- bool collocated = false);
-
- virtual ~Foo_B_ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_B_Statistics& stats);
- static unsigned expected_callbacks ();
-
- private:
-
- Foo_B_var obj_;
- Callback_var callback_;
- unsigned client_id_;
- bool collocated_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.cpp
deleted file mode 100644
index ec2d97c6bdf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-// $Id$
-#include "Foo_B_SimpleClientEngine.h"
-#include "Callback_i.h"
-#include "Foo_B_Statistics.h"
-#include "TestAppExceptionC.h"
-#include "AppHelper.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS.h"
-
-extern const char* ONEWAY_ARG_TEST_STR;
-
-Foo_B_SimpleClientEngine::Foo_B_SimpleClientEngine(Foo_B_ptr obj,
- Callback_ptr callback,
- unsigned client_id,
- bool collocated)
- : obj_(Foo_B::_duplicate(obj)),
- callback_(Callback::_duplicate(callback)),
- client_id_(client_id),
- collocated_(collocated)
-{
-}
-
-
-Foo_B_SimpleClientEngine::~Foo_B_SimpleClientEngine()
-{
-}
-
-
-bool
-Foo_B_SimpleClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Make sure the connection is established before making
- // remote invocations.
- if (AppHelper::validate_connection (this->obj_.in ()) == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_SimpleClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- // Verify the return values and return the results.
- bool check_validity = true;
-
- // Callback test.
- ACE_TRY
- {
- if (CORBA::is_nil(this->callback_.in()))
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_SimpleClientEngine::execute " \
- "The callback_ objref is nil before op7() call!\n"));
- }
-
- this->obj_->op7 (this->callback_.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (FooException, ex)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_SimpleClientEngine::execute " \
- "FooException raised by op7() call.\n"));
- check_validity = false;
- }
- ACE_ENDTRY;
-
- // Tell the servant that this client is done.
- this->obj_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_B_SimpleClientEngine::expected_results(Foo_B_Statistics& stats)
-{
- stats.expected(7, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
-}
-
-
-unsigned
-Foo_B_SimpleClientEngine::expected_callbacks ()
-{
- return 1;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.h
deleted file mode 100644
index 38ef6a09bcf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_B_SimpleClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_B_SIMPLE_CLIENT_ENGINE_H
-#define FOO_B_SIMPLE_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "ClientEngine.h"
-#include "Foo_BC.h"
-
-class Foo_B_Statistics;
-class Callback_i;
-
-class CSD_TP_Foo_B_Export Foo_B_SimpleClientEngine : public ClientEngine
-{
- public:
-
- Foo_B_SimpleClientEngine(Foo_B_ptr obj,
- Callback_ptr callback,
- unsigned client_id = 0,
- bool collocated = false);
-
- virtual ~Foo_B_SimpleClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_B_Statistics& stats);
- static unsigned expected_callbacks ();
-
- private:
-
- Foo_B_var obj_;
- Callback_var callback_;
- unsigned client_id_;
- bool collocated_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.cpp
deleted file mode 100644
index 6cf19e95125..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-// $Id$
-#include "Foo_B_Statistics.h"
-#include "Foo_B_ClientEngine.h"
-
-extern const char* ONEWAY_ARG_TEST_STR;
-extern CORBA::Boolean special_value;
-
-Foo_B_Statistics::Foo_B_Statistics(unsigned num_remote_clients,
- unsigned num_collcated_clients)
-: num_clients_ (num_remote_clients + num_collcated_clients),
- num_collcated_clients_ (num_collcated_clients),
- expected_callbacks_ (0),
- actual_callbacks_ (0),
- servant_error_count_ (0)
-{
- for (unsigned i = 0; i < 16; i++)
- {
- this->expected_op_count_[i] = 0;
- this->actual_op_count_[i] = 0;
- }
-}
-
-
-Foo_B_Statistics::~Foo_B_Statistics()
-{
-}
-
-
-void
-Foo_B_Statistics::expected(unsigned op_num, unsigned count, In_Value_Type type)
-{
- this->expected_op_count_[op_num-1] = count * this->num_clients_;
- this->expected_in_value_type_[op_num-1] = type;
-}
-
-
-void
-Foo_B_Statistics::actual(unsigned op_num, unsigned count)
-{
- this->actual_op_count_[op_num-1] += count;
-}
-
-
-void
-Foo_B_Statistics::actual(unsigned op_num, LongVector lv)
-{
- unsigned sz = lv.size();
- for (unsigned i = 0; i < sz; i++)
- {
- this->actual_in_long_[op_num-1].push_back (lv[i]);
- }
-}
-
-
-void
-Foo_B_Statistics::actual(unsigned op_num, StringVector sv)
-{
- unsigned sz = sv.size();
- for (unsigned i = 0; i < sz; i++)
- {
- this->actual_in_string_[op_num-1].push_back (sv[i]);
- }
-}
-
-
-void
-Foo_B_Statistics::expected_callbacks (unsigned num_cbs)
-{
- expected_callbacks_ = num_cbs * this->num_collcated_clients_;
-}
-
-
-void
-Foo_B_Statistics::actual_callbacks (unsigned num_cbs)
-{
- actual_callbacks_ += num_cbs;
-}
-
-
-void
-Foo_B_Statistics::servant_error_count (unsigned error_count)
-{
- this->servant_error_count_ += error_count;
-}
-
-
-bool
-Foo_B_Statistics::actual_vs_expected()
-{
- bool ret = true;
-
- // Verify the checking results in servant operation code.
- if (this->servant_error_count_ > 0)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "servant_error_count_=%u\n", servant_error_count_));
- if (ret)
- ret = false;
- }
-
- // Verify the number of callbacks received for the collocated
- // client.
- if (actual_callbacks_ != expected_callbacks_)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_callbacks_=%u expected_callbacks_=%u \n",
- actual_callbacks_, expected_callbacks_));
- if (ret)
- ret = false;
- }
-
- // Verify the number of operations server received.
- for (unsigned int z = 0; z < 16; z++)
- {
- if (this->expected_op_count_[z] != this->actual_op_count_[z])
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "expected_op_count_[%u]=%u actual_op_count_[%u]=%u \n",
- z, expected_op_count_[z], z, actual_op_count_[z]));
- if (ret)
- ret = false;
- }
- }
-
- Foo_B_Statistics stats (1, 0);
- Foo_B_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < 16; i++)
- {
- switch (expected_in_value_type_[i])
- {
- case FOO_B_STAT_LONG:
- {
- unsigned actual_size
- = this->actual_in_long_[i].size ();
- unsigned expected_size
- = this->num_clients_ * stats.expected_op_count_[i];
- if (actual_size != expected_size)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_size=%u expected_size=%u\n", actual_size, expected_size));
- if (ret)
- ret = false;
- }
- sort (this->actual_in_long_[i]);
-
- for (unsigned j = 0; j < actual_size - 1; j++)
- {
- if (this->actual_in_long_[i][j] != this->actual_in_long_[i][j + 1] - 1)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_in_long_[%u][%u]=%d actual_in_long_[%u][%u]=%d\n",
- i, j, actual_in_long_[i][j], i, j+1, actual_in_long_[i][j + 1]));
- if (ret)
- ret = false;
- }
- }
- }
- break;
-
- case FOO_B_STAT_STRING:
- {
- unsigned actual_size
- = this->actual_in_string_[i].size ();
- unsigned expected_size
- = this->num_clients_ * stats.expected_op_count_[i];
- if (actual_size != expected_size)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_size=%u expected_size=%u\n", actual_size, expected_size));
- if (ret)
- ret = false;
- }
-
- LongVector lvec;
- char buffer[50];
-
- for (unsigned k = 0; k < actual_size; k++)
- {
- unsigned client_id;
- sscanf (this->actual_in_string_[i][k].c_str(), "%u %s", &client_id, buffer);
- if (ACE_OS::strcmp (buffer, ONEWAY_ARG_TEST_STR) != 0)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_in_string_[%u][%u]=%s \n",
- i, k, actual_in_string_[i][k].c_str()));
- if (ret)
- ret = false;
- }
- lvec.push_back (client_id);
- }
-
- sort (lvec);
-
- for (unsigned j = 0; j < actual_size - 1; j++)
- {
- if (lvec[j] != lvec[j + 1] - 1)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "lvec[%u]=%d lvec[%u]=%d\n",
- j, lvec[j], j+1, lvec[j + 1]));
- if (ret)
- ret = false;
- }
- }
- }
- break;
-
- case FOO_B_STAT_NONE:
- default:
- break;
- }
-
- }
-
- return ret;
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.h
deleted file mode 100644
index cf21382c549..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-#ifndef STATISTICS_B_H
-#define STATISTICS_B_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "StatisticsHelper.h"
-
-
-class CSD_TP_Foo_B_Export Foo_B_Statistics
-{
- public:
-
- enum In_Value_Type
- {
- FOO_B_STAT_NONE,
- FOO_B_STAT_STRING,
- FOO_B_STAT_LONG
- };
-
- Foo_B_Statistics(unsigned num_remote_clients,
- unsigned num_collcated_clients);
-
- virtual ~Foo_B_Statistics();
-
- void expected(unsigned op_num, unsigned count, In_Value_Type type);
- void actual(unsigned op_num, unsigned count);
- void actual(unsigned op_num, LongVector lv);
- void actual(unsigned op_num, StringVector sv);
- void servant_error_count(unsigned error_count);
-
- void expected_callbacks (unsigned num_cbs);
- void actual_callbacks (unsigned num_cbs);
-
- bool actual_vs_expected();
-
-private:
-
- unsigned num_clients_;
- unsigned num_collcated_clients_;
-
- LongVector actual_in_long_ [16];
- StringVector actual_in_string_ [16];
-
- unsigned expected_op_count_[16];
- unsigned actual_op_count_[16];
- unsigned expected_in_value_type_[16];
-
- unsigned expected_callbacks_;
- unsigned actual_callbacks_;
-
- unsigned servant_error_count_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.cpp
deleted file mode 100644
index 5ee8d0b8690..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-// $Id$
-#include "Foo_B_i.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "ace/OS.h"
-#include "ace/SString.h"
-
-
-Foo_B_i::Foo_B_i()
-: error_count_ (0)
-{
- for (unsigned i = 0; i < 16; i++)
- {
- op_count_[i] = 0;
- }
-}
-
-
-Foo_B_i::~Foo_B_i()
-{
-}
-
-
-void
-Foo_B_i::op1(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[0] ++;
-}
-
-
-void
-Foo_B_i::op2(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[1] ++;
- this->in_long_[1].push_back (value);
-}
-
-
-CORBA::Long
-Foo_B_i::op3(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[2] ++;
- this->in_long_[2].push_back (value);
- return value;
-}
-
-
-void
-Foo_B_i::op4(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[3] ++;
- this->in_long_[3].push_back (value);
-}
-
-
-void
-Foo_B_i::op5(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException, FooException))
-{
- this->op_count_[4] ++;
- ACE_THROW (FooException());
-}
-
-
-CORBA::Boolean
-Foo_B_i::op6(const TimeOfDay& t,
- char*& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[5] ++;
- char buf [20];
- ACE_OS::sprintf (buf, "%s %d:%d:%d", message, t.hour, t.minute, t.second);
- CORBA::string_free (message);
- message = CORBA::string_dup (buf);
-
- return 1;
-}
-
-
-void
-Foo_B_i::op7(Callback_ptr cb
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException,
- FooException))
-{
- this->op_count_[6] ++;
-
- if (CORBA::is_nil (cb))
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::op7 nil callback error_count %u\n",
- error_count_));
- ACE_THROW (FooException ());
- }
- else
- {
- cb->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-
-void
-Foo_B_i::test_unbounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[7] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_unbounded_string_arg ")
- // ACE_TEXT("got unbounded string %s\n"),
- // message));
- this->in_string_[7].push_back (message);
-}
-
-
-void
-Foo_B_i::test_bounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[8] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_bounded_string_arg ")
- // ACE_TEXT("got bounded string %s\n"),
- // message));
- this->in_string_[8].push_back (message);
-}
-
-
-void
-Foo_B_i::test_fixed_array_arg(const Fixed_Array message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[9] ++;
-
- for (unsigned i = 0; i < 19; i++)
- {
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_fixed_array_arg ")
- // ACE_TEXT("got fixed array[i] = %d\n"),
- // i, message[i]));
-
- if (message[i] != message[i + 1] -1)
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::test_fixed_array_arg: value checking failed "
- "- message[%u]=%d message[%u]=%d error_count=%u\n",
- i, message[i], i+1, message[i + 1], error_count_));
- break;
- }
- }
-
-
- this->in_long_[9].push_back (message[0]);
-}
-
-
-void
-Foo_B_i::test_bounded_var_size_arg(const Bounded_Var_Size& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[10] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_bounded_var_size_arg ")
- // ACE_TEXT("got var array chars %s\n"),
- // message.get_buffer ()));
- this->in_string_[10].push_back (message.get_buffer ());
-}
-
-
-void
-Foo_B_i::test_unbounded_var_size_arg(const Unbounded_Var_Size& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[11] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_unbounded_var_size_arg ")
- // ACE_TEXT("got var array chars %s\n"),
- // message.get_buffer ()));
- this->in_string_[11].push_back (message.get_buffer ());
-}
-
-
-void
-Foo_B_i::test_fixed_size_arg(const TimeOfDay& t
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_UNUSED_ARG(t);
-
- this->op_count_[12] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_fixed_size_arg ")
- // ACE_TEXT("got timeofday %d:%d:%d\n"),
- // t.hour, t.minute, t.second));
-}
-
-
-void
-Foo_B_i::test_var_array_arg(const Var_Array messages
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[13] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_var_array_arg ")
- // ACE_TEXT(" %s \n"), messages[0].in ()));
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_var_array_arg ")
- // ACE_TEXT(" %s \n"), messages[1].in ()));
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_var_array_arg ")
- // ACE_TEXT(" %s \n"), messages[2].in ()));
- unsigned cur_client_id = 0;
-
- for (unsigned i = 0 ; i < 3; i ++)
- {
- unsigned client_id = 0;
- unsigned str_id = 0;
- char test_str[20];
- sscanf (messages[i].in (), "%u %s %u", &client_id, test_str, &str_id);
-
- if (str_id != i)
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::test_var_array_arg: str_id checking failed "
- "- str_id=%u i=%u error_count_=%u\n", str_id, i, error_count_));
- }
-
- if (i == 0)
- {
- cur_client_id = client_id;
- }
- else if (client_id != cur_client_id)
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::test_var_array_arg: client_id checking failed "
- "- client_id=%u cur_client_id=%u error_count_=%u\n",
- client_id, cur_client_id, error_count_));
- }
- }
- this->in_string_[13].push_back (messages[0].in ());
-}
-
-
-void
-Foo_B_i::test_special_basic_arg(CORBA::Boolean value,
- CORBA::Long client_id
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[14] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_special_basic_arg ")
- // ACE_TEXT(" got special basic arg: %d \n"), value));
-
- CORBA::Boolean expected_special_value = client_id % 2;
- if (expected_special_value != value)
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::test_special_basic_arg "
- "value checking failed - client_id %d got value %d error_count=%u\n",
- client_id, value, error_count_));
- }
-}
-
-
-void
-Foo_B_i::test_objref_arg(Callback_ptr cb
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_UNUSED_ARG(cb);
- this->op_count_[15] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_objref_arg ")
- // ACE_TEXT(" got callback object. \n")));
-}
-
-
-void
-Foo_B_i::done(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- TheAppShutdown->client_done();
-}
-
-
-void
-Foo_B_i::gather_stats (Foo_B_Statistics& stats)
-{
- for (unsigned i = 0; i < 16; i++)
- {
- stats.actual (i+1, this->op_count_[i]);
- stats.actual (i+1, this->in_string_[i]);
- stats.actual (i+1, this->in_long_[i]);
- stats.servant_error_count (this->error_count_);
- }
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.h
deleted file mode 100644
index 771eb05eca3..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-#ifndef FOO_B_I_H
-#define FOO_B_I_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "Foo_BS.h"
-#include "Foo_B_Statistics.h"
-
-
-class CSD_TP_Foo_B_Export Foo_B_i : public virtual POA_Foo_B
-{
- public:
-
- Foo_B_i();
- virtual ~Foo_B_i();
-
- virtual void op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op2(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual CORBA::Long op3(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op4(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException, FooException));
-
- virtual CORBA::Boolean op6(const TimeOfDay& t,
- char*& message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op7(Callback_ptr cb
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException,
- FooException));
-
- virtual void test_unbounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_bounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_fixed_array_arg(const Fixed_Array message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_var_array_arg(const Var_Array messages
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_bounded_var_size_arg(const Bounded_Var_Size& message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_unbounded_var_size_arg(const Unbounded_Var_Size& message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_fixed_size_arg(const TimeOfDay& t
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_special_basic_arg(CORBA::Boolean value,
- CORBA::Long client_id
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_objref_arg(Callback_ptr cb
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void done(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- void gather_stats (Foo_B_Statistics& stats);
-
- private:
-
- LongVector in_long_ [16];
- StringVector in_string_ [16];
- unsigned op_count_ [16];
- unsigned error_count_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/csd_tp_foo_b_lib.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/csd_tp_foo_b_lib.mpc
deleted file mode 100644
index a9503d73c5a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/csd_tp_foo_b_lib.mpc
+++ /dev/null
@@ -1,25 +0,0 @@
-//$Id$
-project : csd_tp_test_lib {
- sharedname = CSD_TP_Foo_B
- dynamicflags = CSD_TP_FOO_B_BUILD_DLL
- idlflags += -Wb,export_macro=CSD_TP_Foo_B_Export -Wb,export_include=CSD_TP_Foo_B_Export.h
- includes += $(TAO_ROOT)/tao
-
- IDL_Files {
- Foo_B.idl
- Callback.idl
- }
-
- Source_Files {
- Foo_BC.cpp
- Foo_BS.cpp
- Foo_B_ClientEngine.cpp
- Foo_B_SimpleClientEngine.cpp
- Foo_B_i.cpp
- Foo_B_Statistics.cpp
- Callback_i.cpp
- CallbackC.cpp
- CallbackS.cpp
- }
-
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/CSD_TP_Foo_C_Export.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/CSD_TP_Foo_C_Export.h
deleted file mode 100644
index ef1996b0a26..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/CSD_TP_Foo_C_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s CSD_TP_Foo_C
-// ------------------------------
-#ifndef CSD_TP_FOO_C_EXPORT_H
-#define CSD_TP_FOO_C_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CSD_TP_FOO_C_HAS_DLL)
-# define CSD_TP_FOO_C_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CSD_TP_FOO_C_HAS_DLL */
-
-#if !defined (CSD_TP_FOO_C_HAS_DLL)
-# define CSD_TP_FOO_C_HAS_DLL 1
-#endif /* ! CSD_TP_FOO_C_HAS_DLL */
-
-#if defined (CSD_TP_FOO_C_HAS_DLL) && (CSD_TP_FOO_C_HAS_DLL == 1)
-# if defined (CSD_TP_FOO_C_BUILD_DLL)
-# define CSD_TP_Foo_C_Export ACE_Proper_Export_Flag
-# define CSD_TP_FOO_C_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_C_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CSD_TP_FOO_C_BUILD_DLL */
-# define CSD_TP_Foo_C_Export ACE_Proper_Import_Flag
-# define CSD_TP_FOO_C_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_C_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CSD_TP_FOO_C_BUILD_DLL */
-#else /* CSD_TP_FOO_C_HAS_DLL == 1 */
-# define CSD_TP_Foo_C_Export
-# define CSD_TP_FOO_C_SINGLETON_DECLARATION(T)
-# define CSD_TP_FOO_C_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CSD_TP_FOO_C_HAS_DLL == 1 */
-
-// Set CSD_TP_FOO_C_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CSD_TP_FOO_C_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CSD_TP_FOO_C_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CSD_TP_FOO_C_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CSD_TP_FOO_C_NTRACE */
-
-#if (CSD_TP_FOO_C_NTRACE == 1)
-# define CSD_TP_FOO_C_TRACE(X)
-#else /* (CSD_TP_FOO_C_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CSD_TP_FOO_C_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CSD_TP_FOO_C_NTRACE == 1) */
-
-#endif /* CSD_TP_FOO_C_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C.idl b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C.idl
deleted file mode 100644
index b7eeea96f33..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-#ifndef FOO_C_IDL
-#define FOO_C_IDL
-
-#include "FooException.idl"
-
-interface Foo_C
-{
- /// void return-type, no arguments
- void op1();
-
- /// void return-type, 1 "in" argument
- void op2(in long value);
-
- /// long return-type, 1 "in" argument
- long op3(in long value);
-
- /// one-way version of op2
- oneway void op4(in long value);
-
- /// Operation that always raises an exception.
- void op5() raises (FooException);
-
- /// Client calls this last. The last client to claim that it is
- /// done will cause the server to shutdown.
- void done();
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.cpp
deleted file mode 100644
index fdd8b4e2671..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-#include "Foo_C_ClientEngine.h"
-#include "AppHelper.h"
-#include "ace/Log_Msg.h"
-
-
-Foo_C_ClientEngine::Foo_C_ClientEngine(Foo_C_ptr obj,
- unsigned client_id)
- : obj_(Foo_C::_duplicate(obj)),
- client_id_ (client_id)
-{
-}
-
-
-Foo_C_ClientEngine::~Foo_C_ClientEngine()
-{
-}
-
-
-bool
-Foo_C_ClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Verify the return values and return the results.
- bool check_validity = true;
-
- // Make sure the connection is established before making
- // remote invocations.
- if (AppHelper::validate_connection (this->obj_.in ()) == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_ClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- CORBA::Long i = this->client_id_;
-
- this->obj_->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->op2(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- CORBA::Long value = this->obj_->op3(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (value != i)
- {
- check_validity = false;
- }
-
- for (CORBA::Long j = 1; j <= 5; j++)
- {
- this->obj_->op4(495 + (i * 5) + j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- bool caught_exception = false;
-
- ACE_TRY
- {
- this->obj_->op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (FooException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- this->obj_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_C_ClientEngine::expected_results(Foo_C_Statistics& stats)
-{
- // This ClientEngine is used by remote clients.
- stats.expected(1, 1, true);
- stats.expected(2, 1, true);
- stats.expected(3, 1, true);
- stats.expected(4, 5, true);
- stats.expected(5, 1, true);
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.h
deleted file mode 100644
index 54247223f04..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CLIENT_ENGINE_H
-#define FOO_C_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "ClientEngine.h"
-#include "Foo_CC.h"
-#include "Foo_C_Statistics.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_ClientEngine : public ClientEngine
-{
- public:
-
- Foo_C_ClientEngine(Foo_C_ptr obj,
- unsigned client_id);
- virtual ~Foo_C_ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_C_Statistics& stats);
-
- private:
-
- Foo_C_var obj_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.cpp
deleted file mode 100644
index da6b44f7c71..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-#include "Foo_C_Custom_ClientEngine.h"
-#include "CustomExceptionC.h"
-#include "ace/Log_Msg.h"
-
-
-Foo_C_Custom_ClientEngine::Foo_C_Custom_ClientEngine
- (Foo_C_i* servant,
- Foo_C_ptr objref,
- TAO::CSD::TP_Strategy* strategy,
- unsigned client_id)
- : proxy_(servant,objref,strategy),
- client_id_(client_id)
-{
-}
-
-
-Foo_C_Custom_ClientEngine::~Foo_C_Custom_ClientEngine()
-{
-}
-
-
-bool
-Foo_C_Custom_ClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Make sure the connection is established before making
- // remote invocations.
- if (this->proxy_.validate_connection () == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_ClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- bool check_validity = true;
- CORBA::Long i = this->client_id_;
-
- this->proxy_.op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- this->proxy_.op2(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- CORBA::Long value = this->proxy_.op3(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (value != i)
- {
- check_validity = false;
- }
-
-
- for (CORBA::Long j = 1; j <= 5; j++)
- {
- this->proxy_.op4(495 + (i * 5) + j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- bool caught_exception = false;
- ACE_TRY_EX (op5)
- {
- this->proxy_.op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (op5);
- }
- ACE_CATCH (FooException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- long cust_i = this->client_id_;
-
- this->proxy_.cust_op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- this->proxy_.cust_op2(cust_i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- long cust_value = this->proxy_.cust_op3(cust_i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (cust_value != i)
- {
- check_validity = false;
- }
-
- for (long cust_j = 1; cust_j <= 5; cust_j++)
- {
- this->proxy_.cust_op4(495 + (cust_i * 5) + cust_j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- caught_exception = false;
-
- ACE_TRY_EX (cust_op5)
- {
- this->proxy_.cust_op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (cust_op5)
- }
- ACE_CATCHANY //(CustomException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- this->proxy_.done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_C_Custom_ClientEngine::expected_results(Foo_C_Statistics& stats)
-{
- // This ClientEngine is used by collocated clients.
- stats.expected(1, 1, false);
- stats.expected(2, 1, false);
- stats.expected(3, 1, false);
- stats.expected(4, 5, false);
- stats.expected(5, 1, false);
- stats.expected(6, 1, false);
- stats.expected(7, 1, false);
- stats.expected(8, 1, false);
- stats.expected(9, 5, false);
- stats.expected(10, 1, false);
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.h
deleted file mode 100644
index 9d51fcddcea..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_Custom_ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUSTOM_CLIENT_ENGINE_H
-#define FOO_C_CUSTOM_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "ClientEngine.h"
-#include "Foo_C_Custom_Proxy.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_Custom_ClientEngine : public ClientEngine
-{
- public:
-
- Foo_C_Custom_ClientEngine(Foo_C_i* servant,
- Foo_C_ptr objref,
- TAO::CSD::TP_Strategy* strategy,
- unsigned client_id);
- virtual ~Foo_C_Custom_ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_C_Statistics& stats);
-
-
- private:
-
- Foo_C_Custom_Proxy proxy_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.cpp
deleted file mode 100644
index 0fc2e22471a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-// $Id$
-#include "Foo_C_Custom_Proxy.h"
-#include "Foo_C_cust_op1.h"
-#include "Foo_C_cust_op2.h"
-#include "Foo_C_cust_op3.h"
-#include "Foo_C_cust_op4.h"
-#include "Foo_C_cust_op5.h"
-#include "AppHelper.h"
-
-
-Foo_C_Custom_Proxy::Foo_C_Custom_Proxy(Foo_C_i* servant,
- Foo_C_ptr objref,
- TAO::CSD::TP_Strategy* strategy)
- : servant_(servant),
- objref_(Foo_C::_duplicate(objref)),
- strategy_(strategy, false)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_Custom_Proxy::~Foo_C_Custom_Proxy()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-bool
-Foo_C_Custom_Proxy::validate_connection ()
-{
- return AppHelper::validate_connection (this->objref_.in ());
-}
-
-
-void
-Foo_C_Custom_Proxy::op1(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->objref_->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::op2(CORBA::Long x ACE_ENV_ARG_DECL)
-{
- this->objref_->op2(x ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-CORBA::Long
-Foo_C_Custom_Proxy::op3(CORBA::Long x ACE_ENV_ARG_DECL)
-{
- CORBA::Long result = this->objref_->op3(x ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- return result;
-}
-
-
-void
-Foo_C_Custom_Proxy::op4(CORBA::Long x ACE_ENV_ARG_DECL)
-{
- this->objref_->op4(x ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::op5(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->objref_->op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::done(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->objref_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::cust_op1(ACE_ENV_SINGLE_ARG_DECL)
-{
- Foo_C_cust_op1_Handle op = new Foo_C_cust_op1(this->servant_);
- this->strategy_->custom_synch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::cust_op2(long x ACE_ENV_ARG_DECL)
-{
- Foo_C_cust_op2_Handle op = new Foo_C_cust_op2(this->servant_, x);
- this->strategy_->custom_synch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-long
-Foo_C_Custom_Proxy::cust_op3(long x ACE_ENV_ARG_DECL)
-{
- Foo_C_cust_op3_Handle op = new Foo_C_cust_op3(this->servant_, x);
- this->strategy_->custom_synch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- int ret = op->result(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- return ret;
-}
-
-
-void
-Foo_C_Custom_Proxy::cust_op4(long x ACE_ENV_ARG_DECL)
-{
- Foo_C_cust_op4_Handle op = new Foo_C_cust_op4(this->servant_,x);
- this->strategy_->custom_asynch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::cust_op5(ACE_ENV_SINGLE_ARG_DECL)
-{
- Foo_C_cust_op5_Handle op = new Foo_C_cust_op5(this->servant_);
- this->strategy_->custom_synch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- op->result(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.h
deleted file mode 100644
index 5cd7eeae55a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_Custom_Proxy.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUSTOM_PROXY_H
-#define FOO_C_CUSTOM_PROXY_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "ClientEngine.h"
-#include "Foo_C_i.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_Custom_Proxy
-{
-public:
-
- Foo_C_Custom_Proxy(Foo_C_i* servant,
- Foo_C_ptr objref,
- TAO::CSD::TP_Strategy* strategy);
- ~Foo_C_Custom_Proxy();
-
- bool validate_connection ();
-
- void op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void op2(CORBA::Long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- CORBA::Long op3(CORBA::Long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void op4(CORBA::Long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void done(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- void cust_op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void cust_op2(long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- long cust_op3(long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void cust_op4(long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void cust_op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
-private:
- Foo_C_i* servant_;
- Foo_C_var objref_;
- TAO::CSD::TP_Strategy_Handle strategy_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.cpp
deleted file mode 100644
index b832e29d9a1..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-// $Id$
-#include "Foo_C_Statistics.h"
-#include "Foo_C_ClientEngine.h"
-#include "Foo_C_Custom_ClientEngine.h"
-
-Foo_C_Statistics::Foo_C_Statistics(unsigned num_remote_clients,
- unsigned num_collocated_clients)
-: num_remote_clients_ (num_remote_clients),
- num_collocated_clients_ (num_collocated_clients)
-{
- for (unsigned i = 0; i < 10; i++)
- {
- this->expected_[i] = 0;
- this->actual_[i] = 0;
- }
-}
-
-
-Foo_C_Statistics::~Foo_C_Statistics()
-{
-}
-
-
-void
-Foo_C_Statistics::expected(unsigned op_num, unsigned count, bool remote_client)
-{
- if (remote_client)
- {
- this->expected_[op_num-1] += count * this->num_remote_clients_;
- }
- else
- {
- this->expected_[op_num-1] += count * this->num_collocated_clients_;
- }
-}
-
-
-void
-Foo_C_Statistics::actual(unsigned op_num, unsigned count)
-{
- this->actual_[op_num-1] += count;
-}
-
-
-void
-Foo_C_Statistics::actual_in_values(unsigned op_num, LongVector lv)
-{
- size_t sz = lv.size();
- for (size_t i = 0; i < sz; i++)
- {
- this->actual_in_values_[op_num-1].push_back (lv[i]);
- }
-}
-
-
-bool
-Foo_C_Statistics::actual_vs_expected()
-{
- // Get the expected statistics for a single remote client.
- Foo_C_Statistics remote_client_stats (1, 0);
- Foo_C_ClientEngine::expected_results (remote_client_stats);
- // Get the expected statistics for a single collocated client.
- Foo_C_Statistics collocated_client_stats (0, 1);
- Foo_C_Custom_ClientEngine::expected_results (collocated_client_stats);
-
- for (unsigned i = 0; i < 10; i++)
- {
- if (this->expected_[i] != this->actual_[i])
- {
- return false;
- }
-
- // Verify the "in" values.
- // Skip op1/op5 and cust_op1/cust_op5 since they do not have
- // any "in" values.
- if (i % 5 == 0 || i % 5 == 4)
- {
- continue;
- }
-
- unsigned actual_size
- = this->actual_in_values_[i].size ();
- unsigned expected_size
- = this->num_remote_clients_ * remote_client_stats.expected_[i]
- + this->num_collocated_clients_ * collocated_client_stats.expected_[i];
-
- if (actual_size == 0 && expected_size == 0)
- {
- continue;
- }
-
- if (actual_size != expected_size)
- {
- return false;
- }
-
- sort (this->actual_in_values_[i]);
-
- for (unsigned j = 0; j < actual_size - 1; j++)
- {
- if (this->actual_in_values_[i][j] != this->actual_in_values_[i][j + 1] - 1)
- {
- return false;
- }
- }
- }
- return true;
-}
-
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.h
deleted file mode 100644
index 4d7dcff1df9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id$
-#ifndef STATISTICS_C_H
-#define STATISTICS_C_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "StatisticsHelper.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_Statistics
-{
- public:
-
- Foo_C_Statistics(unsigned num_remote_clients,
- unsigned num_collocated_clients);
-
- virtual ~Foo_C_Statistics();
-
- void expected(unsigned op_num, unsigned count, bool remote_client);
- void actual(unsigned op_num, unsigned count);
- void actual_in_values(unsigned op_num, LongVector lv);
-
- bool actual_vs_expected();
-
-
- private:
-
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned expected_[10];
- unsigned actual_[10];
-
- LongVector actual_in_values_ [10];
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.cpp
deleted file mode 100644
index 3ca92e4af2e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op1.h"
-#include "Foo_C_i.h"
-#include "CancelledExceptionC.h"
-
-
-Foo_C_cust_op1::Foo_C_cust_op1(Foo_C_i* servant)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- cancelled_(false),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_cust_op1::~Foo_C_cust_op1()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op1::result(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->cancelled_)
- {
- ACE_THROW (CancelledException());
- }
-}
-
-
-void
-Foo_C_cust_op1::execute_i()
-{
- this->servant_->cust_op1();
-}
-
-
-void
-Foo_C_cust_op1::cancel_i()
-{
- this->cancelled_ = true;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.h
deleted file mode 100644
index 553cb27a6d8..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op1.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP1_H
-#define FOO_C_CUST_OP1_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op1;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op1> Foo_C_cust_op1_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op1 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op1(Foo_C_i* servant);
- virtual ~Foo_C_cust_op1();
-
- void result(ACE_ENV_SINGLE_ARG_DECL);
-
-
- protected:
- virtual void execute_i();
- virtual void cancel_i();
-
- private:
- bool cancelled_;
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.cpp
deleted file mode 100644
index c0bc62fb2f0..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op2.h"
-#include "Foo_C_i.h"
-#include "CancelledExceptionC.h"
-
-
-Foo_C_cust_op2::Foo_C_cust_op2(Foo_C_i* servant, long arg)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- arg_(arg),
- cancelled_(false),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_cust_op2::~Foo_C_cust_op2()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op2::result(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->cancelled_)
- {
- ACE_THROW (CancelledException());
- }
-}
-
-
-void
-Foo_C_cust_op2::execute_i()
-{
- this->servant_->cust_op2(this->arg_);
-}
-
-
-void
-Foo_C_cust_op2::cancel_i()
-{
- this->cancelled_ = true;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.h
deleted file mode 100644
index 8a319e3b50a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op2.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP2_H
-#define FOO_C_CUST_OP2_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op2;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op2> Foo_C_cust_op2_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op2 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op2(Foo_C_i* servant, long arg);
- virtual ~Foo_C_cust_op2();
-
- void result(ACE_ENV_SINGLE_ARG_DECL);
-
-
- protected:
-
- virtual void execute_i();
- virtual void cancel_i();
-
-
- private:
-
- long arg_;
- bool cancelled_;
-
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp
deleted file mode 100644
index b6bfad9dc67..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op3.h"
-#include "Foo_C_i.h"
-#include "CancelledExceptionC.h"
-
-
-Foo_C_cust_op3::Foo_C_cust_op3(Foo_C_i* servant, long arg)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- arg_(arg),
- result_(0),
- cancelled_(false),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_cust_op3::~Foo_C_cust_op3()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-long
-Foo_C_cust_op3::result(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->cancelled_)
- {
- ACE_THROW_RETURN (CancelledException(), -1);
- }
-
- return this->result_;
-}
-
-
-void
-Foo_C_cust_op3::execute_i()
-{
- this->result_ = this->servant_->cust_op3(this->arg_);
-}
-
-
-void
-Foo_C_cust_op3::cancel_i()
-{
- this->cancelled_ = true;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.h
deleted file mode 100644
index 7e86e3c8a53..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op3.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP3_H
-#define FOO_C_CUST_OP3_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op3;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op3> Foo_C_cust_op3_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op3 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op3(Foo_C_i* servant, long arg);
- virtual ~Foo_C_cust_op3();
-
- long result(ACE_ENV_SINGLE_ARG_DECL);
-
-
- protected:
-
- virtual void execute_i();
- virtual void cancel_i();
-
-
- private:
-
- long arg_;
- long result_;
- bool cancelled_;
-
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.cpp
deleted file mode 100644
index 828e841990f..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op4.h"
-#include "Foo_C_i.h"
-
-
-Foo_C_cust_op4::Foo_C_cust_op4(Foo_C_i* servant, long arg)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- arg_(arg),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-Foo_C_cust_op4::~Foo_C_cust_op4()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op4::execute_i()
-{
- this->servant_->cust_op4(this->arg_);
-}
-
-
-void
-Foo_C_cust_op4::cancel_i()
-{
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.h
deleted file mode 100644
index 1f8e5eeb5db..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op4.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP4_H
-#define FOO_C_CUST_OP4_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op4;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op4> Foo_C_cust_op4_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op4 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op4(Foo_C_i* servant, long arg);
- virtual ~Foo_C_cust_op4();
-
-
- protected:
-
- virtual void execute_i();
- virtual void cancel_i();
-
-
- private:
-
- long arg_;
-
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.cpp
deleted file mode 100644
index 6f5b6756dda..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op5.h"
-#include "Foo_C_i.h"
-#include "CancelledExceptionC.h"
-#include "CustomExceptionC.h"
-
-
-Foo_C_cust_op5::Foo_C_cust_op5(Foo_C_i* servant)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- exception_(false),
- cancelled_(false),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_cust_op5::~Foo_C_cust_op5()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op5::result(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->cancelled_)
- {
- ACE_THROW (CancelledException());
- }
-
- if (this->exception_)
- {
- ACE_THROW (CustomException());
- }
-}
-
-
-void
-Foo_C_cust_op5::execute_i()
-{
- ACE_TRY_NEW_ENV
- {
- this->servant_->cust_op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CustomException, ex)
- {
- this->exception_ = true;
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op5::cancel_i()
-{
- this->cancelled_ = true;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.h
deleted file mode 100644
index d6963d31bbe..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op5.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP5_H
-#define FOO_C_CUST_OP5_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op5;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op5> Foo_C_cust_op5_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op5 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op5(Foo_C_i* servant);
- virtual ~Foo_C_cust_op5();
-
- void result(ACE_ENV_SINGLE_ARG_DECL);
-
-
- protected:
-
- virtual void execute_i();
- virtual void cancel_i();
-
-
- private:
-
- bool exception_;
- bool cancelled_;
-
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.cpp
deleted file mode 100644
index 25fadd9deef..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// $Id$
-#include "Foo_C_i.h"
-#include "AppShutdown.h"
-#include "CustomExceptionC.h"
-
-
-Foo_C_i::Foo_C_i()
-{
- for (unsigned i = 0; i < 10; i++)
- {
- this->count_[i] = 0;
- }
-}
-
-
-Foo_C_i::~Foo_C_i()
-{
-}
-
-
-void
-Foo_C_i::op1(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ++this->count_[0];
-}
-
-
-void
-Foo_C_i::op2(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[1].push_back (value);
- ++this->count_[1];
-}
-
-
-CORBA::Long
-Foo_C_i::op3(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[2].push_back (value);
- ++this->count_[2];
- return value;
-}
-
-
-void
-Foo_C_i::op4(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[3].push_back (value);
- ++this->count_[3];
-}
-
-
-void
-Foo_C_i::op5(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException, FooException))
-{
- ++this->count_[4];
- ACE_THROW (FooException());
-}
-
-
-void
-Foo_C_i::done(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- TheAppShutdown->client_done();
-}
-
-
-void
-Foo_C_i::cust_op1(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- ++this->count_[5];
-}
-
-
-void
-Foo_C_i::cust_op2(long value ACE_ENV_ARG_DECL_NOT_USED)
-{
- this->in_values_[6].push_back (value);
- ++this->count_[6];
-}
-
-
-long
-Foo_C_i::cust_op3(long value ACE_ENV_ARG_DECL_NOT_USED)
-{
- this->in_values_[7].push_back (value);
- ++this->count_[7];
- return value;
-}
-
-
-void
-Foo_C_i::cust_op4(long value ACE_ENV_ARG_DECL_NOT_USED)
-{
- this->in_values_[8].push_back (value);
- ++this->count_[8];
-}
-
-
-void
-Foo_C_i::cust_op5(ACE_ENV_SINGLE_ARG_DECL)
-{
- ++this->count_[9];
- ACE_THROW (CustomException());
-}
-
-
-void
-Foo_C_i::gather_stats(Foo_C_Statistics& stats)
-{
- for (unsigned i = 0; i < 10; i++)
- {
- stats.actual (i + 1, this->count_[i]);
- stats.actual_in_values (i + 1, this->in_values_[i]);
- }
-}
-
-
-void
-Foo_C_i::dump()
-{
- static unsigned id = 0;
-
- ++id;
-
- ACE_DEBUG((LM_DEBUG, "Servant %d Stats:\n", id));
- ACE_DEBUG((LM_DEBUG, "------------------\n"));
-
- unsigned i;
-
- for (i = 0; i < 5; i++)
- {
- ACE_DEBUG((LM_DEBUG, "op%d : %d\n", i+1, this->count_[i]));
- }
-
- for (i = 5; i < 10; i++)
- {
- ACE_DEBUG((LM_DEBUG, "cust_op%d: %d\n", i+1, this->count_[i]));
- }
-
- ACE_DEBUG((LM_DEBUG, "------------------\n"));
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.h
deleted file mode 100644
index c58cfb288d4..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-#ifndef FOO_C_I_H
-#define FOO_C_I_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "Foo_CS.h"
-#include "Foo_C_Statistics.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_i : public virtual POA_Foo_C
-{
- public:
-
- Foo_C_i();
- virtual ~Foo_C_i();
-
- virtual void op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op2(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual CORBA::Long op3(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op4(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException,
- FooException));
-
- virtual void done(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- void cust_op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void cust_op2(long value ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- long cust_op3(long value ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void cust_op4(long value ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void cust_op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- void gather_stats(Foo_C_Statistics& stats);
-
- void dump();
-
-
- private:
-
- LongVector in_values_ [10];
- unsigned count_[10];
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/csd_tp_foo_c_lib.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/csd_tp_foo_c_lib.mpc
deleted file mode 100644
index bc014925ccf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/csd_tp_foo_c_lib.mpc
+++ /dev/null
@@ -1,27 +0,0 @@
-//$Id$
-project : csd_tp_test_lib {
- sharedname = CSD_TP_Foo_C
- dynamicflags = CSD_TP_FOO_C_BUILD_DLL
- idlflags += -Wb,export_macro=CSD_TP_Foo_C_Export -Wb,export_include=CSD_TP_Foo_C_Export.h
- includes += $(TAO_ROOT)/tao
-
- IDL_Files {
- Foo_C.idl
- }
-
- Source_Files {
- Foo_CC.cpp
- Foo_CS.cpp
- Foo_C_ClientEngine.cpp
- Foo_C_Custom_ClientEngine.cpp
- Foo_C_Custom_Proxy.cpp
- Foo_C_cust_op1.cpp
- Foo_C_cust_op2.cpp
- Foo_C_cust_op3.cpp
- Foo_C_cust_op4.cpp
- Foo_C_cust_op5.cpp
- Foo_C_i.cpp
- Foo_C_Statistics.cpp
- }
-
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/CSD_TP_Test_1.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/CSD_TP_Test_1.mpc
deleted file mode 100644
index 02cac4dc7da..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/CSD_TP_Test_1.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_a {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_a {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.cpp
deleted file mode 100644
index d51dfbda1b1..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "Foo_A_ClientEngine.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-
-
-ClientApp::ClientApp()
- : TestAppBase("TP_Test_1_Client")
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB before parsing our own args.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Returns -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
- // Convert the IOR string to a Foo_A object reference.
- Foo_A_var foo = RefHelper<Foo_A>::string_to_ref(orb.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the appropriate client "engine" object.
- Foo_A_ClientEngine engine(foo.in());
-
- // Execute the client algorithm
- result = engine.execute(ACE_ENV_SINGLE_ARG_PARAMETER) ? 0 : -1;
- ACE_CHECK_RETURN (-1);
-
- return result;
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- ACE_Get_Opt get_opts(argc, argv, "i:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case '?':
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) usage: %s -i <ior_string>\n",
- argv[0]));
- return 1;
-
- default:
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -i <ior_string>\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.h
deleted file mode 100644
index 1af2e9ff6a6..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- int parse_args(int argc, char* argv[]);
-
- ACE_CString ior_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.cpp
deleted file mode 100644
index eb0d108bfb1..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "Foo_A_i.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "AppShutdown.h"
-#include "ace/Get_Opt.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_1_Server"),
- num_clients_ (1)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB before parsing our own args.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Returns -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- TheAppShutdown->init(orb.in(), num_clients_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the Root POA
- PortableServer::POA_var root_poa =
- RefHelper<PortableServer::POA>::resolve_initial_ref(orb.in(),
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var child_poa =
- AppHelper::create_poa("ChildPoa",
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
-
- // Create the thread pool servant dispatching strategy object, and
- // hold it in a (local) smart pointer variable.
- TAO_Intrusive_Ref_Count_Handle<TAO::CSD::TP_Strategy> csd_strategy =
- new TAO::CSD::TP_Strategy();
-
- // Tell the strategy to apply itself to the child poa.
- if (csd_strategy->apply_to(child_poa.in() ACE_ENV_ARG_PARAMETER) == false)
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to child poa.\n"));
- return -1;
- }
- ACE_CHECK_RETURN (-1);
-
- // Create the servant object.
- Foo_A_i* servant = new Foo_A_i();
-
- // Local smart pointer variable to deal with releasing the reference
- // to the servant object when the variable falls out of scope.
- PortableServer::ServantBase_var servant_owner(servant);
-
- // Obtain the object reference using the servant
- CORBA::Object_var obj = AppHelper::activate_servant(child_poa.in(),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Stringify and save the object reference to a file
- AppHelper::ref_to_file(orb.in(),
- obj.in(),
- this->ior_filename_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Activate the POA Manager
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is ready. Running the ORB event loop.\n"));
-
- // Run the ORB event loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp ORB event loop has completed.\n"));
-
- TheAppShutdown->wait ();
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is destroying the Root POA.\n"));
-
- root_poa->destroy(1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is destroying the ORB.\n"));
-
- orb->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp has completed running successfully.\n"));
-
- return 0;
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- ACE_Get_Opt get_opts(argc, argv, "o:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'o':
- this->ior_filename_ = get_opts.opt_arg();
- break;
-
- case 'n':
- {
- int tmp = ACE_OS::atoi(get_opts.opt_arg());
- if (tmp < 1)
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Error. -n must be followed by an integer "
- "value greater than 0.\n"));
- return -1;
- }
-
- this->num_clients_ = tmp;
- }
- break;
-
- case '?':
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -o <ior_filename> -n <num_clients>\n",
- argv[0]));
- return 1;
-
- default:
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -o <ior_filename> -n <num_clients>\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.h
deleted file mode 100644
index 3bfe10e6f0a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- int parse_args(int argc, char* argv[]);
-
- ACE_CString ior_filename_;
- unsigned num_clients_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/client_main.cpp
deleted file mode 100644
index ae98ca0f6ac..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/client_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl
deleted file mode 100755
index 1ff6338702b..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$num_clients=40;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main", "-o $iorfile -n $num_clients");
-}
-else {
- $SV = new PerlACE::Process ("server_main", "-o $iorfile -n $num_clients");
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-for ($i = 0; $i < $num_clients; $i++) {
-
- @CLS[$i] = new PerlACE::Process ("client_main", " -i file://$iorfile");
-
- @CLS[$i]->Spawn ();
-}
-
-for ($i = 0; $i < $num_clients; $i++) {
-
- $client = @CLS[$i]->WaitKill (60);
-
- if ($client != 0) {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/CSD_TP_Test_2.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/CSD_TP_Test_2.mpc
deleted file mode 100644
index 02cac4dc7da..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/CSD_TP_Test_2.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_a {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_a {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.cpp
deleted file mode 100644
index 531dba15f17..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "Foo_A_ClientEngine.h"
-#include "ace/Get_Opt.h"
-
-
-ClientApp::ClientApp()
- : TestAppBase("TP_Test_2_Client"),
- ior_("Not Set"),
- client_kind_(0),
- client_id_(0)
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- if (result != 0)
- {
- return result;
- }
-
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- result = this->run_engine(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->cleanup();
- return result;
-}
-
-
-int
-ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- return this->parse_args(argc, argv);
-}
-
-
-void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Turn the ior_ into a Foo_A obj ref.
- Foo_A_var foo = RefHelper<Foo_A>::string_to_ref(this->orb_.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Create the ClientEngine object, and give it the Foo_A obj ref.
- this->engine_ = new Foo_A_ClientEngine(foo.in(), this->client_id_);
-}
-
-
-int
-ClientApp::run_engine(ACE_ENV_SINGLE_ARG_DECL)
-{
- bool result = this->engine_->execute(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- return result ? 0 : -1;
-}
-
-
-void
-ClientApp::cleanup()
-{
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "i:k:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case 'k':
- result = set_arg(this->client_kind_,
- get_opts.opt_arg(),
- c,
- "client_kind");
- break;
-
- case 'n':
- result = set_arg(this->client_id_,
- get_opts.opt_arg(),
- c,
- "client_id");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ClientApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-i <ior>]\n"
- "\t[-k <client_kind>]\n"
- "\t[-n <client_id>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ClientApp::arg_dependency_checks()
-{
- if (this->ior_ == "Not Set")
- {
- ACE_ERROR((LM_ERROR,
- "Error: Missing required command-line option (-i <ior>).\n"));
- this->usage_statement();
- return -1;
- }
-
- if (this->client_id_ <= 0)
- {
- ACE_ERROR((LM_ERROR,
- "Error: Invalid command-line option (-n <client id>). \n"
- " The client id should be positive integer. \n"));
- this->usage_statement();
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ClientApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.h
deleted file mode 100644
index d5bb80cf800..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ClientEngine.h"
-#include "tao/ORB.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- int run_engine(ACE_ENV_SINGLE_ARG_DECL);
- void cleanup();
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- CORBA::ORB_var orb_;
- ACE_CString exe_name_;
- ACE_CString ior_;
- unsigned client_kind_;
- ClientEngine_Handle engine_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.cpp
deleted file mode 100644
index f291baacad4..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.cpp
+++ /dev/null
@@ -1,375 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_A_ClientEngine.h"
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_2_Server"),
- ior_filename_prefix_("foo"),
- num_servants_(1),
- num_csd_threads_(1),
- num_orb_threads_(1),
- num_remote_clients_(1),
- num_collocated_clients_(0),
- collocated_client_kind_(0)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- if (result != 0)
- {
- return result;
- }
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->collocated_setup();
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
- return this->check_validity () ? 0 : -1;
-}
-
-
-int
-ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
-
- if (result != 0)
- {
- return result;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- TheAppShutdown->init (this->orb_.in (), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-}
-
-
-void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->servants_.create_and_activate(this->num_servants_,
- this->orb_.in (),
- this->poa_.in (),
- this->ior_filename_prefix_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::collocated_setup()
-{
- int client_id_start = this->num_remote_clients_;
- for (unsigned i = 0; i < this->num_collocated_clients_; i++)
- {
- // Dole out the servant object references in a round-robin fashion.
- unsigned servant_index = i % this->num_servants_;
-
- ServantListType::T_stub_var obj = this->servants_.objref(servant_index);
- ClientEngine_Handle engine = new Foo_A_ClientEngine(obj.in(), ++client_id_start, true);
- this->collocated_client_task_.add_engine(engine.in());
- }
-}
-
-
-void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ > 0)
- {
- if (this->collocated_client_task_.open() == -1)
- {
- ACE_THROW (TestAppException ());
- }
- }
-}
-
-
-void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-void
-ServerApp::cleanup()
-{
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "p:s:n:t:r:c:k:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'p':
- this->ior_filename_prefix_ = get_opts.opt_arg();
- break;
-
- case 's':
- result = this->set_arg(this->num_servants_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 'n':
- result = this->set_arg(this->num_csd_threads_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 't':
- result = this->set_arg(this->num_orb_threads_,
- get_opts.opt_arg(),
- c,
- "num_orb_threads",
- 1);
- break;
-
- case 'r':
- result = this->set_arg(this->num_remote_clients_,
- get_opts.opt_arg(),
- c,
- "num_remote_clients");
- break;
-
- case 'c':
- result = this->set_arg(this->num_collocated_clients_,
- get_opts.opt_arg(),
- c,
- "num_collocated_clients");
- break;
-
- case 'k':
- result = this->set_arg(this->collocated_client_kind_,
- get_opts.opt_arg(),
- c,
- "collocated_client_kind");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ServerApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-p <ior_filename_prefix>]\n"
- "\t[-s <num_servants>]\n"
- "\t[-n <num_csd_threads>]\n"
- "\t[-t <num_orb_threads>]\n"
- "\t[-r <num_remote_clients>]\n"
- "\t[-c <num_collocated_clients>]\n"
- "\t[-k <collocated_client_kind>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ServerApp::arg_dependency_checks()
-{
- return (this->num_remote_clients_
- + this->num_collocated_clients_) > 0 ? 0 : -1;
-}
-
-
-int
-ServerApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-PortableServer::POA_ptr
-ServerApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-bool
-ServerApp::check_validity ()
-{
- // Check whether the clients return any errors.
- if (this->num_collocated_clients_ > 0
- && this->collocated_client_task_.failure_count () > 0)
- {
- return false;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- Foo_A_Statistics stats (num_clients);
-
- Foo_A_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->servants_.servant(i)->gather_stats(stats);
- }
-
- return stats.actual_vs_expected ();
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.h
deleted file mode 100644
index 73b5ccbbd94..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "Foo_A_i.h"
-#include "ServantList_T.h"
-#include "ClientTask.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
- void collocated_setup();
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
- typedef ServantList<Foo_A_i> ServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- ServantListType servants_;
-
- ClientTask collocated_client_task_;
-
- ACE_CString exe_name_;
-
- ACE_CString ior_filename_prefix_;
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned collocated_client_kind_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/client_main.cpp
deleted file mode 100644
index 3814bef5ff9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/client_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl
deleted file mode 100755
index 37fd19f21f6..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my $status = 0;
-
-my $iorfname_prefix = "servant";
-my $num_servants = 1;
-my $num_orb_threads = 1;
-my $num_remote_clients = 1;
-my $num_csd_threads = 1;
-my $num_collocated_clients = 0;
-my $collocated_client_kind = 0;
-my $client_kind = 0;
-
-my $i;
-my $j;
-my @iorfile;
-
-my $ARGC = @ARGV;
-
-if ($ARGC > 0)
-{
- if ($ARGC > 1)
- {
- print STDERR "ERROR: Too many command-line arguments for $0.\n";
- exit 1;
- }
-
- my $subtest = $ARGV[0];
-
- if ($subtest eq 'remote')
- {
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'collocated')
- {
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
- }
- elsif ($subtest eq 'remote_orbthreads')
- {
- $num_orb_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_servants')
- {
- $num_servants = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_csdthreads')
- {
- $num_csd_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'usage')
- {
- print STDOUT "Usage: $0 [<subtest>]\n" .
- "\n" .
- "Supported <subtest> values:\n" .
- "\n" .
- "\tremote\n" .
- "\tcollocated\n" .
- "\tremote_orbthreads\n" .
- "\tremote_servants\n" .
- "\tremote_csdthreads\n" .
- "\tremote_big\n" .
- "\tusage\n" .
- "\n";
- exit 0;
- }
- else
- {
- print STDERR "ERROR: invalid subtest argument for $0: $subtest\n";
- exit 1;
- }
-}
-
-#Delete old ior files.
-for ($i = 0; $i < $num_servants; $i++) {
- my $servant_id = sprintf("%02d", ($i + 1));
- $iorfile[$i] = PerlACE::LocalFile($iorfname_prefix . "_$servant_id.ior");
- unlink $iorfile[$i];
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-else {
- $SV = new PerlACE::Process("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-
-
-$SV->Spawn();
-
-
-# Wait for the servant ior files created by server.
-for ($i = 0; $i < $num_servants; $i++) {
- if (PerlACE::waitforfile_timed
- ($iorfile[$i],
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile[$i]>\n";
- $SV->Kill();
- $SV->TimedWait(1);
- exit 1;
- }
-}
-
-
-my $count = 0;
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
-
- $client_id = $i+1;
-
- $j = $i % $num_servants;
-
- $CLS[$i] = new PerlACE::Process("client_main",
- "-i file://$iorfile[$j] ".
- "-k $client_kind ".
- "-n $client_id");
-
- $CLS[$i]->Spawn();
-}
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client = $CLS[$i]->WaitKill(60);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill(60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-#Delete ior files generated by this run.
-for ($i = 0; $i < $num_servants; $i++) {
- unlink $iorfile[$i];
-}
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/server_main.cpp
deleted file mode 100644
index 0be257accae..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/server_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/CSD_TP_Test_3.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/CSD_TP_Test_3.mpc
deleted file mode 100644
index 016caef75ef..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/CSD_TP_Test_3.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_b {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_b {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.cpp
deleted file mode 100644
index 147b5ca43cf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.cpp
+++ /dev/null
@@ -1,326 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_B_ClientEngine.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ClientApp::ClientApp()
-: TestAppBase("TP_Test_3_Client"),
- client_task_ (true), // shutdown orb after client is done.
- num_servants_ (1),
- num_csd_threads_ (1),
- num_orb_threads_ (1),
- ior_("Not Set"),
- client_kind_(0),
- client_id_(0)
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_clients();
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- result = this->check_validity () ? 0 : -1;
- this->cleanup();
-
- return result;
-}
-
-
-int
-ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- TheAppShutdown->init(this->orb_.in(), num_servants_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ClientApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ClientApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-}
-
-
-void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Turn the ior_ into a Foo_B obj ref.
- Foo_B_var foo = RefHelper<Foo_B>::string_to_ref(this->orb_.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->servants_.create_and_activate(1, // number of callback servants
- this->poa_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ServantListType::T_stub_var cb = this->servants_.objref(0);
-
- // Create the ClientEngine object, and give it the Foo_B and Callback object
- // references.
- ClientEngine_Handle engine
- = new Foo_B_ClientEngine(foo.in(), cb.in (), this->client_id_);
- this->client_task_.add_engine(engine.in());
-}
-
-
-void
-ClientApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ClientApp::run_clients()
-{
- this->client_task_.open();
-}
-
-
-void
-ClientApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-PortableServer::POA_ptr
-ClientApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-void
-ClientApp::cleanup()
-{
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "i:k:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case 'k':
- result = set_arg(this->client_kind_,
- get_opts.opt_arg(),
- c,
- "client_kind");
- break;
-
- case 'n':
- result = set_arg(this->client_id_,
- get_opts.opt_arg(),
- c,
- "client_id");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ClientApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-i <ior>]\n"
- "\t[-k <client_kind>]\n"
- "\t[-n <client_id>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ClientApp::arg_dependency_checks()
-{
- if (this->ior_ == "Not Set")
- {
- ACE_ERROR((LM_ERROR,
- "Error: Missing required command-line option (-i <ior>).\n"));
- this->usage_statement();
- return -1;
- }
- if (this->client_id_ <= 0)
- {
- ACE_ERROR((LM_ERROR,
- "Error: Invalid command-line option (-n <client id>). \n"
- " The client id should be positive integer. \n"));
- this->usage_statement();
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ClientApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-bool
-ClientApp::check_validity ()
-{
- // Check whether the clients return any errors.
- if (this->client_task_.failure_count () > 0)
- {
- return false;
- }
-
- return true;
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.h
deleted file mode 100644
index 2eb6f23bd39..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ClientEngine.h"
-#include "ServantList_T.h"
-#include "Callback_i.h"
-#include "ClientTask.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "tao/ORB.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_clients();
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
-
- typedef ServantList<Callback_i> ServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- ServantListType servants_;
-
- ClientTask client_task_;
-
- ACE_CString exe_name_;
-
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
-
- ACE_CString ior_;
- unsigned client_kind_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.cpp
deleted file mode 100644
index 883a0dec322..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.cpp
+++ /dev/null
@@ -1,428 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_B_ClientEngine.h"
-#include "Foo_B_ClientEngine.h"
-#include "Callback_i.h"
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_3_Server"),
- ior_filename_prefix_("foo"),
- num_servants_(1),
- num_csd_threads_(1),
- num_orb_threads_(1),
- num_remote_clients_(1),
- num_collocated_clients_(0),
- collocated_client_kind_(0)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->collocated_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is ready. Running the ORB event loop.\n"));
-
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp ORB event loop has completed.\n"));
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
- result = this->check_validity () ? 0 : -1;
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp check_validity returned %d .\n", result));
-
- return result;
-}
-
-
-int
-ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- TheAppShutdown->init(this->orb_.in(), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_poa_ = this->create_poa(this->orb_.in(),
- "CallbackPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-
- // Use another poa and strategy for callbacks. This would resolve
- // the deadlock situation that happens when having number of csd
- // threads less than number of collocated clients.
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_tp_strategy_ = new TAO::CSD::TP_Strategy();
- if (!this->cb_tp_strategy_->apply_to(this->cb_poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to callback poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
- }
-}
-
-
-void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->foo_servants_.create_and_activate(this->num_servants_,
- this->orb_.in (),
- this->poa_.in (),
- this->ior_filename_prefix_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::collocated_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ == 0)
- return;
-
- this->cb_servants_.create_and_activate(1, // number of callback servants
- this->cb_poa_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CallbackServantListType::T_stub_var cb = this->cb_servants_.objref(0);
-
- unsigned client_id = this->num_remote_clients_;
-
- for (unsigned i = 0; i < this->num_collocated_clients_; i++)
- {
- client_id ++;
- // Dole out the servant object references in a round-robin fashion.
- unsigned servant_index = i % this->num_servants_;
-
- FooServantListType::T_stub_var foo
- = this->foo_servants_.objref(servant_index);
- ClientEngine_Handle engine
- = new Foo_B_ClientEngine(foo.in(), cb.in (), client_id, true);
- this->collocated_client_task_.add_engine(engine.in());
- }
-}
-
-
-void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ > 0)
- {
- if (this->collocated_client_task_.open() == -1)
- {
- ACE_THROW (TestAppException ());
- }
- }
-}
-
-
-void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-void
-ServerApp::cleanup()
-{
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "p:s:n:t:r:c:k:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'p':
- this->ior_filename_prefix_ = get_opts.opt_arg();
- break;
-
- case 's':
- result = set_arg(this->num_servants_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 'n':
- result = set_arg(this->num_csd_threads_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 't':
- result = set_arg(this->num_orb_threads_,
- get_opts.opt_arg(),
- c,
- "num_orb_threads",
- 1);
- break;
-
- case 'r':
- result = set_arg(this->num_remote_clients_,
- get_opts.opt_arg(),
- c,
- "num_remote_clients");
- break;
-
- case 'c':
- result = set_arg(this->num_collocated_clients_,
- get_opts.opt_arg(),
- c,
- "num_collocated_clients");
- break;
-
- case 'k':
- result = set_arg(this->collocated_client_kind_,
- get_opts.opt_arg(),
- c,
- "collocated_client_kind");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ServerApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-p <ior_filename_prefix>]\n"
- "\t[-s <num_servants>]\n"
- "\t[-n <num_csd_threads>]\n"
- "\t[-t <num_orb_threads>]\n"
- "\t[-r <num_remote_clients>]\n"
- "\t[-c <num_collocated_clients>]\n"
- "\t[-k <collocated_client_kind>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ServerApp::arg_dependency_checks()
-{
- return (this->num_remote_clients_
- + this->num_collocated_clients_) > 0 ? 0 : -1;
-}
-
-
-int
-ServerApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-PortableServer::POA_ptr
-ServerApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-bool
-ServerApp::check_validity ()
-{
- // Check whether the clients return any errors.
- if (this->num_collocated_clients_ > 0
- && this->collocated_client_task_.failure_count () > 0)
- {
- return false;
- }
-
- Foo_B_Statistics stats (this->num_remote_clients_,
- this->num_collocated_clients_);
-
- Foo_B_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->foo_servants_.servant(i)->gather_stats (stats);
- }
-
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_servants_.servant (0)->gather_stats (stats);
- }
-
- return stats.actual_vs_expected ();
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.h
deleted file mode 100644
index 12af1ec455b..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "ServantList_T.h"
-#include "ClientTask.h"
-#include "Foo_B_i.h"
-#include "Callback_i.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
- void collocated_setup(ACE_ENV_SINGLE_ARG_DECL);
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
- typedef ServantList<Foo_B_i> FooServantListType;
- typedef ServantList<Callback_i> CallbackServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- PortableServer::POA_var cb_poa_;
- TAO::CSD::TP_Strategy_Handle cb_tp_strategy_;
-
- FooServantListType foo_servants_;
- CallbackServantListType cb_servants_;
-
- ClientTask collocated_client_task_;
-
- ACE_CString exe_name_;
-
- ACE_CString ior_filename_prefix_;
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned collocated_client_kind_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/client_main.cpp
deleted file mode 100644
index 3814bef5ff9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/client_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl
deleted file mode 100755
index 13aac1fa8c9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my $status = 0;
-
-my $iorfname_prefix = "servant";
-my $num_servants = 1;
-my $num_orb_threads = 1;
-my $num_remote_clients = 1;
-my $num_csd_threads = 1;
-my $num_collocated_clients = 0;
-my $collocated_client_kind = 0;
-my $client_kind = 0;
-
-my $i;
-my $j;
-my @iorfile;
-
-my $ARGC = @ARGV;
-
-if ($ARGC > 0)
-{
- if ($ARGC > 1)
- {
- print STDERR "ERROR: Too many command-line arguments for $0.\n";
- exit 1;
- }
-
- my $subtest = $ARGV[0];
-
- if ($subtest eq 'remote')
- {
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'collocated')
- {
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
- $num_csd_threads=1;
- }
- elsif ($subtest eq 'remote_orbthreads')
- {
- $num_orb_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_servants')
- {
- $num_servants = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_csdthreads')
- {
- $num_csd_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'usage')
- {
- print STDOUT "Usage: $0 [<subtest>]\n" .
- "\n" .
- "Supported <subtest> values:\n" .
- "\n" .
- "\tremote\n" .
- "\tcollocated\n" .
- "\tremote_orbthreads\n" .
- "\tremote_servants\n" .
- "\tremote_csdthreads\n" .
- "\tremote_big\n" .
- "\tusage\n" .
- "\n";
- exit 0;
- }
- else
- {
- print STDERR "ERROR: invalid subtest argument for $0: $subtest\n";
- exit 1;
- }
-}
-
-#Delete old ior files.
-for ($i = 0; $i < $num_servants; $i++) {
- my $servant_id = sprintf("%02d", ($i + 1));
- $iorfile[$i] = PerlACE::LocalFile($iorfname_prefix . "_$servant_id.ior");
- unlink $iorfile[$i];
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-else {
- $SV = new PerlACE::Process("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-
-
-
-$SV->Spawn();
-
-# Wait for the servant ior files created by server.
-for ($i = 0; $i < $num_servants; $i++) {
- if (PerlACE::waitforfile_timed
- ($iorfile[$i],
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile[$i]>\n";
- $SV->Kill();
- $SV->TimedWait(1);
- exit 1;
- }
-}
-
-my $count = 0;
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client_id = $i + 1;
-
- $j = $i % $num_servants;
-
- $CLS[$i] = new PerlACE::Process("client_main",
- "-i file://$iorfile[$j] ".
- "-k $client_kind ".
- "-n $client_id");
-# print STDERR $CLS[$i]->CommandLine() . "\n";
-
- $CLS[$i]->Spawn();
-}
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client = $CLS[$i]->WaitKill(60);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill(60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-#Delete ior files generated by this run.
-for ($i = 0; $i < $num_servants; $i++) {
- unlink $iorfile[$i];
-}
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/CSD_TP_Test_4.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/CSD_TP_Test_4.mpc
deleted file mode 100644
index ca9f92ac607..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/CSD_TP_Test_4.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_c {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_c {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp
deleted file mode 100644
index 57520df303c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "Foo_C_ClientEngine.h"
-#include "ace/Get_Opt.h"
-
-
-ClientApp::ClientApp()
- : TestAppBase("TP_Test_4_Client"),
- ior_("Not Set"),
- client_kind_(0),
- client_id_(0)
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- result = this->run_engine(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->cleanup();
-
- return result;
-}
-
-
-int
-ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- return this->parse_args(argc, argv);
-}
-
-
-void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Turn the ior_ into a Foo_C obj ref.
- Foo_C_var foo = RefHelper<Foo_C>::string_to_ref(this->orb_.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Create the ClientEngine object, and give it the Foo_C obj ref.
- this->engine_ = new Foo_C_ClientEngine(foo.in(), this->client_id_);
-}
-
-
-int
-ClientApp::run_engine(ACE_ENV_SINGLE_ARG_DECL)
-{
- bool result = this->engine_->execute(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return result ? 0 : -1;
-}
-
-
-void
-ClientApp::cleanup()
-{
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "i:k:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case 'k':
- result = set_arg(this->client_kind_,
- get_opts.opt_arg(),
- c,
- "client_kind");
- break;
-
- case 'n':
- result = set_arg(this->client_id_,
- get_opts.opt_arg(),
- c,
- "client_id");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ClientApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-i <ior>]\n"
- "\t[-k <client_kind>]\n"
- "\t[-n <client_id>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ClientApp::arg_dependency_checks()
-{
- if (this->ior_ == "Not Set")
- {
- ACE_ERROR((LM_ERROR,
- "Error: Missing required command-line option (-i <ior>).\n"));
- this->usage_statement();
- return -1;
- }
-
- if (this->client_id_ <= 0)
- {
- ACE_ERROR((LM_ERROR,
- "Error: Invalid command-line option (-n <client id>). \n"
- " The client id should be positive integer. \n"));
- this->usage_statement();
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ClientApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
-
- return 0;
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h
deleted file mode 100644
index e2f7bf6fc06..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ClientEngine.h"
-#include "tao/ORB.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- int run_engine(ACE_ENV_SINGLE_ARG_DECL);
- void cleanup();
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- CORBA::ORB_var orb_;
- ACE_CString exe_name_;
- ACE_CString ior_;
- unsigned client_kind_;
- ClientEngine_Handle engine_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/README b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/README
deleted file mode 100644
index 100428e0103..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/README
+++ /dev/null
@@ -1,337 +0,0 @@
-// $Id$
-===========================================================================
-Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_4
-
-Uses Libs: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_Lib
- $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Foo_C
-
-===========================================================================
-Executable: server_main
-
-Description: The test server application.
-
-Command-Line:
-
- % server_main [options]
-
- where, [options] includes the following:
-
- -p <ior_filename_prefix>
- -s <num_servants>
- -n <num_csd_threads>
- -t <num_orb_threads>
- -r <num_remote_clients>
- -c <num_collocated_clients>
- -k <collocated_client_kind>
- -?
-
-Command-Line Arguments:
-
- -p <ior_filename_prefix>
-
- If not specified, the <ior_filename_prefix> defaults to "foo".
- This value is used as the prefix for the filename(s) to which
- the server application will write stringified object reference(s).
- Each "IOR file" contains the (stringified) object reference
- associated with a distinct servant object within the server
- application. These files are the way that the client application(s)
- are able to "locate" the object reference(s) upon which they will
- invoke (CORBA) operations. In essence, the filesystem is used
- as a "poor-man" Naming Service.
-
- The filenames are of the form, "prefix_%02d.ior", using a unique
- integer "id" for each file - starting with an "id" of 1. Thus,
- if the server application was told to create 3 servants (via the
- -s <num_servants> option), and the <ior_filename_prefix> is "foo",
- then three files will be written by the server application:
-
- foo_01.ior
- foo_02.ior
- foo_03.ior
-
-
- -s <num_servants>
-
- The <num_servants> must be an integer value greater than 0.
-
- If not specified, the <num_servants> defaults to 1. This is used
- to inform the server application of the number of distinct servant
- objects that it should create.
-
-
- -n <num_csd_threads>
-
- The <num_csd_threads> must be an integer value greater than 0.
-
- If not specified, the <num_csd_threads> defaults to 1. This is
- used to inform the server application of the number of worker
- threads that should be activated by the Thread Pool CSD Strategy.
- The worker threads are responsible for servicing the strategy's
- request queue. This can also be called the "size of the thread
- pool".
-
-
- -t <num_orb_threads>
-
- The <num_orb_threads> must be an integer value greater than 0.
-
- If not specified, the <num_orb_threads> defaults to 1. This option
- is used to tell the server application how many distinct threads
- should be used to run the ORB event loop. The "mainline thread"
- will always run the ORB event loop itself, so that accounts for
- one of the num_orb_threads. If num_orb_threads is greater than 1,
- then (num_orb_threads - 1) threads will be activated by the server
- application, and each of these threads will run the ORB event loop.
- The end result is that there will be <num_orb_threads> distinct
- threads (including the mainline thread) running the ORB event loop.
-
-
- -r <num_remote_clients>
-
- The <num_remote_clients> must be an integer value greater than,
- or equal to, 0. In addition, the sum of the <num_remote_clients>
- and the <num_collocated_clients> (see the -c option) must be
- greater than 0. Both cannot be 0, since the server application
- would interpret this to mean that no clients will ever use it,
- and that's kind of pointless.
-
- If not specified, the <num_remote_clients> defaults to 1. This
- option informs the server application how many remote clients it
- can expect to "hear" from over the course of its lifetime. Each
- distinct test client, remote or collocated, is required to invoke
- the done() operation on one of the servant objects. The server
- application decides to shut itself down gracefully when it has
- received one done() invocation for each remote client and for
- each collocated client. Once all of the expected done() calls
- have been made, the server application assumes that no more clients
- will need its services, and thus it shuts itself down. This is
- used to support the automated test scenarios implemented within
- the run_test.pl script. It provides a way for a test scenario to
- automate the graceful shutdown of the server by telling the server
- how many clients to expect (remote + collocated).
-
-
- -c <num_collocated_clients>
-
- The <num_collocated_clients> must be an integer value greater than,
- or equal to, 0. In addition, the sum of the <num_collocated_clients>
- and the <num_remote_clients> (see the -r option) must be
- greater than 0. Both cannot be 0, since the server application
- would interpret this to mean that no clients will ever use it,
- and that's kind of pointless.
-
- If not specified, the <num_collocated_clients> defaults to 0. This
- option informs the server application how many collocated clients
- should "live", collocated, within the server application. Each
- collocated client will execute its logic in a distinct thread
- within the server application. As an example, if the server
- application was told to use a <num_collocated_clients> value of 40,
- then the server application will activate 40 threads - each
- carrying out the logic of one "client". This client "logic" is
- identical to the logic carried out by a single remote client
- application (client_main) process. As with remote clients,
- each collocated client will invoke the done() operation on
- one of the servants (via an object ref) when the client logic
- has been completed. See the "-r <num_remote_clients>" option
- for more information about the done() operation, and its purpose.
-
- For this particular server application (TP_Test_4), each
- collocated client will perform the normal client logic as well
- as carry out a set of "custom" requests on the collocated servant.
- Custom operations not defined in IDL.
-
-
- -k <collocated_client_kind>
-
- This is reserved for future use. It currently doesn't get used
- for anything.
-
-
- -?
-
- This is used to request the "Usage Statement" for the Server
- Application (ie, "server_main -?" prints the usage statement).
-
-
-===========================================================================
-Executable: client_main
-
-Description: The test client application.
-
-Command-Line:
-
- % client_main [options]
-
- where, [options] includes the following:
-
- -i <ior>
- -n <client_id>
- -k <collocated_client_kind>
- -?
-
-
-Command-Line Arguments:
-
- -i <ior>
-
- The <ior> is required, and must be a valid IOR. In our case, where
- the server application saves stringified object references to files,
- we supply the client application with an <ior> in the following
- form: "file://foo_01.ior". See the server application's description
- of its "-p <ior_filename_prefix>" option for more information.
-
- The client application will use the <ior> to obtain an object
- reference using the CORBA::ORB::string_to_object() method. This
- is the object reference upon which the client logic will invoke
- operations. The object reference will be associated with a
- distinct servant object within the server application.
-
-
- -n <client_id>
-
- The <client_id> is required, and must be an integer value greater
- than 0.
-
- As part of the logic used to check actual vs. expected results,
- each client is assigned a unique id. As a side-note, each
- collocated client within the server application (if there are
- any) will also be assigned a unique client_id. For any given
- test scenario run by the run_test.pl script, each client (remote
- and/or collocated) will be assigned a unique client_id.
-
- The server application assigns client_ids to its collocated clients
- based upon its knowledge of how many remote clients will be used
- in the test scenario (see the "-r <num_remote_clients>" option
- for the server application). The server application assumes that
- the run_test.pl will assign client_ids to remote clients starting
- with 1, and up to the <num_remote_clients>. Thus, the server
- application assigns client_ids to collocated clients starting
- with (<num_remote_clients> + 1), and incrementing by 1 for each
- additional collocated client_id.
-
-
- -k <collocated_client_kind>
-
- This is reserved for future use. It currently doesn't get used
- for anything.
-
-
- -?
-
- This is used to request the "Usage Statement" for the Client
- Application (ie, "client_main -?" prints the usage statement).
-
-
-===========================================================================
-Executable: run_test.pl (PERL script).
-
-Description: Script used to run a specific test scenario. This includes
- the launching of a server application process and client
- applications processes as called for by the specific scenario.
-
-Command-Line:
-
- % run_test.pl <scenario>
-
- where, <scenario> can be one of the following values:
-
- "big"
- "a"
- "b"
-
- If a <scenario> is not specified on the run_test.pl command-line,
- then a default scenario is used.
-
-
-Scenarios:
-
- -----------------------------------------------------------------------
- Default: (when no <scenario> is specified on the command-line)
-
- $iorfname_prefix = "servant";
- $num_servants = 1;
- $num_orb_threads = 1;
- $num_remote_clients = 1;
- $num_csd_threads = 1;
- $num_collocated_clients = 0;
-
- -----------------------------------------------------------------------
- "remote":
-
- Uses the Default values, with the following overrides:
-
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "collocated":
-
- Uses the Default values, with the following overrides:
-
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
-
- -----------------------------------------------------------------------
- "collocated_big":
-
- Uses the Default values, with the following overrides:
-
- $num_remote_clients = 0;
- $num_csd_threads = 5;
- $num_collocated_clients = 40;
-
- -----------------------------------------------------------------------
- "remote_orbthreads":
-
- Uses the Default values, with the following overrides:
-
- $num_orb_threads = 5;
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "remote_servants":
-
- Uses the Default values, with the following overrides:
-
- $num_servants = 5;
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "remote_csdthreads":
-
- Uses the Default values, with the following overrides:
-
- $num_csd_threads = 5;
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "remote_big":
-
- Uses the Default values, with the following overrides:
-
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "big":
-
- Uses the Default values, with the following overrides:
-
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
-
- -----------------------------------------------------------------------
- "usage":
-
- This is not really a test scenario, but it will cause the
- run_test.pl script to print a "Usage Statement", which includes
- a list of the supported <scenario> values.
-
- -----------------------------------------------------------------------
-
-
-===========================================================================
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp
deleted file mode 100644
index 9ce517c4863..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp
+++ /dev/null
@@ -1,391 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_C_Custom_ClientEngine.h"
-#include "Foo_C_ClientEngine.h"
-#include "Foo_C_Statistics.h"
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_4_Server"),
- ior_filename_prefix_("foo"),
- num_servants_(1),
- num_csd_threads_(1),
- num_orb_threads_(1),
- num_remote_clients_(1),
- num_collocated_clients_(0),
- collocated_client_kind_(0)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->collocated_setup();
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
- return this->check_validity () ? 0 : -1;
-}
-
-
-int
-ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- TheAppShutdown->init(this->orb_.in(), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-}
-
-
-void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->servants_.create_and_activate(this->num_servants_,
- this->orb_.in (),
- this->poa_.in (),
- this->ior_filename_prefix_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::collocated_setup()
-{
- int custom_client_id_start = this->num_remote_clients_;
-
- unsigned servant_index = 0;
-
- for (unsigned i = 0; i < this->num_collocated_clients_; i++)
- {
- if (i > 0)
- {
- // Dole out the servant object references in a round-robin fashion.
- servant_index = (servant_index + 1) % this->num_servants_;
- }
-
- ServantListType::T_stub_var obj = this->servants_.objref(servant_index);
-
- ClientEngine_Handle engine =
- new Foo_C_Custom_ClientEngine(this->servants_.servant(servant_index),
- obj.in(),
- this->tp_strategy_.in(),
- ++ custom_client_id_start);
- this->collocated_client_task_.add_engine(engine.in());
- }
-}
-
-
-void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ > 0)
- {
- if (this->collocated_client_task_.open() == -1)
- {
- ACE_THROW (TestAppException ());
- }
- }
-}
-
-
-void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-void
-ServerApp::cleanup()
-{
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->servants_.servant(i)->dump();
- }
-
- // Wait for all of the collocated client task threads to finish.
- if (this->num_collocated_clients_ > 0)
- {
- this->collocated_client_task_.wait();
- }
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "p:s:n:t:r:c:k:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'p':
- this->ior_filename_prefix_ = get_opts.opt_arg();
- break;
-
- case 's':
- result = this->set_arg(this->num_servants_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 'n':
- result = this->set_arg(this->num_csd_threads_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 't':
- result = this->set_arg(this->num_orb_threads_,
- get_opts.opt_arg(),
- c,
- "num_orb_threads",
- 1);
- break;
-
- case 'r':
- result = this->set_arg(this->num_remote_clients_,
- get_opts.opt_arg(),
- c,
- "num_remote_clients");
- break;
-
- case 'c':
- result = this->set_arg(this->num_collocated_clients_,
- get_opts.opt_arg(),
- c,
- "num_collocated_clients");
- break;
-
- case 'k':
- result = this->set_arg(this->collocated_client_kind_,
- get_opts.opt_arg(),
- c,
- "collocated_client_kind");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ServerApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-p <ior_filename_prefix>]\n"
- "\t[-s <num_servants>]\n"
- "\t[-n <num_csd_threads>]\n"
- "\t[-t <num_orb_threads>]\n"
- "\t[-r <num_remote_clients>]\n"
- "\t[-c <num_collocated_clients>]\n"
- "\t[-k <collocated_client_kind>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ServerApp::arg_dependency_checks()
-{
- return (this->num_remote_clients_
- + this->num_collocated_clients_) > 0 ? 0 : -1;
-}
-
-
-int
-ServerApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
-
- return 0;
-}
-
-
-PortableServer::POA_ptr
-ServerApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa
- = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-bool
-ServerApp::check_validity ()
-{
- Foo_C_Statistics stats (this->num_remote_clients_,
- this->num_collocated_clients_);
-
- Foo_C_ClientEngine::expected_results (stats);
- Foo_C_Custom_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->servants_.servant(i)->gather_stats(stats);
- }
-
- return stats.actual_vs_expected ();
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h
deleted file mode 100644
index 99f0af758b5..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "Foo_C_i.h"
-#include "ServantList_T.h"
-#include "ClientTask.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
- void collocated_setup();
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
- typedef ServantList<Foo_C_i> ServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- ServantListType servants_;
-
- ClientTask collocated_client_task_;
-
- ACE_CString exe_name_;
-
- ACE_CString ior_filename_prefix_;
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned collocated_client_kind_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/client_main.cpp
deleted file mode 100644
index 3814bef5ff9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/client_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl
deleted file mode 100755
index f50c6616e1e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl
+++ /dev/null
@@ -1,191 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my $status = 0;
-
-my $iorfname_prefix = "servant";
-my $num_servants = 1;
-my $num_orb_threads = 1;
-my $num_remote_clients = 1;
-my $num_csd_threads = 1;
-my $num_collocated_clients = 0;
-my $collocated_client_kind = 0;
-my $client_kind = 0;
-
-my $i;
-my $j;
-my @iorfile;
-
-my $ARGC = @ARGV;
-
-if ($ARGC > 0)
-{
- if ($ARGC > 1)
- {
- print STDERR "ERROR: Too many command-line arguments for $0.\n";
- exit 1;
- }
-
- my $subtest = $ARGV[0];
-
- if ($subtest eq 'remote')
- {
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'collocated')
- {
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
- }
- elsif ($subtest eq 'collocated_big')
- {
- $num_remote_clients = 0;
- $num_csd_threads = 5;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'remote_orbthreads')
- {
- $num_orb_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_servants')
- {
- $num_servants = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_csdthreads')
- {
- $num_csd_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'usage')
- {
- print STDOUT "Usage: $0 [<subtest>]\n" .
- "\n" .
- "Supported <subtest> values:\n" .
- "\n" .
- "\tremote\n" .
- "\tcollocated\n" .
- "\tremote_orbthreads\n" .
- "\tremote_servants\n" .
- "\tremote_csdthreads\n" .
- "\tremote_big\n" .
- "\tusage\n" .
- "\n";
- exit 0;
- }
- else
- {
- print STDERR "ERROR: invalid subtest argument for $0: $subtest\n";
- exit 1;
- }
-}
-
-#Delete old ior files.
-for ($i = 0; $i < $num_servants; $i++) {
- my $servant_id = sprintf("%02d", ($i + 1));
- $iorfile[$i] = PerlACE::LocalFile($iorfname_prefix . "_$servant_id.ior");
- unlink $iorfile[$i];
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-
-}
-else {
- $SV = new PerlACE::Process("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-
-
-$SV->Spawn();
-
-# Wait for the servant ior files created by server.
-for ($i = 0; $i < $num_servants; $i++) {
- if (PerlACE::waitforfile_timed
- ($iorfile[$i],
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile[$i]>\n";
- $SV->Kill();
- $SV->TimedWait(1);
- exit 1;
- }
-}
-
-my $count = 0;
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
-
- $client_id = $i+1;
-
- $j = $i % $num_servants;
-
- $CLS[$i] = new PerlACE::Process("client_main",
- "-i file://$iorfile[$j] ".
- "-k $client_kind ".
- "-n $client_id");
-
- $CLS[$i]->Spawn();
-}
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client = $CLS[$i]->WaitKill(60);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill(60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-#Delete ior files generated by this run.
-for ($i = 0; $i < $num_servants; $i++) {
- unlink $iorfile[$i];
-}
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/CSD_TP_Test_Dynamic.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/CSD_TP_Test_Dynamic.mpc
deleted file mode 100644
index 9da402191ea..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/CSD_TP_Test_Dynamic.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.cpp
deleted file mode 100644
index 70af3ea8a11..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Hello interface
-class Hello
- : public virtual POA_Test::Hello
-{
-public:
- /// Constructor
- Hello (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/README b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/README
deleted file mode 100644
index a4e3fbcdc2a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/README
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id$
-===========================================================================
-Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_5
-
-===========================================================================
-
-===========================================================================
-Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_Static
-
-===========================================================================
-This test shows the ThreadPool strategy can automatically apply to the poa
-via service configuration file dynamic directive.
-
-This simple test is a copy of $TAO_ROOT/tests/Hello test. The difference is
-this test contains the svc.conf file to configure the CSD strategies and the
-poas that apply the CSD strategy.
-
-A new TP_Strategy object is created during the initialization of the
-TP_Strategy_Factory service object and it will be automatically applied to
-a poa.
-
-The service configuration file specifies the number of threads that
-the ThreadPool strategy have and also specify which poa the strategy should
-apply to. We can specify multiple ThreadPool strategies and the poas via -CSDtp
-option.
-
-e.g
-dynamic TAO_CSD_TP_Strategy_Factory Service_Object *
-TAO_CSD_ThreadPool:_make_TAO_CSD_TP_Strategy_Factory() "-CSDtp RootPOA:2 -CSDtp childpoa:4"
-
-
-To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Test.idl b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A very simple interface
- interface Hello
- {
- /// Return a simple string
- string get_string ();
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/client.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/client.cpp
deleted file mode 100644
index f85722246b5..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/client.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl
deleted file mode 100755
index de69f709455..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/server.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/server.cpp
deleted file mode 100644
index bd2b023e2b7..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/server.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/Thread_Manager.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/svc.conf b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/svc.conf
deleted file mode 100644
index e59fb4ac94c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-dynamic TAO_CSD_TP_Strategy_Factory Service_Object * TAO_CSD_ThreadPool:_make_TAO_CSD_TP_Strategy_Factory() "-CSDtp RootPOA:2"
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/CSD_TP_Test_Static.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/CSD_TP_Test_Static.mpc
deleted file mode 100644
index afd9e5d8e68..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/CSD_TP_Test_Static.mpc
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_a {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_a {
- exename=client_main
- after += *Server
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.cpp
deleted file mode 100644
index 38dd8c26647..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "Foo_A_ClientEngine.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ClientApp::ClientApp()
- : TestAppBase("TP_Test_1_Client"),
- ior_ ("file://test.ior")
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB before parsing our own args.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Returns -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
- // Convert the IOR string to a Foo_A object reference.
- Foo_A_var foo = RefHelper<Foo_A>::string_to_ref(orb.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the appropriate client "engine" object.
- Foo_A_ClientEngine engine(foo.in());
-
- // Execute the client algorithm
- result = engine.execute(ACE_ENV_SINGLE_ARG_PARAMETER) ? 0 : -1;
- ACE_CHECK_RETURN (-1);
-
- return result;
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- ACE_Get_Opt get_opts(argc, argv, "i:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case '?':
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) usage: %s -i <ior_string>\n",
- argv[0]));
- return 1;
-
- default:
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -i <ior_string>\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.h
deleted file mode 100644
index 1af2e9ff6a6..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- int parse_args(int argc, char* argv[]);
-
- ACE_CString ior_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README
deleted file mode 100644
index 8090bdb87ce..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-===========================================================================
-Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_Static
-
-===========================================================================
-This test shows the ThreadPool strategy can automatically apply to the poa
-via service configuration file static directive.
-
-This simple test is a copy of TP_Test_1. The difference is the test
-application does not need to create the TP_Strategy object and apply to the
-poa. A new TP_Strategy object is created during the initialization of the
-TP_Strategy_Factory service object and it will be automatically applied to
-a poa.
-
-The application needs to include the following two files to force the
-TAO_CSD_ORB_Loader and TAO_CSD_TP_Strategy_Factory service objects register
-with the service repository before initializing the services specified in
-.conf file.
-
-#include "tao/CSD_Framework/CSD_ORB_Loader.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.h"
-
-
-The service configuration file specifies the number of threads that
-the ThreadPool strategy have and also specify which poa the strategy should
-apply to. We can specify multiple ThreadPool strategies and the poas via -CSDtp
-option.
-
-e.g
-static TAO_CSD_TP_Strategy_Factory "-CSDtp RootPOA:2 -CSDtp ChildPoa:3"
-
-
-To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.cpp
deleted file mode 100644
index c4af3802881..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "Foo_A_i.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "AppShutdown.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_1_Server"),
- ior_filename_ ("test.ior"),
- num_clients_ (1)
-{
-}
-
-ServerApp::~ServerApp()
-{
-}
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB before parsing our own args.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Returns -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- TheAppShutdown->init(orb.in(), num_clients_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the Root POA
- PortableServer::POA_var root_poa =
- RefHelper<PortableServer::POA>::resolve_initial_ref(orb.in(),
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var child_poa =
- AppHelper::create_poa("ChildPoa",
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the servant object.
- Foo_A_i* servant = new Foo_A_i();
-
- // Local smart pointer variable to deal with releasing the reference
- // to the servant object when the variable falls out of scope.
- PortableServer::ServantBase_var servant_owner(servant);
-
- // Obtain the object reference using the servant
- CORBA::Object_var obj = AppHelper::activate_servant(child_poa.in(),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Stringify and save the object reference to a file
- AppHelper::ref_to_file(orb.in(),
- obj.in(),
- this->ior_filename_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Activate the POA Manager
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is ready. Running the ORB event loop.\n"));
-
- // Run the ORB event loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp ORB event loop has completed.\n"));
-
- TheAppShutdown->wait ();
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is destroying the Root POA.\n"));
-
- root_poa->destroy(1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is destroying the ORB.\n"));
-
- orb->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp has completed running successfully.\n"));
-
- return 0;
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- ACE_Get_Opt get_opts(argc, argv, "o:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'o':
- this->ior_filename_ = get_opts.opt_arg();
- break;
-
- case 'n':
- {
- int tmp = ACE_OS::atoi(get_opts.opt_arg());
- if (tmp < 1)
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Error. -n must be followed by an integer "
- "value greater than 0.\n"));
- return -1;
- }
-
- this->num_clients_ = tmp;
- }
- break;
-
- case '?':
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -o <ior_filename> -n <num_clients>\n",
- argv[0]));
- return 1;
-
- default:
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -o <ior_filename> -n <num_clients>\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.h
deleted file mode 100644
index 3bfe10e6f0a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- int parse_args(int argc, char* argv[]);
-
- ACE_CString ior_filename_;
- unsigned num_clients_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/client_main.cpp
deleted file mode 100644
index ae98ca0f6ac..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/client_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl
deleted file mode 100755
index 7e34ffa58ba..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$num_clients=40;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main", "-o $iorfile -n $num_clients");
-}
-else {
- $SV = new PerlACE::Process ("server_main", "-o $iorfile -n $num_clients");
-}
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-for ($i = 0; $i < $num_clients; $i++) {
-
- @CLS[$i] = new PerlACE::Process ("client_main", " -i file://$iorfile");
-
- @CLS[$i]->Spawn ();
-}
-
-for ($i = 0; $i < $num_clients; $i++) {
-
- $client = @CLS[$i]->WaitKill (60);
-
- if ($client != 0) {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/svc.conf b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/svc.conf
deleted file mode 100644
index a274350e4ac..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-static TAO_CSD_TP_Strategy_Factory "-CSDtp ChildPoa:2"
diff --git a/TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc b/TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc
index e64ad8d08a8..8e25b42d362 100644
--- a/TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc
+++ b/TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Cache_Growth_Test/client.cpp b/TAO/tests/Cache_Growth_Test/client.cpp
index 167a3e08b27..34aa000975b 100644
--- a/TAO/tests/Cache_Growth_Test/client.cpp
+++ b/TAO/tests/Cache_Growth_Test/client.cpp
@@ -2,6 +2,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Hello, client, "$Id$")
@@ -11,7 +12,7 @@ int do_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:x");
int c;
while ((c = get_opts ()) != -1)
@@ -40,15 +41,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Cache_Growth_Test/server.cpp b/TAO/tests/Cache_Growth_Test/server.cpp
index ef867fc77aa..90a69070b33 100644
--- a/TAO/tests/Cache_Growth_Test/server.cpp
+++ b/TAO/tests/Cache_Growth_Test/server.cpp
@@ -3,6 +3,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Hello, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/CallbackTest/CallbackTest.mpc b/TAO/tests/CallbackTest/CallbackTest.mpc
index 9bf640dd2b3..006030800af 100644
--- a/TAO/tests/CallbackTest/CallbackTest.mpc
+++ b/TAO/tests/CallbackTest/CallbackTest.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, portableserver, messaging {
- after += *Server
Source_Files {
Callback.cpp
client.cpp
diff --git a/TAO/tests/CallbackTest/client.cpp b/TAO/tests/CallbackTest/client.cpp
index c83089e148d..22cddc5edb9 100644
--- a/TAO/tests/CallbackTest/client.cpp
+++ b/TAO/tests/CallbackTest/client.cpp
@@ -5,6 +5,7 @@
#include "tao/Messaging/Messaging.h"
#include "tao/AnyTypeCode/Any.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Crashed_Callback, client, "$Id$")
@@ -13,7 +14,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,12 +37,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -94,7 +97,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
}
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/CallbackTest/run_test_ipv6.pl b/TAO/tests/CallbackTest/run_test_ipv6.pl
index d015ffcec7c..582838d1a6e 100755
--- a/TAO/tests/CallbackTest/run_test_ipv6.pl
+++ b/TAO/tests/CallbackTest/run_test_ipv6.pl
@@ -13,12 +13,12 @@ unlink $iorfile;
$status = 0;
if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBConnectIPV6Only 1");
+ $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBConnectIPV6Only YES");
}
else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -ORBConnectIPV6Only 1");
+ $SV = new PerlACE::Process ("server", "-o $iorfile -ORBConnectIPV6Only YES");
}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBConnectIPV6Only 1");
+$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBConnectIPV6Only YES");
$SV->Spawn ();
diff --git a/TAO/tests/CallbackTest/server.cpp b/TAO/tests/CallbackTest/server.cpp
index 07c1e010f40..3663887055e 100644
--- a/TAO/tests/CallbackTest/server.cpp
+++ b/TAO/tests/CallbackTest/server.cpp
@@ -6,6 +6,7 @@
#include "tao/AnyTypeCode/Any.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Crashed_Callback, server, "$Id$")
@@ -14,7 +15,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -95,7 +98,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
}
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Service *service_impl;
@@ -113,7 +116,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Client_Leaks/Client_Leaks.mpc b/TAO/tests/Client_Leaks/Client_Leaks.mpc
index a83a41950f3..41961bc999f 100644
--- a/TAO/tests/Client_Leaks/Client_Leaks.mpc
+++ b/TAO/tests/Client_Leaks/Client_Leaks.mpc
@@ -11,7 +11,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
Client_Task.cpp
@@ -21,7 +20,6 @@ project(*Client): taoclient, anytypecode {
project(*Child): taoserver {
exename = child
- after += *Client
Source_Files {
Process.cpp
child.cpp
diff --git a/TAO/tests/Client_Leaks/Process_Factory.cpp b/TAO/tests/Client_Leaks/Process_Factory.cpp
index f1039150d26..055556764e8 100644
--- a/TAO/tests/Client_Leaks/Process_Factory.cpp
+++ b/TAO/tests/Client_Leaks/Process_Factory.cpp
@@ -39,9 +39,11 @@ Process_Factory::create_new_process (ACE_ENV_SINGLE_ARG_DECL)
this->orb_->object_to_string (startup_callback.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (Test::Process::_nil ());
- const char* argv[3] = {
- "child",
- ior.in (),
+ ACE::String_Conversion::Convert_In<ACE_TCHAR, ACE_ANTI_TCHAR > tchar_ior( ior.in () );
+
+ const ACE_TCHAR* argv[3] = {
+ ACE_TEXT("child"),
+ tchar_ior.c_str (),
0};
ACE_Process_Options options;
diff --git a/TAO/tests/Client_Leaks/child.cpp b/TAO/tests/Client_Leaks/child.cpp
index 4ee5c104d0b..a3fd2feee89 100644
--- a/TAO/tests/Client_Leaks/child.cpp
+++ b/TAO/tests/Client_Leaks/child.cpp
@@ -2,16 +2,19 @@
#include "Process.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Client_Leaks, server, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (argc < 2)
@@ -27,7 +30,7 @@ main (int argc, char *argv[])
}
CORBA::Object_var object =
- orb->string_to_object (argv[1] ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object (ACE_TEXT_TO_CHAR_IN(argv[1]) ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Test::Startup_Callback_var startup_callback =
Test::Startup_Callback::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
diff --git a/TAO/tests/Client_Leaks/client.cpp b/TAO/tests/Client_Leaks/client.cpp
index a06c49b3e8a..a0f4eef3b79 100644
--- a/TAO/tests/Client_Leaks/client.cpp
+++ b/TAO/tests/Client_Leaks/client.cpp
@@ -2,6 +2,7 @@
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Client_Leaks, client, "$Id$")
@@ -12,7 +13,7 @@ int threads = 12;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -46,15 +47,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Client_Leaks/server.cpp b/TAO/tests/Client_Leaks/server.cpp
index 4260fbfd963..84ffa7a213b 100644
--- a/TAO/tests/Client_Leaks/server.cpp
+++ b/TAO/tests/Client_Leaks/server.cpp
@@ -3,6 +3,7 @@
#include "Process_Factory.h"
#include "Server_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Client_Leaks, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Process_Factory *process_factory_impl;
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/CodeSets/simple/CodeSets_simple.mpc b/TAO/tests/CodeSets/simple/CodeSets_simple.mpc
index a0a9ca666ce..ce9259b4c2c 100644
--- a/TAO/tests/CodeSets/simple/CodeSets_simple.mpc
+++ b/TAO/tests/CodeSets/simple/CodeSets_simple.mpc
@@ -2,7 +2,6 @@
// $Id$
project(*client) : taoclient, anytypecode {
- after += *server
IDL_Files {
simple.idl
}
diff --git a/TAO/tests/CodeSets/simple/client.cpp b/TAO/tests/CodeSets/simple/client.cpp
index edf6a3ab091..445b884b223 100644
--- a/TAO/tests/CodeSets/simple/client.cpp
+++ b/TAO/tests/CodeSets/simple/client.cpp
@@ -25,6 +25,7 @@
#include "ace/OS_NS_string.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
wchar_t *
make_wstring (const char *str)
@@ -33,11 +34,11 @@ make_wstring (const char *str)
if (str == 0)
return 0;
- size_t len = strlen (str) + 1;
+ int len = strlen (str) + 1;
wchar_t *wstr = new wchar_t[len];
ACE_DEBUG ((LM_DEBUG,
"make_wstring: str = %s\n",str));
- for (size_t i = 0; i < len; i++)
+ for (int i = 0; i < len; i++)
{
char *t = const_cast<char *> (str);
wstr[i] = static_cast<wchar_t> (*(t + i));
@@ -50,16 +51,18 @@ make_wstring (const char *str)
// ------------------------------------------------------------
// Client
// ------------------------------------------------------------
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
char buf[1000];
int error_count = 0;
ACE_TRY_NEW_ENV
{
// Init the orb
- CORBA::ORB_var orb= CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb= CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -71,7 +74,7 @@ int main (int argc, char *argv[])
}
else
{
- ACE_OS::strcpy (buf, argv[1]);
+ ACE_OS::strcpy (buf, ACE_TEXT_TO_CHAR_IN(argv[1]));
}
// The first arg should be the IOR
@@ -89,7 +92,7 @@ int main (int argc, char *argv[])
const char *any_string = "Any World";
CORBA::Any inarg;
- inarg <<= any_string;
+ inarg <<= CORBA::string_dup (any_string);
CORBA::Any_var outarg;
// Invoke the call.
@@ -118,15 +121,11 @@ int main (int argc, char *argv[])
{
++error_count;
}
-#if defined (ACE_HAS_WCHAR)
- wchar_t *wide_string = ACE_OS::strdup(ACE_TEXT_ALWAYS_WCHAR ("Wide String"));
+
+ wchar_t *wide_string = ACE_OS::strdup(ACE_TEXT_TO_WCHAR_IN ("Wide String"));
wchar_t *wide_reply = server->op2 (wide_string);
ACE_DEBUG ((LM_DEBUG,
"sent %W, got %W\n", wide_string, wide_reply));
-
- ACE_OS::free (wide_string);
- CORBA::wstring_free (wide_reply);
-#endif /* ACE_HAS_WCHAR */
}
ACE_CATCHANY
{
diff --git a/TAO/tests/CodeSets/simple/server.cpp b/TAO/tests/CodeSets/simple/server.cpp
index d8a23526773..9789decdc5a 100644
--- a/TAO/tests/CodeSets/simple/server.cpp
+++ b/TAO/tests/CodeSets/simple/server.cpp
@@ -24,6 +24,7 @@
#include "ace/streams.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
// ------------------------------------------------------------
// Servant for associated CORBA object
@@ -50,7 +51,7 @@ public:
ACE_NEW_RETURN (out_ptr,
CORBA::Any,
0);
- (*out_ptr) <<= any_str;
+ (*out_ptr) <<= CORBA::string_dup (any_str);
outany = out_ptr;
return CORBA::string_dup (name);
@@ -67,14 +68,15 @@ public:
// ------------------------------------------------------------
// Main routine
// ------------------------------------------------------------
-int main(int argc, char *argv[])
+int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_TRY_NEW_ENV
{
// Init the orb
- CORBA::ORB_var orb= CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb= CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -119,7 +121,7 @@ int main(int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
+ FILE *output_file= ACE_OS::fopen ("server.ior", ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Codec/Codec.mpc b/TAO/tests/Codec/Codec.mpc
index aea55d91e36..8c4e0b18f2f 100644
--- a/TAO/tests/Codec/Codec.mpc
+++ b/TAO/tests/Codec/Codec.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Client): taoclient, codecfactory, codeset {
+project(*Client): taoclient, codecfactory {
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Codec/client.cpp b/TAO/tests/Codec/client.cpp
index a5d874386e6..ad6178f880e 100644
--- a/TAO/tests/Codec/client.cpp
+++ b/TAO/tests/Codec/client.cpp
@@ -1,9 +1,9 @@
// -*- C++ -*-
#include "tao/CodecFactory/CodecFactory.h"
-#include "tao/Codeset/Codeset.h"
#include "testC.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
#include "ace/Log_Msg.h"
@@ -64,133 +64,24 @@ verify_data (Foo::Bar *original, Foo::Bar *extracted)
if (original->A != extracted->A
|| original->B != extracted->B
|| original->C != extracted->C
- || (ACE_OS::strcmp (original->D, extracted->D) != 0)
- || (ACE_OS::strcmp (original->E, extracted->E) != 0))
+ || (ACE_OS::strcmp (original->D.in(), extracted->D.in()) != 0)
+ || (ACE_OS::strcmp (original->E.in(), extracted->E.in()) != 0))
return -1;
return 0;
}
int
-test_codec (IOP::Codec_ptr codec)
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- // ----------------------------------------------------------
+ ACE_Argv_Type_Converter convert (argc, argv);
- // Test values to be placed in the test structure.
- const CORBA::Long A = 1010;
- const CORBA::Long B = -3427;
- const CORBA::ULongLong C = ACE_UINT64_LITERAL (2001);
- const CORBA::Char D[] = "I'm Batman.";
- const CORBA::WChar* E = gen_wstring (25);
-
- // Create the structure to be encoded.
- Foo::Bar value;
- value.A = A;
- value.B = B;
- value.C = C;
- value.D = CORBA::string_dup (D);
- value.E = CORBA::wstring_dup (E);
-
- CORBA::Any data;
- data <<= value;
-
- // ----------------------------------------------------------
-
- CORBA::OctetSeq_var encoded_data;
- CORBA::Any_var decoded_data;
- Foo::Bar *extracted_value = 0;
-
- // Encode the structure into an octet sequence using the CDR
- // enscapsulation Codec.
-
- ACE_DEBUG ((LM_DEBUG,
- "Testing CDR encapsulation Codec encode()/decode()\n"
- "=================================================\n"));
-
- // Start out with the encode() method, i.e. the one that
- // includes the TypeCode in the CDR encapsulation.
- encoded_data = codec->encode (data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if ((reinterpret_cast<ptrdiff_t> (encoded_data->get_buffer ())
- % ACE_CDR::MAX_ALIGNMENT) == 0)
- ACE_DEBUG ((LM_DEBUG,
- "\nData for decoding are already aligned "
- "on MAX_ALIGNMENT.\n\n"));
- // Extract the data from the octet sequence.
- decoded_data = codec->decode (encoded_data.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(decoded_data.in() >>= extracted_value))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Unable to extract decoded data "
- "from Any\n"),
- -1);
-
- // Verify that the extracted data matches the data that was
- // originally encoded into the octet sequence.
- if (::verify_data (&value, extracted_value) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Data extracted using "
- "IOP::Codec::decode() does not match "
- "original data.\n"),
- -1);
-
- ACE_DEBUG ((LM_DEBUG,
- "Testing CDR encapsulation Codec "
- "encode_value()/decode_value()\n"
- "================================"
- "=============================\n"));
-
- // Now use the encode_value() method, i.e. the one that does
- // *not* include the TypeCode in the CDR encapsulation.
- encoded_data = codec->encode_value (data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if ((reinterpret_cast<ptrdiff_t> (encoded_data->get_buffer ())
- % ACE_CDR::MAX_ALIGNMENT) == 0)
- ACE_DEBUG ((LM_WARNING,
- "\n"
- "WARNING: Data to be decoded is already aligned "
- "on MAX_ALIGNMENT.\n\n"));
-
- // Extract the data from the octet sequence.
- decoded_data = codec->decode_value (encoded_data.in (),
- Foo::_tc_Bar
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(decoded_data.in() >>= extracted_value))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Unable to extract decoded data "
- "from Any\n"),
- -1);
-
- // Verify that the extracted data matches the data that was
- // originally encoded into the octet sequence.
- if (::verify_data (&value, extracted_value) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Data extracted using "
- "IOP::Codec::decode_value() does not match "
- "original data.\n"),
- -1);
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int retval = 0;
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"my_orb"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -206,23 +97,6 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- // Set up a structure that contains information necessary to
- // create a GIOP 1.1 CDR encapsulation Codec.
- IOP::Encoding_1_2 encoding_1_2;
- encoding_1_2.format = IOP::ENCODING_CDR_ENCAPS;
- encoding_1_2.major_version = 1;
- encoding_1_2.minor_version = 2;
- encoding_1_2.char_codeset = 0x00010001U;
- encoding_1_2.wchar_codeset = 0x00010109U;
-
- // Obtain the CDR encapsulation Codec.
- IOP::Codec_var codec_1_2 =
- codec_factory->create_codec_with_codesets (encoding_1_2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- retval = test_codec (codec_1_2.in ());
-
// ----------------------------------------------------------
// Set up a structure that contains information necessary to
@@ -238,8 +112,110 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- retval = test_codec (codec.in ());
- }
+ // ----------------------------------------------------------
+
+ // Test values to be placed in the test structure.
+ const CORBA::Long A = 1010;
+ const CORBA::Long B = -3427;
+ const CORBA::ULongLong C = ACE_UINT64_LITERAL (2001);
+ const CORBA::Char D[] = "I'm Batman.";
+ const CORBA::WChar* E = gen_wstring (25);
+
+ // Create the structure to be encoded.
+ Foo::Bar value;
+ value.A = A;
+ value.B = B;
+ value.C = C;
+ value.D = CORBA::string_dup (D);
+ value.E = CORBA::wstring_dup (E);
+
+ CORBA::Any data;
+ data <<= value;
+
+ // ----------------------------------------------------------
+
+ CORBA::OctetSeq_var encoded_data;
+ CORBA::Any_var decoded_data;
+ Foo::Bar *extracted_value;
+
+ // Encode the structure into an octet sequence using the CDR
+ // enscapsulation Codec.
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Testing CDR encapsulation Codec encode()/decode()\n"
+ "=================================================\n"));
+
+ // Start out with the encode() method, i.e. the one that
+ // includes the TypeCode in the CDR encapsulation.
+ encoded_data = codec->encode (data
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if ((reinterpret_cast<ptrdiff_t> (encoded_data->get_buffer ())
+ % ACE_CDR::MAX_ALIGNMENT) == 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "\nData for decoding are already aligned "
+ "on MAX_ALIGNMENT.\n\n"));
+ // Extract the data from the octet sequence.
+ decoded_data = codec->decode (encoded_data.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (!(decoded_data.in() >>= extracted_value))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Unable to extract decoded data "
+ "from Any\n"),
+ -1);
+
+ // Verify that the extracted data matches the data that was
+ // originally encoded into the octet sequence.
+ if (::verify_data (&value, extracted_value) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Data extracted using "
+ "IOP::Codec::decode() does not match "
+ "original data.\n"),
+ -1);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Testing CDR encapsulation Codec "
+ "encode_value()/decode_value()\n"
+ "================================"
+ "=============================\n"));
+
+ // Now use the encode_value() method, i.e. the one that does
+ // *not* include the TypeCode in the CDR encapsulation.
+ encoded_data = codec->encode_value (data
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if ((reinterpret_cast<ptrdiff_t> (encoded_data->get_buffer ())
+ % ACE_CDR::MAX_ALIGNMENT) == 0)
+ ACE_DEBUG ((LM_WARNING,
+ "\n"
+ "WARNING: Data to be decoded is already aligned "
+ "on MAX_ALIGNMENT.\n\n"));
+
+ // Extract the data from the octet sequence.
+ decoded_data = codec->decode_value (encoded_data.in (),
+ Foo::_tc_Bar
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (!(decoded_data.in() >>= extracted_value))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Unable to extract decoded data "
+ "from Any\n"),
+ -1);
+
+ // Verify that the extracted data matches the data that was
+ // originally encoded into the octet sequence.
+ if (::verify_data (&value, extracted_value) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Data extracted using "
+ "IOP::Codec::decode_value() does not match "
+ "original data.\n"),
+ -1);
+ }
ACE_CATCHANY
{
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
@@ -250,5 +226,5 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "Codec test passed.\n"));
- return retval;
+ return 0;
}
diff --git a/TAO/tests/Collocation/Collocation.cpp b/TAO/tests/Collocation/Collocation.cpp
index 19bd6433a70..97b96e9b207 100644
--- a/TAO/tests/Collocation/Collocation.cpp
+++ b/TAO/tests/Collocation/Collocation.cpp
@@ -2,16 +2,19 @@
#include "Collocation_Tester.h"
#include "tao/Strategies/advanced_resource.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Collocation, main, "$Id$")
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
Collocation_Test coll_test;
- coll_test.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ coll_test.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
coll_test.run (ACE_ENV_SINGLE_ARG_PARAMETER);
diff --git a/TAO/tests/Collocation/Collocation.mpc b/TAO/tests/Collocation/Collocation.mpc
index 2bb76c43a80..5a0b503aac4 100644
--- a/TAO/tests/Collocation/Collocation.mpc
+++ b/TAO/tests/Collocation/Collocation.mpc
@@ -3,11 +3,7 @@
project(*Test Stub): taolib_with_idl {
sharedname = Collocation_Test_Stub
- idlflags += -Wb,skel_export_macro=Diamond_Export \
- -Wb,stub_export_macro=MY_Stub_Export \
- -Wb,skel_export_include=diamond_export.h \
- -Wb,stub_export_include=stub_export.h \
- -Gd -St -Sa
+ idlflags += -Wb,skel_export_macro=Diamond_Export -Wb,stub_export_macro=MY_Stub_Export -Wb,skel_export_include=diamond_export.h -Wb,stub_export_include=stub_export.h -Gd -St -Sa
dynamicflags = MY_STUB_BUILD_DLL
Source_Files {
@@ -19,11 +15,7 @@ project(*Diamond) : taolib_with_idl, portableserver {
after += Collocation_Test_Stub
sharedname = Collocation_Diamond
libs += Collocation_Test_Stub
- idlflags += -Wb,skel_export_macro=Diamond_Export \
- -Wb,stub_export_macro=MY_Stub_Export \
- -Wb,skel_export_include=diamond_export.h \
- -Wb,stub_export_include=stub_export.h \
- -Gd -St -Sa
+ idlflags += -Wb,skel_export_macro=Diamond_Export -Wb,stub_export_macro=MY_Stub_Export -Wb,skel_export_include=diamond_export.h -Wb,stub_export_include=stub_export.h -Gd -St -Sa
dynamicflags = DIAMOND_BUILD_DLL
Source_Files {
diff --git a/TAO/tests/CollocationLockup/AB.idl b/TAO/tests/CollocationLockup/AB.idl
deleted file mode 100644
index 92b2822b872..00000000000
--- a/TAO/tests/CollocationLockup/AB.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface A {
-};
-
-interface B {
- A makeA ();
-};
diff --git a/TAO/tests/CollocationLockup/CollocationLockup.cpp b/TAO/tests/CollocationLockup/CollocationLockup.cpp
deleted file mode 100644
index eb391916472..00000000000
--- a/TAO/tests/CollocationLockup/CollocationLockup.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-// $Id$
-
-/**
- * CollocationLockup.cpp
- * This is regression test against bug #2130.
- * It tests a deadlock between a thread making a collocated invocation
- * (which holds a lock on the ORB core and attempts to lock the POA) and a
- * thread activating a servant (which locks the POA and attempts to lock the
- * ORB core).
- *
- * This test was developed from a test submitted by Rick Marlborough for bug
- * #2297 and refined by Paul Calabrese.
- */
-
-#include "ABS.h"
-#include "SimpleNamingServiceC.h"
-
-#include "ace/Thread_Manager.h"
-#include "ace/SString.h"
-
-namespace
-{
- const size_t N_THREADS = 20;
- const size_t N_ITERATIONS = 100;
- const char* nameString = "myBobject";
-
- CORBA::ORB_var g_pOrb;
- PortableServer::POA_var g_pPoa;
- SimpleNamingService_var g_pNameService;
-}
-
-class A_i : public virtual POA_A
-{
-};
-
-class B_i : public virtual POA_B
-{
-public:
- virtual A_ptr
- makeA () ACE_THROW_SPEC ((CORBA::SystemException))
- {
- A_i* servant = new A_i;
- g_pPoa->activate_object (servant);
- CORBA::Object_var obj = g_pPoa->servant_to_reference (servant);
- return A::_narrow (obj.in ());
- }
-};
-
-// Thread for ORB->run()
-ACE_THR_FUNC_RETURN OrbRunThread (void*);
-
-// Thread to run the test
-ACE_THR_FUNC_RETURN TestThread (void*);
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- try
- {
- ACE_Thread_Manager threads;
-
- // Normal corba init
- g_pOrb = CORBA::ORB_init (argc, argv, "");
-
- CORBA::Object_var pPoaObj =
- g_pOrb->resolve_initial_references ("RootPOA");
- g_pPoa = PortableServer::POA::_narrow (pPoaObj.in ());
- PortableServer::POAManager_var pMgr = g_pPoa->the_POAManager ();
- pMgr->activate ();
-
- CORBA::Object_var pNSObj =
- g_pOrb->resolve_initial_references ("SimpleNamingService");
- g_pNameService = SimpleNamingService::_narrow (pNSObj.in ());
-
- if (CORBA::is_nil (g_pNameService.in ()))
- {
- ACE_DEBUG ((LM_ERROR,
- "ERROR: Could not locate the Simple Naming Service\n"));
- return 1;
- }
-
- ACE_Thread::spawn (OrbRunThread, 0, THR_NEW_LWP | THR_DETACHED);
-
- // Setup
- B_i* servant = new B_i;
- g_pPoa->activate_object (servant);
- CORBA::Object_var b = g_pPoa->servant_to_reference (servant);
-
- g_pNameService->bind (b.in ());
-
- //Start threads
- threads.spawn_n (N_THREADS, TestThread);
- ACE_DEBUG ((LM_INFO, "All threads spawned.\n"));
-
- } //destructor of ACE_Thread_Manager = implicit join
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR, "Corba Exception: %s\n", ex._info ().c_str ()));
- return 1;
- }
-
- g_pOrb->shutdown (0);
-
- return 0;
-}
-
-ACE_THR_FUNC_RETURN
-OrbRunThread (void*)
-{
- try
- {
- g_pOrb->run ();
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR,
- "In OrbRunThread: Corba Exception: %s\n",
- ex._info ().c_str ()));
- }
- return 0;
-}
-
-ACE_THR_FUNC_RETURN
-TestThread (void*)
-{
- try
- {
- for (size_t i (0); i < N_ITERATIONS; ++i)
- {
- CORBA::Object_var obj = g_pNameService->resolve ();
- B_var b = B::_narrow (obj.in ());
- b->makeA ();
- if (i % 50 == 0)
- ACE_DEBUG ((LM_INFO, "collocated call returned\n"));
- }
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR,
- "In TestThread: Corba Exception: %s\n",
- ex._info ().c_str ()));
- }
- return 0;
-}
diff --git a/TAO/tests/CollocationLockup/CollocationLockup.mpc b/TAO/tests/CollocationLockup/CollocationLockup.mpc
deleted file mode 100644
index c02d02f27f7..00000000000
--- a/TAO/tests/CollocationLockup/CollocationLockup.mpc
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project: taoexe, portableserver {
- idlflags += -Sc -St
- exename = CollocationLockup
-
- Source_Files {
- ABC.cpp
- ABS.cpp
- SimpleNamingServiceC.cpp
- CollocationLockup.cpp
- }
-}
-
-project(*SimpleNamingService): taoexe, portableserver {
- idlflags += -Sc -St
- exename = SimpleNamingService
-
- IDL_Files {
- SimpleNamingService.idl
- }
-
- Source_Files {
- SimpleNamingService.cpp
- }
-}
diff --git a/TAO/tests/CollocationLockup/SimpleNamingService.cpp b/TAO/tests/CollocationLockup/SimpleNamingService.cpp
deleted file mode 100644
index c21e466fec7..00000000000
--- a/TAO/tests/CollocationLockup/SimpleNamingService.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id$
-
-/**
- * SimpleNamingService.cpp
- * This is part of the regression test against bug #2130.
- * See CollocationLockup.cpp for a description of the test.
- */
-
-#include "SimpleNamingServiceS.h"
-
-#include "ace/String_Base.h"
-#include "ace/streams.h"
-
-namespace
-{
- const char* iorFileName = "SimpleNamingService.ior";
-}
-
-class SimpleNamingService_i : public virtual POA_SimpleNamingService
-{
-public:
-
- virtual void
- bind (CORBA::Object_ptr obj) ACE_THROW_SPEC ((CORBA::SystemException))
- {
- obj_ = CORBA::Object::_duplicate (obj);
- }
-
-
- virtual CORBA::Object_ptr
- resolve () ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::Object::_duplicate (obj_.in ());
- }
-
-private:
-
- CORBA::Object_var obj_;
-
-};
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
-
- CORBA::Object_var pPoaObj =
- orb->resolve_initial_references ("RootPOA");
- PortableServer::POA_var poa =
- PortableServer::POA::_narrow (pPoaObj.in ());
- PortableServer::POAManager_var pMgr = poa->the_POAManager ();
- pMgr->activate ();
-
- SimpleNamingService_i* servant = new SimpleNamingService_i;
- PortableServer::ObjectId_var oid = poa->activate_object (servant);
- CORBA::Object_var obj = poa->id_to_reference (oid.in ());
- CORBA::String_var str = orb->object_to_string (obj.in ());
-
- ofstream iorFile (iorFileName);
- iorFile << str.in () << endl;
- iorFile.close ();
-
- orb->run ();
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR, "Corba Exception: %s\n", ex._info ().c_str ()));
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/CollocationLockup/SimpleNamingService.idl b/TAO/tests/CollocationLockup/SimpleNamingService.idl
deleted file mode 100644
index e76b077308f..00000000000
--- a/TAO/tests/CollocationLockup/SimpleNamingService.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-// $Id$
-
-/// This is a degenerate Naming Service that only binds one object
-interface SimpleNamingService {
-
- void bind (in Object o);
- Object resolve ();
-
-};
diff --git a/TAO/tests/CollocationLockup/run_test.pl b/TAO/tests/CollocationLockup/run_test.pl
deleted file mode 100755
index 49c9c408a61..00000000000
--- a/TAO/tests/CollocationLockup/run_test.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-use strict;
-
-# Amount of delay (in seconds) between starting a server and a client
-# to allow proper server initialization.
-my $sleeptime = 10;
-
-# Variables for command-line arguments to client and server
-# executables.
-my $iorbase = "SimpleNamingService.ior";
-my $iorfile = PerlACE::LocalFile ($iorbase);
-
-my $status = 0;
-
-my $NS = new PerlACE::Process ("SimpleNamingService");
-
-unlink $iorfile;
-
-$NS->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
- print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
- $NS->Kill ();
- exit 1;
-}
-
-my $CL;
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("CollocationLockup",
- "-ORBInitRef " .
- "SimpleNamingService=file://$iorbase");
-}
-else {
- $CL = new PerlACE::Process ("CollocationLockup",
- "-ORBInitRef " .
- "SimpleNamingService=file://$iorfile");
-}
-
-# In testing on various platforms, the builds with the bug failed before
-# 20 seconds and when the bug was fixed it returned before 20 seconds.
-my $client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$NS->Kill ();
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp b/TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp
index f4e4a6b9615..82ef56a5b5c 100644
--- a/TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp
+++ b/TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp
@@ -16,7 +16,7 @@ ACE_CString client_orb;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:o:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:o:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -43,19 +43,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- if (parse_args (argc,
- argv) == -1)
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- ACE_Argv_Type_Converter satc (argc, argv);
CORBA::ORB_var sorb =
- CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
server_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -76,10 +76,9 @@ main (int argc, char *argv[])
// Wait for the server thread to do some processing
me.wait ();
- ACE_Argv_Type_Converter catc (argc, argv);
CORBA::ORB_var corb =
- CORBA::ORB_init (catc.get_argc (),
- catc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
client_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Collocation_Exception_Test/Server_Task.cpp b/TAO/tests/Collocation_Exception_Test/Server_Task.cpp
index 746c3ff7758..9e6a33cc62c 100644
--- a/TAO/tests/Collocation_Exception_Test/Server_Task.cpp
+++ b/TAO/tests/Collocation_Exception_Test/Server_Task.cpp
@@ -66,7 +66,7 @@ Server_Task::svc (void)
// Output the IOR to the <this->output_>
FILE *output_file= ACE_OS::fopen (this->output_,
- "w");
+ ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Collocation_Exception_Test/Server_Task.h b/TAO/tests/Collocation_Exception_Test/Server_Task.h
index 60006aae0ba..4f2307adc30 100644
--- a/TAO/tests/Collocation_Exception_Test/Server_Task.h
+++ b/TAO/tests/Collocation_Exception_Test/Server_Task.h
@@ -15,9 +15,7 @@
#include "tao/ORB.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implement a Task to run the server in a single thread
class Server_Task : public ACE_Task_Base
diff --git a/TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp b/TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp
index f36e0cd48f9..deddc432a54 100644
--- a/TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp
+++ b/TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp
@@ -18,7 +18,7 @@ ACE_CString client_orb;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:o:n:m:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:o:n:m:");
int c;
while ((c = get_opts ()) != -1)
@@ -68,19 +68,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- if (parse_args (argc,
- argv) == -1)
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- ACE_Argv_Type_Converter satc (argc, argv);
CORBA::ORB_var sorb =
- CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
server_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -101,10 +101,9 @@ main (int argc, char *argv[])
// Wait for the server thread to do some processing
me.wait ();
- ACE_Argv_Type_Converter catc (argc, argv);
CORBA::ORB_var corb =
- CORBA::ORB_init (catc.get_argc (),
- catc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
client_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp b/TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp
index 746c3ff7758..9e6a33cc62c 100644
--- a/TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp
+++ b/TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp
@@ -66,7 +66,7 @@ Server_Task::svc (void)
// Output the IOR to the <this->output_>
FILE *output_file= ACE_OS::fopen (this->output_,
- "w");
+ ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Collocation_Oneway_Tests/Server_Task.h b/TAO/tests/Collocation_Oneway_Tests/Server_Task.h
index 60006aae0ba..4f2307adc30 100644
--- a/TAO/tests/Collocation_Oneway_Tests/Server_Task.h
+++ b/TAO/tests/Collocation_Oneway_Tests/Server_Task.h
@@ -15,9 +15,7 @@
#include "tao/ORB.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implement a Task to run the server in a single thread
class Server_Task : public ACE_Task_Base
diff --git a/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp b/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp
index 28aa663f7aa..4e1784befd7 100644
--- a/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp
+++ b/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp
@@ -2,6 +2,7 @@
#include "testS.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/PortableServer/Object_Adapter.h"
#include "tao/PortableServer/POA_Current.h"
#include "tao/PortableServer/POA_Current_Impl.h"
@@ -136,13 +137,15 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Collocation_Tests/Collocated_Test.cpp b/TAO/tests/Collocation_Tests/Collocated_Test.cpp
index f807f7bf5b3..4bb7e2021a9 100644
--- a/TAO/tests/Collocation_Tests/Collocated_Test.cpp
+++ b/TAO/tests/Collocation_Tests/Collocated_Test.cpp
@@ -14,7 +14,7 @@ ACE_CString client_orb;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:o:n");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:o:n");
int c;
while ((c = get_opts ()) != -1)
@@ -41,19 +41,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- if (parse_args (argc,
- argv) == -1)
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- ACE_Argv_Type_Converter satc (argc, argv);
CORBA::ORB_var sorb =
- CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
server_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -74,10 +74,9 @@ main (int argc, char *argv[])
// Wait for the server thread to do some processing
me.wait ();
- ACE_Argv_Type_Converter catc (argc, argv);
CORBA::ORB_var corb =
- CORBA::ORB_init (catc.get_argc (),
- catc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
client_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Collocation_Tests/Server_Task.cpp b/TAO/tests/Collocation_Tests/Server_Task.cpp
index 85d842d34a0..db0c583eea3 100644
--- a/TAO/tests/Collocation_Tests/Server_Task.cpp
+++ b/TAO/tests/Collocation_Tests/Server_Task.cpp
@@ -66,7 +66,7 @@ Server_Task::svc (void)
// Output the IOR to the <this->output_>
FILE *output_file= ACE_OS::fopen (this->output_,
- "w");
+ ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Collocation_Tests/Server_Task.h b/TAO/tests/Collocation_Tests/Server_Task.h
index 60006aae0ba..4f2307adc30 100644
--- a/TAO/tests/Collocation_Tests/Server_Task.h
+++ b/TAO/tests/Collocation_Tests/Server_Task.h
@@ -15,9 +15,7 @@
#include "tao/ORB.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implement a Task to run the server in a single thread
class Server_Task : public ACE_Task_Base
diff --git a/TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc b/TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc
index e64ad8d08a8..8e25b42d362 100644
--- a/TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc
+++ b/TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Connect_Strategy_Test/client.cpp b/TAO/tests/Connect_Strategy_Test/client.cpp
index 07d0572d547..0db98cfb3cd 100644
--- a/TAO/tests/Connect_Strategy_Test/client.cpp
+++ b/TAO/tests/Connect_Strategy_Test/client.cpp
@@ -2,6 +2,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Connect_Strategy_Test,
client,
@@ -12,7 +13,7 @@ int do_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:x:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:x:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,15 +40,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Connect_Strategy_Test/server.cpp b/TAO/tests/Connect_Strategy_Test/server.cpp
index acd62195b16..770744b45c8 100644
--- a/TAO/tests/Connect_Strategy_Test/server.cpp
+++ b/TAO/tests/Connect_Strategy_Test/server.cpp
@@ -3,6 +3,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Connect_Strategy_Test,
server,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Connection_Failure/client.cpp b/TAO/tests/Connection_Failure/client.cpp
index c9759652961..f650c3c2540 100644
--- a/TAO/tests/Connection_Failure/client.cpp
+++ b/TAO/tests/Connection_Failure/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "tao/SystemException.h"
+#include "ace/Argv_Type_Converter.h"
#include "ace/Log_Msg.h"
@@ -13,12 +14,14 @@ const char *ior =
"corbaloc:iiop:192.3.47/10007/RandomObject";
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Connection_Purging/Connection_Purging.mpc b/TAO/tests/Connection_Purging/Connection_Purging.mpc
index 321e97dff47..ad230187aa7 100644
--- a/TAO/tests/Connection_Purging/Connection_Purging.mpc
+++ b/TAO/tests/Connection_Purging/Connection_Purging.mpc
@@ -9,7 +9,6 @@ project(*Server): strategies, taoserver {
}
project(*Client): strategies, taoclient {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Connection_Purging/client.cpp b/TAO/tests/Connection_Purging/client.cpp
index 3ef97cea443..8dcbc9f0559 100644
--- a/TAO/tests/Connection_Purging/client.cpp
+++ b/TAO/tests/Connection_Purging/client.cpp
@@ -4,13 +4,14 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_unistd.h"
#include "tao/Strategies/advanced_resource.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior = "server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,15 +35,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
int done = 0;
diff --git a/TAO/tests/Connection_Purging/server.cpp b/TAO/tests/Connection_Purging/server.cpp
index 0a9c8394ebf..a4c7201b235 100644
--- a/TAO/tests/Connection_Purging/server.cpp
+++ b/TAO/tests/Connection_Purging/server.cpp
@@ -3,13 +3,14 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "tao/Strategies/advanced_resource.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior_output_file = "server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -33,12 +34,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -58,7 +61,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
test_i *test_impl;
@@ -76,7 +79,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Connection_Timeout/Connection_Timeout.mpc b/TAO/tests/Connection_Timeout/Connection_Timeout.mpc
index 7ae4e1c4bf3..c1e095ba54b 100644
--- a/TAO/tests/Connection_Timeout/Connection_Timeout.mpc
+++ b/TAO/tests/Connection_Timeout/Connection_Timeout.mpc
@@ -2,7 +2,6 @@
// $Id$
project(*client): taoclient, messaging, portableserver {
- avoids += ace_for_tao
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Connection_Timeout/client.cpp b/TAO/tests/Connection_Timeout/client.cpp
index d1bab792c95..07d91311a93 100644
--- a/TAO/tests/Connection_Timeout/client.cpp
+++ b/TAO/tests/Connection_Timeout/client.cpp
@@ -3,6 +3,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
#include "ace/Profile_Timer.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/Messaging/Messaging.h"
#include "tao/AnyTypeCode/Any.h"
@@ -17,7 +18,7 @@ TimeBase::TimeT timeout_period = 1000000;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -107,17 +108,19 @@ test_timeout (CORBA::Object_ptr object ACE_ENV_ARG_DECL)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int retval = 1;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Crash_On_Write/Crash_On_Write.mpc b/TAO/tests/Crash_On_Write/Crash_On_Write.mpc
index 2398d1eac4c..5dc777cfcad 100644
--- a/TAO/tests/Crash_On_Write/Crash_On_Write.mpc
+++ b/TAO/tests/Crash_On_Write/Crash_On_Write.mpc
@@ -11,7 +11,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Crash_On_Write/client.cpp b/TAO/tests/Crash_On_Write/client.cpp
index 92fc7daaf0b..e12430079d2 100644
--- a/TAO/tests/Crash_On_Write/client.cpp
+++ b/TAO/tests/Crash_On_Write/client.cpp
@@ -3,6 +3,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Crash_On_Write, client, "$Id$")
@@ -12,7 +13,7 @@ int iterations = 2000;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -60,15 +61,17 @@ single_iteration (Test::Oneway_Receiver_ptr oneway_receiver
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Crash_On_Write/server.cpp b/TAO/tests/Crash_On_Write/server.cpp
index 8c25517be99..43faafae42b 100644
--- a/TAO/tests/Crash_On_Write/server.cpp
+++ b/TAO/tests/Crash_On_Write/server.cpp
@@ -3,6 +3,7 @@
#include "Oneway_Receiver.h"
#include "Crash_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Crash_On_Write, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Oneway_Receiver *oneway_receiver_impl;
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -91,7 +94,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Create a separate thread to crash the server.
- Crash_Task crash_task (ACE_Thread_Manager::instance (), ACE_Time_Value(20));
+ Crash_Task crash_task (ACE_Thread_Manager::instance (), 20);
if (crash_task.activate () == -1)
{
diff --git a/TAO/tests/Crashed_Callback/Crashed_Callback.mpc b/TAO/tests/Crashed_Callback/Crashed_Callback.mpc
index 34711dbef67..b7c2b164029 100644
--- a/TAO/tests/Crashed_Callback/Crashed_Callback.mpc
+++ b/TAO/tests/Crashed_Callback/Crashed_Callback.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): taoclient, portableserver, messaging {
- after += *Server
Source_Files {
Crashed_Callback.cpp
client.cpp
diff --git a/TAO/tests/Crashed_Callback/client.cpp b/TAO/tests/Crashed_Callback/client.cpp
index 4f020c7d89c..f7db7164d1d 100644
--- a/TAO/tests/Crashed_Callback/client.cpp
+++ b/TAO/tests/Crashed_Callback/client.cpp
@@ -5,6 +5,7 @@
#include "tao/Messaging/Messaging.h"
#include "tao/AnyTypeCode/Any.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Crashed_Callback, client, "$Id$")
@@ -13,7 +14,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,12 +37,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -94,7 +97,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
}
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Crashed_Callback/server.cpp b/TAO/tests/Crashed_Callback/server.cpp
index 11b8a975a14..1f81584fba8 100644
--- a/TAO/tests/Crashed_Callback/server.cpp
+++ b/TAO/tests/Crashed_Callback/server.cpp
@@ -6,6 +6,7 @@
#include "tao/AnyTypeCode/Any.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Crashed_Callback, server, "$Id$")
@@ -14,7 +15,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -95,7 +98,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
}
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Service *service_impl;
@@ -113,7 +116,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/DLL_ORB/DLL_ORB.mpc b/TAO/tests/DLL_ORB/DLL_ORB.mpc
index 34ed08c9359..f7eb4ab9597 100644
--- a/TAO/tests/DLL_ORB/DLL_ORB.mpc
+++ b/TAO/tests/DLL_ORB/DLL_ORB.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Test_Client_Module): taolib_with_idl, anytypecode {
+project(*Test Client Module): taolib_with_idl, anytypecode {
sharedname = Test_Client_Module
dynamicflags = TEST_CLIENT_MODULE_BUILD_DLL
@@ -11,10 +11,9 @@ project(*Test_Client_Module): taolib_with_idl, anytypecode {
}
}
-project(*Test_Server_Module) : taolib_with_idl, portableserver {
+project(*Test Server Module) : taolib_with_idl, portableserver {
sharedname = Test_Server_Module
dynamicflags = TEST_SERVER_MODULE_BUILD_DLL
- after += *Test_CLient_Module
Source_Files {
Test_Server_Module.cpp
diff --git a/TAO/tests/DLL_ORB/Test_Client_Module.cpp b/TAO/tests/DLL_ORB/Test_Client_Module.cpp
index 1aa4db4d534..9deb390c8ee 100644
--- a/TAO/tests/DLL_ORB/Test_Client_Module.cpp
+++ b/TAO/tests/DLL_ORB/Test_Client_Module.cpp
@@ -5,6 +5,7 @@
#include "tao/StringSeqC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (DLL_ORB,
Test_Client_Module,
@@ -16,7 +17,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,7 +40,7 @@ parse_args (int argc, char *argv[])
int
-Test_Client_Module::init (int argc, ACE_TCHAR *argv[])
+Test_Client_Module::init (int argc, char *argv[])
{
// -----------------------------------------------------------------
// Pre-ORB initialization steps necessary for proper DLL ORB
diff --git a/TAO/tests/DLL_ORB/Test_Client_Module.h b/TAO/tests/DLL_ORB/Test_Client_Module.h
index bd649692068..38f1638da5b 100644
--- a/TAO/tests/DLL_ORB/Test_Client_Module.h
+++ b/TAO/tests/DLL_ORB/Test_Client_Module.h
@@ -40,7 +40,7 @@ class Test_Client_Module_Export Test_Client_Module : public ACE_Task_Base
public:
/// Initializes object when dynamic linking occurs.
- virtual int init (int argc, ACE_TCHAR *argv[]);
+ virtual int init (int argc, char *argv[]);
/// Terminates object when dynamic unlinking occurs.
virtual int fini (void);
diff --git a/TAO/tests/DLL_ORB/Test_Server_Module.cpp b/TAO/tests/DLL_ORB/Test_Server_Module.cpp
index b48c4c8704b..09604d041e7 100644
--- a/TAO/tests/DLL_ORB/Test_Server_Module.cpp
+++ b/TAO/tests/DLL_ORB/Test_Server_Module.cpp
@@ -11,6 +11,7 @@ ACE_RCSID (DLL_ORB,
"$Id$")
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior_file = "test.ior";
@@ -18,7 +19,7 @@ const char *ior_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,7 +40,7 @@ parse_args (int argc, char *argv[])
}
int
-Test_Server_Module::init (int argc, ACE_TCHAR *argv[])
+Test_Server_Module::init (int argc, char *argv[])
{
// -----------------------------------------------------------------
// Pre-ORB initialization steps necessary for proper DLL ORB
@@ -131,7 +132,7 @@ Test_Server_Module::init (int argc, ACE_TCHAR *argv[])
ior.in ()));
// Write IOR to a file.
- FILE *output_file= ACE_OS::fopen (ior_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file <%s> for writing "
diff --git a/TAO/tests/DLL_ORB/Test_Server_Module.h b/TAO/tests/DLL_ORB/Test_Server_Module.h
index f525f46716b..d1faee6c35d 100644
--- a/TAO/tests/DLL_ORB/Test_Server_Module.h
+++ b/TAO/tests/DLL_ORB/Test_Server_Module.h
@@ -40,7 +40,7 @@ class Test_Server_Module_Export Test_Server_Module : public ACE_Task_Base
public:
/// Initializes object when dynamic linking occurs.
- virtual int init (int argc, ACE_TCHAR *argv[]);
+ virtual int init (int argc, char *argv[]);
/// Terminates object when dynamic unlinking occurs.
virtual int fini (void);
diff --git a/TAO/tests/DLL_ORB/client.cpp b/TAO/tests/DLL_ORB/client.cpp
index 3ba5a6ded57..029f6520d55 100644
--- a/TAO/tests/DLL_ORB/client.cpp
+++ b/TAO/tests/DLL_ORB/client.cpp
@@ -15,7 +15,7 @@
#include "ace/Thread_Manager.h"
int
-main (int, char *[])
+ACE_TMAIN (int, ACE_TCHAR *[])
{
// Process a Service Configurator directive that will cause the test
// client module to be dynamically loaded.
diff --git a/TAO/tests/DLL_ORB/server.cpp b/TAO/tests/DLL_ORB/server.cpp
index c54ec7f983a..bcdd71b484d 100644
--- a/TAO/tests/DLL_ORB/server.cpp
+++ b/TAO/tests/DLL_ORB/server.cpp
@@ -15,7 +15,7 @@
#include "ace/Thread_Manager.h"
int
-main (int, char *[])
+ACE_TMAIN (int, ACE_TCHAR *[])
{
// Process a Service Configurator directive that will cause the test
// server module to be dynamically loaded.
diff --git a/TAO/tests/DSI_Gateway/DSI_Gateway.mpc b/TAO/tests/DSI_Gateway/DSI_Gateway.mpc
index c5deacad25b..6a8245f178e 100644
--- a/TAO/tests/DSI_Gateway/DSI_Gateway.mpc
+++ b/TAO/tests/DSI_Gateway/DSI_Gateway.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, messaging, minimum_corba, dynamicinterface {
}
project(*Client): taoclient, messaging, minimum_corba, dynamicinterface {
- after += *Server
Source_Files {
testC.cpp
client.cpp
@@ -17,7 +16,6 @@ project(*Client): taoclient, messaging, minimum_corba, dynamicinterface {
}
project(*Gateway): taoexe, portableserver, messaging, minimum_corba, dynamicinterface {
- after += *Client
Source_Files {
test_dsi.cpp
gateway.cpp
diff --git a/TAO/tests/DSI_Gateway/client.cpp b/TAO/tests/DSI_Gateway/client.cpp
index 4919809f944..bd74da8d4df 100644
--- a/TAO/tests/DSI_Gateway/client.cpp
+++ b/TAO/tests/DSI_Gateway/client.cpp
@@ -4,6 +4,7 @@
#include "tao/debug.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(DSI_Gateway, client, "$Id$")
@@ -16,7 +17,7 @@ int test_system_exception = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "xusk:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xusk:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -61,15 +62,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
return 1;
}
diff --git a/TAO/tests/DSI_Gateway/gateway.cpp b/TAO/tests/DSI_Gateway/gateway.cpp
index 4aade2c1f03..6cc2ae79484 100644
--- a/TAO/tests/DSI_Gateway/gateway.cpp
+++ b/TAO/tests/DSI_Gateway/gateway.cpp
@@ -3,6 +3,7 @@
#include "test_dsi.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(DSI_Gateway, server, "$Id$")
@@ -14,7 +15,7 @@ const char *ior_output_file = "gateway.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xk:i:o:");
int c;
while ((c = get_opts ()) != -1)
@@ -54,12 +55,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -84,7 +87,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
return 1;
}
@@ -115,7 +118,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
{
diff --git a/TAO/tests/DSI_Gateway/server.cpp b/TAO/tests/DSI_Gateway/server.cpp
index dfe1919fe78..a0ecf51d0af 100644
--- a/TAO/tests/DSI_Gateway/server.cpp
+++ b/TAO/tests/DSI_Gateway/server.cpp
@@ -3,6 +3,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(DSI_Gateway, server, "$Id$")
@@ -13,7 +14,7 @@ int nthreads = 4;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,12 +42,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -68,7 +71,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
return 1;
}
@@ -88,7 +91,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
{
diff --git a/TAO/tests/DynAny_Test/data.h b/TAO/tests/DynAny_Test/data.h
index 4cd12f257e3..af90ae98ed8 100644
--- a/TAO/tests/DynAny_Test/data.h
+++ b/TAO/tests/DynAny_Test/data.h
@@ -12,7 +12,7 @@
//=============================================================================
-#include "tao/AnyTypeCode/TypeCode_Constants.h"
+#include "tao/AnyTypeCode/TC_Constants_Forward.h"
#include "tao/ORB.h"
#include "tao/Object.h"
diff --git a/TAO/tests/DynAny_Test/driver.cpp b/TAO/tests/DynAny_Test/driver.cpp
index 5eae425f78a..cbea23a5fef 100644
--- a/TAO/tests/DynAny_Test/driver.cpp
+++ b/TAO/tests/DynAny_Test/driver.cpp
@@ -24,13 +24,16 @@
#include "tao/PortableServer/PortableServer.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Driver driver;
// initialize the driver
- if (driver.init (argc, argv) == -1)
+ if (driver.init (convert.get_argc(), convert.get_ASCII_argv()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) driver.cpp - "
"Driver initialization failed\n"),
@@ -106,7 +109,7 @@ Driver::parse_args (int argc, char* argv[])
argv [0]),
-1);
- ACE_Get_Opt get_opts (argc, argv, "t:d");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "t:d");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/DynAny_Test/test_dynsequence.cpp b/TAO/tests/DynAny_Test/test_dynsequence.cpp
index 57f58e40bc4..48390372deb 100644
--- a/TAO/tests/DynAny_Test/test_dynsequence.cpp
+++ b/TAO/tests/DynAny_Test/test_dynsequence.cpp
@@ -248,7 +248,7 @@ Test_DynSequence::run_test (void)
DynAnyTests::test_seq *ts_out;
out_any1.in () >>= ts_out;
- if (!ACE_OS::strcmp ((*ts_out)[0U], data.m_string1))
+ if (!ACE_OS::strcmp ((*ts_out)[0U].in(), data.m_string1))
{
ACE_DEBUG ((LM_DEBUG,
"++ OK ++\n"));
diff --git a/TAO/tests/DynAny_Test/test_dynstruct.cpp b/TAO/tests/DynAny_Test/test_dynstruct.cpp
index c5d5d9780e8..2960758f42e 100644
--- a/TAO/tests/DynAny_Test/test_dynstruct.cpp
+++ b/TAO/tests/DynAny_Test/test_dynstruct.cpp
@@ -375,7 +375,7 @@ Test_DynStruct::run_test (void)
CORBA::ULong index = 2;
- if (ACE_OS::strcmp (gm[index].id, "es"))
+ if (ACE_OS::strcmp (gm[index].id.in(), "es"))
{
++this->error_count_;
}
diff --git a/TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc b/TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc
index 6da42a65f4b..62136abbcaf 100644
--- a/TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc
+++ b/TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc
@@ -8,7 +8,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
timeC.cpp
client.cpp
diff --git a/TAO/tests/Explicit_Event_Loop/client.cpp b/TAO/tests/Explicit_Event_Loop/client.cpp
index 174fa2dc97c..bb3c9fa085e 100644
--- a/TAO/tests/Explicit_Event_Loop/client.cpp
+++ b/TAO/tests/Explicit_Event_Loop/client.cpp
@@ -22,6 +22,7 @@
#include "timeC.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
// The following header is #included automatically by ACE+TAO.
// Therefore, they don't need to be included explicitly.
@@ -29,14 +30,16 @@
//#include <iomanip.h>
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize orb
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -50,7 +53,7 @@ main (int argc, char *argv[])
}
// Destringify argv[1].
- CORBA::Object_var obj = orb->string_to_object (argv[1]
+ CORBA::Object_var obj = orb->string_to_object (ACE_TEXT_TO_CHAR_IN(argv[1])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Explicit_Event_Loop/server.cpp b/TAO/tests/Explicit_Event_Loop/server.cpp
index 498c465ec22..c7c60d65c57 100644
--- a/TAO/tests/Explicit_Event_Loop/server.cpp
+++ b/TAO/tests/Explicit_Event_Loop/server.cpp
@@ -24,6 +24,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior_output_file = "server.ior";
int done = 0;
@@ -31,7 +32,7 @@ int done = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:d");
int c;
while ((c = get_opts ()) != -1)
@@ -83,19 +84,21 @@ void do_something_else()
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize orb
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
return 1;
}
@@ -136,7 +139,7 @@ main (int argc, char *argv[])
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
{
diff --git a/TAO/tests/Exposed_Policies/Exposed_Policies.mpc b/TAO/tests/Exposed_Policies/Exposed_Policies.mpc
index 6e9c5283fe0..6eca87854c2 100644
--- a/TAO/tests/Exposed_Policies/Exposed_Policies.mpc
+++ b/TAO/tests/Exposed_Policies/Exposed_Policies.mpc
@@ -12,7 +12,6 @@ project(*Server): strategies, rt_server {
project(*Client): strategies, rt_server {
exename = client
- after += *Server
Source_Files {
CounterC.cpp
diff --git a/TAO/tests/Exposed_Policies/Policy_Tester.cpp b/TAO/tests/Exposed_Policies/Policy_Tester.cpp
index 217eacdae41..8918ae6cc86 100644
--- a/TAO/tests/Exposed_Policies/Policy_Tester.cpp
+++ b/TAO/tests/Exposed_Policies/Policy_Tester.cpp
@@ -69,7 +69,7 @@ Policy_Tester::init (int argc,
// Here we parse the command line paramether passed
// to the application.
- ACE_Arg_Shifter arg_shifter (argc, argv);
+ ACE_TArg_Shifter<char> arg_shifter (argc, argv);
while (arg_shifter.is_anything_left ())
{
@@ -138,7 +138,7 @@ Policy_Tester::check_reference (CORBA::Object_ptr object,
{
if (CORBA::is_nil (object))
{
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (msg)));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT_TO_TCHAR_IN (msg)));
return 0;
}
return 1;
@@ -233,7 +233,7 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Activated as <%s>\n"), ior.in ()));
- FILE *output_file = ACE_OS::fopen (this->rt_poa_properties_->ior_source (), "w");
+ FILE *output_file = ACE_OS::fopen (this->rt_poa_properties_->ior_source (), ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Cannot open output file for writing IOR: %s"),
@@ -278,7 +278,7 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Activated as <%s>\n"), o_ior.in ()));
- output_file = ACE_OS::fopen (this->rt_object_properties_->ior_source (), "w");
+ output_file = ACE_OS::fopen (this->rt_object_properties_->ior_source (), ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp
index 4541f43613c..280217d99a9 100644
--- a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp
+++ b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp
@@ -26,7 +26,7 @@ Policy_Verifier::init (int argc,
CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (false);
- ACE_Arg_Shifter arg_shifter (argc, argv);
+ ACE_TArg_Shifter<char> arg_shifter (argc, argv);
while (arg_shifter.is_anything_left ())
{
@@ -260,7 +260,7 @@ Policy_Verifier::check_reference (CORBA::Object_ptr object,
{
if (CORBA::is_nil (object))
{
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (msg)));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT_TO_TCHAR_IN (msg)));
return 0;
}
return 1;
diff --git a/TAO/tests/Exposed_Policies/RT_Properties.cpp b/TAO/tests/Exposed_Policies/RT_Properties.cpp
index 4a23c92f0f5..fd4523b3b31 100644
--- a/TAO/tests/Exposed_Policies/RT_Properties.cpp
+++ b/TAO/tests/Exposed_Policies/RT_Properties.cpp
@@ -24,7 +24,7 @@ RT_Properties *
RT_Properties::read_from (const char *file_name
ACE_ENV_ARG_DECL)
{
- FILE *fp = ACE_OS::fopen (file_name, "r");
+ FILE *fp = ACE_OS::fopen (file_name, ACE_TEXT("r"));
RT_Properties *rt_properties;
diff --git a/TAO/tests/Exposed_Policies/client.cpp b/TAO/tests/Exposed_Policies/client.cpp
index 80bc23f24f3..b8df1e7a00b 100644
--- a/TAO/tests/Exposed_Policies/client.cpp
+++ b/TAO/tests/Exposed_Policies/client.cpp
@@ -8,12 +8,15 @@
#include "Policy_Verifier.h"
#include "tao/Strategies/advanced_resource.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(tao, client, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int status = 0;
ACE_DECLARE_NEW_CORBA_ENV;
@@ -21,7 +24,7 @@ main (int argc, char *argv[])
{
Policy_Verifier policy_verifier;
- bool retval = policy_verifier.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ bool retval = policy_verifier.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (retval)
diff --git a/TAO/tests/Exposed_Policies/server.cpp b/TAO/tests/Exposed_Policies/server.cpp
index ecc7d20d022..c8582a8fb27 100644
--- a/TAO/tests/Exposed_Policies/server.cpp
+++ b/TAO/tests/Exposed_Policies/server.cpp
@@ -14,20 +14,23 @@
#include "Policy_Tester.h"
#include "tao/Strategies/advanced_resource.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(tao, server, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
Policy_Tester policy_tester;
- int result = policy_tester.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ int result = policy_tester.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (result != 0)
diff --git a/TAO/tests/FL_Cube/FL_Cube.mpc b/TAO/tests/FL_Cube/FL_Cube.mpc
index 9f8856707ff..89af20e2099 100644
--- a/TAO/tests/FL_Cube/FL_Cube.mpc
+++ b/TAO/tests/FL_Cube/FL_Cube.mpc
@@ -8,7 +8,6 @@ project(*client) : taoclient, portableserver, tao_flresource {
}
project(*server) : taoserver, tao_flresource {
- after += *client
source_files {
server.cpp
test_i.cpp
diff --git a/TAO/tests/FL_Cube/client.cpp b/TAO/tests/FL_Cube/client.cpp
index 3d6b5a7abdf..ea6d1e66b09 100644
--- a/TAO/tests/FL_Cube/client.cpp
+++ b/TAO/tests/FL_Cube/client.cpp
@@ -2,6 +2,7 @@
#include "tao/FlResource_Loader.h"
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(FL_Cube, client, "$Id$")
@@ -27,7 +28,7 @@ public:
void show (void);
// Call show on all the window objects
- void parse_args (int argc, char *argv[]
+ void parse_args (int argc, ACE_TCHAR *argv[]
ACE_ENV_ARG_DECL);
private:
@@ -51,14 +52,16 @@ private:
// The server.
};
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
TAO::FlResource_Loader fl_loader;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Fl_Window window (300, 100);
@@ -71,7 +74,7 @@ int main (int argc, char* argv[])
client.show ();
- client.parse_args (argc, argv ACE_ENV_ARG_PARAMETER);
+ client.parse_args (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Fl::run ();
@@ -166,12 +169,12 @@ Client::y_changed (void)
}
void
-Client::parse_args (int argc, char *argv[]
+Client::parse_args (int argc, ACE_TCHAR *argv[]
ACE_ENV_ARG_DECL)
{
const char *ior = "file://test.ior";
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/FL_Cube/server.cpp b/TAO/tests/FL_Cube/server.cpp
index f3c3a235446..eaaddbdcac2 100644
--- a/TAO/tests/FL_Cube/server.cpp
+++ b/TAO/tests/FL_Cube/server.cpp
@@ -2,6 +2,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/FlResource_Loader.h"
ACE_RCSID(FL_Cube, server, "$Id$")
@@ -13,7 +14,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,8 +38,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Fl_Window window(300, 300);
TAO::FlResource_Loader fl_loader;
@@ -51,10 +54,10 @@ main (int argc, char *argv[])
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
char* targv[] = { argv[0] };
@@ -94,7 +97,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Faults/Faults.mpc b/TAO/tests/Faults/Faults.mpc
index 0bc0ae29bce..e52be673239 100644
--- a/TAO/tests/Faults/Faults.mpc
+++ b/TAO/tests/Faults/Faults.mpc
@@ -15,7 +15,6 @@ project(*Server): taoserver, minimum_corba {
}
project(*Middle): taoexe, portableserver, minimum_corba {
- after += *Server
IDL_Files {
test.idl
}
@@ -29,7 +28,6 @@ project(*Middle): taoexe, portableserver, minimum_corba {
}
project(*Client): taoexe, portableserver, minimum_corba {
- after += *Middle
IDL_Files {
test.idl
}
@@ -56,7 +54,6 @@ project(*Ping): taoexe, portableserver, minimum_corba {
}
project(*Pong): taoexe, portableserver, minimum_corba {
- after += *Ping
IDL_Files {
ping.idl
}
diff --git a/TAO/tests/Faults/client.cpp b/TAO/tests/Faults/client.cpp
index d7f4cf4e6e0..efc1e3c6fad 100644
--- a/TAO/tests/Faults/client.cpp
+++ b/TAO/tests/Faults/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
ACE_RCSID(Failure, client, "$Id$")
@@ -16,7 +17,7 @@ int do_crash = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "acszxk:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "acszxk:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -66,12 +67,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -94,7 +97,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Faults/middle.cpp b/TAO/tests/Faults/middle.cpp
index 8791dfa0c45..6244e071191 100644
--- a/TAO/tests/Faults/middle.cpp
+++ b/TAO/tests/Faults/middle.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Failure, middle, "$Id$")
@@ -13,7 +14,7 @@ int niterations = 10;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:k:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:k:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -47,12 +48,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -75,7 +78,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
@@ -115,7 +118,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Faults/ping.cpp b/TAO/tests/Faults/ping.cpp
index d113c4a8a84..b9a2e3038c0 100644
--- a/TAO/tests/Faults/ping.cpp
+++ b/TAO/tests/Faults/ping.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "ping_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Faults, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "ping.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -86,7 +89,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
PingObject_i *server_impl = 0;
@@ -110,7 +113,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Faults/pong.cpp b/TAO/tests/Faults/pong.cpp
index fbc0b86a42f..4bfc38f4c3a 100644
--- a/TAO/tests/Faults/pong.cpp
+++ b/TAO/tests/Faults/pong.cpp
@@ -4,6 +4,7 @@
#include "tao/debug.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Faults, server, "$Id$")
@@ -15,7 +16,7 @@ const char* ior = "file://ping.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:p:k:t:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:p:k:t:");
int c;
while ((c = get_opts ()) != -1)
@@ -111,12 +112,14 @@ run_client (CORBA::ORB_ptr orb,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -161,7 +164,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Faults/server.cpp b/TAO/tests/Faults/server.cpp
index 530af043ca7..e044871662f 100644
--- a/TAO/tests/Faults/server.cpp
+++ b/TAO/tests/Faults/server.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Failure, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -63,7 +66,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i *server_impl;
@@ -89,7 +92,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/File_IO/File_IO.mpc b/TAO/tests/File_IO/File_IO.mpc
index 0f597f3533e..7d29aa811f5 100644
--- a/TAO/tests/File_IO/File_IO.mpc
+++ b/TAO/tests/File_IO/File_IO.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, minimum_corba {
}
project(*Client): taoclient, anytypecode, minimum_corba {
- after += *Server
Source_Files {
FileC.cpp
client.cpp
diff --git a/TAO/tests/File_IO/File_i.cpp b/TAO/tests/File_IO/File_i.cpp
index 2e74de2a9f9..fd9c97a8d60 100644
--- a/TAO/tests/File_IO/File_i.cpp
+++ b/TAO/tests/File_IO/File_i.cpp
@@ -194,7 +194,7 @@ FileImpl::Descriptor::read (CORBA::Long num_bytes
ACE_CHECK_RETURN (0);
CORBA::Octet *buffer = File::Descriptor::DataBuffer::allocbuf (num_bytes);
- ssize_t length = ACE_OS::read (file_descriptor, buffer, num_bytes);
+ int length = ACE_OS::read (file_descriptor, buffer, num_bytes);
if (length > 0)
return new File::Descriptor::DataBuffer (length,
diff --git a/TAO/tests/File_IO/client.cpp b/TAO/tests/File_IO/client.cpp
index 189a81e3d59..71ba4ae5186 100644
--- a/TAO/tests/File_IO/client.cpp
+++ b/TAO/tests/File_IO/client.cpp
@@ -22,6 +22,7 @@
#include "ace/OS.h"
#include "ace/SString.h"
#include "ace/Thread_Manager.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Default_Servant, client, "client.cpp,v 1.8 2001/03/26 21:16:52 coryan Exp")
@@ -36,7 +37,7 @@ static CORBA::ORB_var orb;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "t:dk:f:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "t:dk:f:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -166,18 +167,20 @@ MTTEST (void *args)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB
- orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
+ orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse the command-line arguments to get the IOR
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
// parse args should catch this, but just in case...
if (iorfile == 0)
diff --git a/TAO/tests/File_IO/server.cpp b/TAO/tests/File_IO/server.cpp
index 7d73730e5dc..d3581a7a951 100644
--- a/TAO/tests/File_IO/server.cpp
+++ b/TAO/tests/File_IO/server.cpp
@@ -7,6 +7,7 @@
#include "ace/Task.h"
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_fcntl.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (File_IO,
server,
@@ -40,7 +41,7 @@ private:
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:d");
int c;
while ((c = get_opts ()) != -1)
@@ -69,8 +70,10 @@ parse_args (int argc, char **argv)
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_HANDLE handle = ACE_OS::open ("big.txt",
O_RDWR | O_CREAT,
ACE_DEFAULT_FILE_PERMS);
@@ -83,10 +86,10 @@ main (int argc, char *argv[])
ACE_TRY
{
// Initialize the ORB
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int result = parse_args (argc, argv);
+ int result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
@@ -173,7 +176,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG,"%s\n",
file_system_ior.in ()));
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Forwarding/Forwarding.mpc b/TAO/tests/Forwarding/Forwarding.mpc
index c0830f61571..d3e679e33b7 100644
--- a/TAO/tests/Forwarding/Forwarding.mpc
+++ b/TAO/tests/Forwarding/Forwarding.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, iortable {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Forwarding/client.cpp b/TAO/tests/Forwarding/client.cpp
index 7d6eee99bb3..c7e570001a6 100644
--- a/TAO/tests/Forwarding/client.cpp
+++ b/TAO/tests/Forwarding/client.cpp
@@ -3,6 +3,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Forwarding, client, "$Id$")
@@ -14,7 +15,7 @@ int do_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xk:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -64,15 +65,17 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Worker worker (orb.in ());
diff --git a/TAO/tests/Forwarding/server.cpp b/TAO/tests/Forwarding/server.cpp
index 788a56c975a..3fb553b5c32 100644
--- a/TAO/tests/Forwarding/server.cpp
+++ b/TAO/tests/Forwarding/server.cpp
@@ -4,6 +4,7 @@
#include "tao/IORTable/IORTable.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Forwarding, server, "$Id$")
@@ -12,7 +13,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,12 +37,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -89,7 +92,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp
index e900b46cdc1..4c4115929bf 100644
--- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp
+++ b/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp
@@ -2,6 +2,7 @@
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Muxing, client, "$Id$")
@@ -11,7 +12,7 @@ static size_t nthreads = 1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -38,15 +39,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp
index cbe3a65d928..3e4ecbd082f 100644
--- a/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp
+++ b/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp
@@ -3,6 +3,7 @@
#include "Payload_Receiver.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Big_Request_Muxing, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,13 +35,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int status = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Payload_Receiver *payload_receiver_impl;
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp
index 166b514f35c..772d50d03e7 100644
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp
+++ b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp
@@ -3,6 +3,7 @@
#include "Payload_Receiver.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Big_Request_Muxing, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,13 +35,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int status = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
PortableServer::LifespanPolicy_var lifespan =
@@ -96,7 +99,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Hang_Shutdown/Hang.mpc b/TAO/tests/Hang_Shutdown/Hang.mpc
index 9d58d8df81e..511bc4d5827 100644
--- a/TAO/tests/Hang_Shutdown/Hang.mpc
+++ b/TAO/tests/Hang_Shutdown/Hang.mpc
@@ -10,8 +10,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- avoids += ace_for_tao
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Hang_Shutdown/Test.idl b/TAO/tests/Hang_Shutdown/Test.idl
index 0ea5055f05a..bef07d739ae 100644
--- a/TAO/tests/Hang_Shutdown/Test.idl
+++ b/TAO/tests/Hang_Shutdown/Test.idl
@@ -1,11 +1,13 @@
// $Id$
-module Test
+module TAO
{
- interface Hang
- {
- void send_stuff (in string foo,
- in boolean flag);
- };
+ module Test
+ {
+ interface Hang
+ {
+ void send_stuff (in string foo,
+ in boolean flag);
+ };
+ };
};
-
diff --git a/TAO/tests/Hang_Shutdown/client.cpp b/TAO/tests/Hang_Shutdown/client.cpp
index 066461f895a..d33581c0f18 100644
--- a/TAO/tests/Hang_Shutdown/client.cpp
+++ b/TAO/tests/Hang_Shutdown/client.cpp
@@ -5,263 +5,271 @@
#include "ace/OS.h"
#include "ace/Task.h"
#include "ace/Profile_Timer.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Hello, client, "$Id$")
-namespace Test
-{
- const char *ior = "file://server.ior";
- ACE_Profile_Timer profile_timer;
- bool blocked = false;
- bool
- parse_args (int argc, char *argv[])
+namespace TAO
+{
+ namespace Test
{
- ACE_Get_Opt get_opts (argc, argv, "b:k:");
- int c;
+ const char *ior = "file://server.ior";
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'b':
+ ACE_Profile_Timer profile_timer;
+ bool blocked = false;
+
+ bool
+ parse_args (int argc, char *argv[])
+ {
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "b:k:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
{
- int tmp =
- ACE_OS::atoi (get_opts.opt_arg ());
+ case 'b':
+ {
+ int tmp =
+ ACE_OS::atoi (get_opts.opt_arg ());
- if (tmp)
- blocked = true;
- else
- blocked = false;
+ if (tmp)
+ blocked = true;
+ else
+ blocked = false;
+ }
+ break;
+ case 'k':
+ {
+ ior = get_opts.opt_arg ();
+ }
+ break;
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-k <ior> "
+ "\n",
+ argv [0]),
+ false);
}
- break;
- case 'k':
+
+ // Indicates sucessful parsing of the command line
+ return true;
+ }
+
+ class Client_Task : public ACE_Task_Base
+ {
+ public:
+ Client_Task (Hang_ptr h)
+ : h_ (Hang::_duplicate (h))
+ {}
+
+ virtual int svc (void)
+ {
+ ACE_DECLARE_NEW_CORBA_ENV;
+
+ ACE_TRY
{
- ior = get_opts.opt_arg ();
+ this->h_->send_stuff ("Testing",
+ false
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ this->h_->send_stuff ("Testing",
+ false
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ this->h_->send_stuff ("Testing",
+ true
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
}
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- false);
- }
+ ACE_CATCH (CORBA::COMM_FAILURE, f)
+ {
+ ACE_UNUSED_ARG (f);
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Caught COMM_FAILURE Exception \n"));
- // Indicates sucessful parsing of the command line
- return true;
- }
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) This is expected \n"));
- class Client_Task : public ACE_Task_Base
- {
- public:
- Client_Task (Hang_ptr h)
- : h_ (Hang::_duplicate (h))
- {}
+ return 0;
+ }
+ ACE_CATCH (CORBA::Exception, ex)
+ {
+ ex._tao_print_exception ("Caught CORBA Exception \n");
+
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) Error in test \n"));
+
+ return -1;
+ }
+ ACE_CATCHALL
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Caught a C++ exception \n"));
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) Error in test \n"));
+
+ return -1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+ }
- virtual int svc (void)
+ private:
+ Hang_var h_;
+ };
+
+ class Shutdown_Task : public ACE_Task_Base
{
- ACE_DECLARE_NEW_CORBA_ENV;
+ public:
+ Shutdown_Task (CORBA::ORB_ptr o)
+ : o_ (CORBA::ORB::_duplicate (o))
+ {}
- ACE_TRY
- {
- this->h_->send_stuff ("Testing",
- false
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ virtual int svc (void)
+ {
+ ACE_DECLARE_NEW_CORBA_ENV;
- this->h_->send_stuff ("Testing",
- false
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ACE_TRY
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Calling shutdown \n"));
- this->h_->send_stuff ("Testing",
- true
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::COMM_FAILURE, f)
- {
- ACE_UNUSED_ARG (f);
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Caught COMM_FAILURE Exception \n"));
+ // Just wait for the main thread to start sening out
+ // messages
+ ACE_OS::sleep (4);
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) This is expected \n"));
+ // Start the timer
+ profile_timer.start ();
- return 0;
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ex._tao_print_exception ("Caught CORBA Exception \n");
+ this->o_->shutdown (blocked
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Error in test \n"));
+ // Stop the timer
+ profile_timer.stop ();
- return -1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Caught a C++ exception \n"));
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Error in test \n"));
+ // Get the elampsed time
+ ACE_Profile_Timer::ACE_Elapsed_Time el;
+ profile_timer.elapsed_time (el);
- return -1;
- }
- ACE_ENDTRY;
+ // The elapsed time is in secs
+ if (el.real_time > 1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) ERROR: Too long to shutdown \n"));
- return 0;
- }
+ return 0;
+ }
+ }
+ ACE_CATCHALL
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Caught exception during shutdown \n"));
- private:
- Hang_var h_;
- };
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) Error in test \n"));
+ return -1;
+ }
+ ACE_ENDTRY;
- class Shutdown_Task : public ACE_Task_Base
- {
- public:
- Shutdown_Task (CORBA::ORB_ptr o)
- : o_ (CORBA::ORB::_duplicate (o))
- {}
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Returning from shutdown \n"));
+ return 0;
+ }
+ private:
+ CORBA::ORB_var o_;
+ };
- virtual int svc (void)
+ static int
+ try_main (int argc, char *argv[])
{
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Calling shutdown \n"));
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc,
+ argv,
+ ""
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
- // Just wait for the main thread to start sening out
- // messages
- ACE_OS::sleep (4);
+ if (parse_args (argc, argv) == false)
+ return -1;
- // Start the timer
- profile_timer.start ();
+ CORBA::Object_var tmp =
+ orb->string_to_object (ior
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
- this->o_->shutdown (blocked
- ACE_ENV_ARG_PARAMETER);
+ Hang_var test =
+ Hang::_narrow (tmp.in ()
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- // Stop the timer
- profile_timer.stop ();
+ if (CORBA::is_nil (test.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil test reference <%s>\n",
+ ior),
+ 1);
+ }
- // Get the elampsed time
- ACE_Profile_Timer::ACE_Elapsed_Time el;
- profile_timer.elapsed_time (el);
+ Client_Task ct (test.in ());
- // The elapsed time is in secs
- if (el.real_time > 1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Too long to shutdown \n"));
+ if (ct.activate (THR_NEW_LWP | THR_JOINABLE, 1) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot activate client threads\n"),
+ 1);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Activating shutdown thread \n"));
+
+ Shutdown_Task st (orb.in ());
+
+ if (st.activate (THR_NEW_LWP | THR_JOINABLE, 1) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot activate shutdown threads\n"),
+ 1);
+
+ ACE_Thread_Manager::instance ()->wait ();
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
- return 0;
- }
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "CORBA Exception caught \n");
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) Eror in test \n"));
+ return -1;
}
ACE_CATCHALL
{
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Caught exception during shutdown \n"));
-
- ACE_ERROR ((LM_ERROR,
"(%P|%t) Error in test \n"));
return -1;
}
ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Returning from shutdown \n"));
return 0;
}
- private:
- CORBA::ORB_var o_;
- };
-
- static int
- try_main (int argc, char *argv[])
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) == false)
- return -1;
-
- CORBA::Object_var tmp =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hang_var test =
- Hang::_narrow (tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil test reference <%s>\n",
- ior),
- 1);
- }
-
- Client_Task ct (test.in ());
-
- if (ct.activate (THR_NEW_LWP | THR_JOINABLE, 1) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Activating shutdown thread \n"));
-
- Shutdown_Task st (orb.in ());
-
- if (st.activate (THR_NEW_LWP | THR_JOINABLE, 1) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate shutdown threads\n"),
- 1);
-
- ACE_Thread_Manager::instance ()->wait ();
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "CORBA Exception caught \n");
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Eror in test \n"));
- return -1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Error in test \n"));
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
}
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- return Test::try_main (argc, argv);
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ return TAO::Test::try_main (convert.get_argc(), convert.get_ASCII_argv());
}
diff --git a/TAO/tests/Hang_Shutdown/server.cpp b/TAO/tests/Hang_Shutdown/server.cpp
index 4f17562b879..c745517bb13 100644
--- a/TAO/tests/Hang_Shutdown/server.cpp
+++ b/TAO/tests/Hang_Shutdown/server.cpp
@@ -3,102 +3,106 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
-namespace Test
+namespace TAO
{
- const char *ior_output_file = "server.ior";
-
- static int
- try_main (int argc,
- char *argv[])
+ namespace Test
{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
+ const char *ior_output_file = "server.ior";
+
+ static int
+ try_main (int argc,
+ char *argv[])
+ {
+ ACE_DECLARE_NEW_CORBA_ENV;
+
+ ACE_TRY
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc,
+ argv,
+ ""
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::Object_var poa_object =
+ orb->resolve_initial_references("RootPOA"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i *test_impl;
- ACE_NEW_RETURN (test_impl,
- test_i (),
- 1);
- PortableServer::ServantBase_var owner_transfer (test_impl);
-
- Hang_var test =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (10);
-
- orb->run (&tv);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught CORBA exception \n");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (root_poa.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Panic: nil RootPOA\n"),
+ 1);
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager ();
+
+ test_i *test_impl;
+ ACE_NEW_RETURN (test_impl,
+ test_i (),
+ 1);
+ PortableServer::ServantBase_var owner_transfer (test_impl);
+
+ Hang_var test =
+ test_impl->_this ();
+
+ CORBA::String_var ior =
+ orb->object_to_string (test.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // If the ior_output_file exists, output the ior to it
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_Time_Value tv (10);
+
+ orb->run (&tv);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) server - event loop finished\n"));
+
+ root_poa->destroy (1,
+ 1
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Caught CORBA exception \n");
+ return -1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+ }
}
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- return Test::try_main (argc, argv);
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ return TAO::Test::try_main (convert.get_argc(), convert.get_ASCII_argv());
}
diff --git a/TAO/tests/Hang_Shutdown/test_i.h b/TAO/tests/Hang_Shutdown/test_i.h
index 28f6ef82e23..1368f3c36c8 100644
--- a/TAO/tests/Hang_Shutdown/test_i.h
+++ b/TAO/tests/Hang_Shutdown/test_i.h
@@ -9,33 +9,36 @@
#include "ace/OS_NS_unistd.h"
-namespace Test
+namespace TAO
{
- class test_i
- : public virtual POA_Test::Hang
+ namespace Test
{
- public:
- // = The skeleton methods
- virtual void send_stuff (const char* str,
- CORBA::Boolean flag
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ class test_i
+ : public virtual POA_TAO::Test::Hang
{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) - [%C]\n", str));
+ public:
+ // = The skeleton methods
+ virtual void send_stuff (const char* str,
+ CORBA::Boolean flag
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) - [%C]\n", str));
- if (flag)
- {
- ACE_OS::sleep (10);
+ if (flag)
+ {
+ ACE_OS::sleep (10);
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Returning from send_stuff\n", str));
- }
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - Returning from send_stuff\n", str));
+ }
- return;
- }
- private:
- };
+ return;
+ }
+ private:
+ };
+ }
}
#include /**/ "ace/post.h"
diff --git a/TAO/tests/Hello/Hello.mpc b/TAO/tests/Hello/Hello.mpc
index 9a1892855d9..9ea6c4b127b 100644
--- a/TAO/tests/Hello/Hello.mpc
+++ b/TAO/tests/Hello/Hello.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Hello/client.cpp b/TAO/tests/Hello/client.cpp
index f85722246b5..3aa48460088 100644
--- a/TAO/tests/Hello/client.cpp
+++ b/TAO/tests/Hello/client.cpp
@@ -2,6 +2,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Hello, client, "$Id$")
@@ -10,7 +11,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,15 +35,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Hello/server.cpp b/TAO/tests/Hello/server.cpp
index 177aad4d1d8..b9b071c2cee 100644
--- a/TAO/tests/Hello/server.cpp
+++ b/TAO/tests/Hello/server.cpp
@@ -3,6 +3,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Hello,
server,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/ICMG_Any_Bug/Hello.mpc b/TAO/tests/ICMG_Any_Bug/Hello.mpc
index a41e64733b8..654e32854cd 100644
--- a/TAO/tests/ICMG_Any_Bug/Hello.mpc
+++ b/TAO/tests/ICMG_Any_Bug/Hello.mpc
@@ -10,7 +10,6 @@ project(ICMG_Any_Bug_Hello_Server): taoserver {
}
project(ICMG_Any_Bug_Hello_Client): taoclient, ifr_client, dynamicinterface, minimum_corba {
- after += ICMG_Any_Bug_Hello_Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/ICMG_Any_Bug/client.cpp b/TAO/tests/ICMG_Any_Bug/client.cpp
index 3457c09156a..fb34f948f97 100755
--- a/TAO/tests/ICMG_Any_Bug/client.cpp
+++ b/TAO/tests/ICMG_Any_Bug/client.cpp
@@ -4,6 +4,7 @@
#include "TestC.h"
#include "tao/ORB.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include <string>
ACE_RCSID (ICMG_Any_Bug,
@@ -15,7 +16,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,15 +40,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/ICMG_Any_Bug/server.cpp b/TAO/tests/ICMG_Any_Bug/server.cpp
index e32f495349a..255b2b423d7 100755
--- a/TAO/tests/ICMG_Any_Bug/server.cpp
+++ b/TAO/tests/ICMG_Any_Bug/server.cpp
@@ -3,6 +3,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (ICMG_Any_Bug,
server,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/IDL_Test/array.idl b/TAO/tests/IDL_Test/array.idl
index 2ec2f9c01a4..a9b40470990 100644
--- a/TAO/tests/IDL_Test/array.idl
+++ b/TAO/tests/IDL_Test/array.idl
@@ -9,7 +9,7 @@
// array.idl
//
// = DESCRIPTION
-// This file contains examples of IDL code that has
+// This file contains examples of IDL code that has
// caused problems in the past for the TAO IDL
// compiler. This test is to make sure the problems
// stay fixed.
@@ -40,16 +40,16 @@ typedef wrap outside_array[10];
// Once a problem with expressions in the brackets,
// as well as the typedef'd/anonymous thing.
-interface tdef
+interface tdef
{
const short byteslen = 12;
typedef octet Bytes[byteslen + 1];
- struct bytes_or_longs
+ struct bytes_or_longs
{
Bytes the_bytes; // typedef'd
long Longs[byteslen]; // anonymous
- };
+ };
};
// To test that all the octet arrays build and link as
@@ -61,7 +61,7 @@ module ABCModule
octet rmtNodeId[22];
octet rmtDetails[22];
};
-
+
struct bbbBubBubBubBaby
{
octet rmtNodeId[22];
@@ -91,22 +91,20 @@ module string_array
// Checks code generation for arrays and typedefs of arrays
// when they are not declared globally or inside a module.
-interface testdata
+interface testdata
{
typedef char Arraychar[2];
typedef Arraychar ArrayDeChar;
- struct struct2
+ struct struct2
{
Arraychar field_1;
ArrayDeChar field_2;
};
typedef sequence<Arraychar> ArraycharList;
- typedef sequence<Arraychar,10> BdArraycharList;
typedef sequence<ArrayDeChar> ArrayDeCharList;
- typedef sequence<ArrayDeChar,10> BdArrayDeCharList;
};
// Tests for explicit conversion of slice pointer to the
@@ -148,19 +146,6 @@ module bug_2126
case TRUE: MyStruct second_union_struct_member;
case FALSE: long wibble;
};
-
- typedef FirstUnion BdFirstUnionArray[2];
-
- struct BdMyStruct
- {
- BdFirstUnionArray my_struct_foo;
- };
-
- union BdSecondUnion switch (boolean)
- {
- case TRUE: BdMyStruct second_union_struct_member;
- case FALSE: long wibble;
- };
};
diff --git a/TAO/tests/IDL_Test/constants.idl b/TAO/tests/IDL_Test/constants.idl
index 4d95752d59e..1d48889517c 100644
--- a/TAO/tests/IDL_Test/constants.idl
+++ b/TAO/tests/IDL_Test/constants.idl
@@ -9,7 +9,7 @@
// constants.idl
//
// = DESCRIPTION
-// This file contains examples of IDL code that has
+// This file contains examples of IDL code that has
// caused problems in the past for the TAO IDL
// compiler. This test is to make sure the problems
// stay fixed.
@@ -48,8 +48,6 @@ const char fivebits = '\x32';
const char maybe_minus = '\xAf';
const char max_char_hex = '\xff';
-// const wstring wstr = L"wstr";
-
// unsigned longs greater than LONG_MAX
const unsigned long in_range = 3222111000;
@@ -74,22 +72,22 @@ const unsigned long drink = 1000000000 << 2;
// An enum of one type cannot be assigned to an constant of another
// enum type, but it's ok if one is a typedef of the other.
-module m_a
+module m_a
{
enum enum_a { value_1, value_2, value_3, value_4, value_5 };
};
-module m_b
+module m_b
{
typedef m_a::enum_a enum_b;
};
-module problems
+module problems
{
const m_b::enum_b bconst = m_a::value_2;
};
-// In a class, string constants cannot be declared inline, but
+// In a class, string constants cannot be declared inline, but
// arithmetic types can be.
module ClassConstants
{
@@ -97,14 +95,12 @@ module ClassConstants
{
const long iface_long = 55;
const string iface_str = "iface_str";
-// const wstring iface_wstr = L"iface_wstr";
};
-
+
valuetype Vt
{
const double vt_long = 66.66;
const string vt_str = "vt_str";
-// const wstring vt_wstr = L"vt_wstr";
};
};
diff --git a/TAO/tests/IDL_Test/included.idl b/TAO/tests/IDL_Test/included.idl
index a8da94acedc..6dd51822749 100644
--- a/TAO/tests/IDL_Test/included.idl
+++ b/TAO/tests/IDL_Test/included.idl
@@ -9,7 +9,7 @@
// included.idl
//
// = DESCRIPTION
-// This file contains examples of IDL code that has
+// This file contains examples of IDL code that has
// caused problems in the past for the TAO IDL
// compiler. This test is to make sure the problems
// stay fixed.
@@ -23,7 +23,7 @@
#define IDL_TEST_INCLUDED_IDL
// Included in IDL file 'including.idl'.
-module Aok
+module Aok
{
typedef sequence<double> Seq1Type;
typedef long Me;
@@ -31,16 +31,9 @@ module Aok
enum Agog
{
- Agog1,
- Agog2,
+ Agog1,
+ Agog2,
Agog3
};
-// This valuetype is used in a sequence in the including file,
-// and tests that Value_VarOut_T.h is included early enough.
-module VT_Def
-{
- valuetype VT {};
-};
-
#endif /* IDL_TEST_INCLUDED_IDL */
diff --git a/TAO/tests/IDL_Test/including.idl b/TAO/tests/IDL_Test/including.idl
index 431f8903c9c..f4bc66f3953 100644
--- a/TAO/tests/IDL_Test/including.idl
+++ b/TAO/tests/IDL_Test/including.idl
@@ -9,7 +9,7 @@
// including.idl
//
// = DESCRIPTION
-// This file contains examples of IDL code that has
+// This file contains examples of IDL code that has
// caused problems in the past for the TAO IDL
// compiler. This test is to make sure the problems
// stay fixed.
@@ -24,12 +24,12 @@
#include "included.idl"
-enum choice
+enum choice
{
dog
};
-union myUnion switch (choice)
+union myUnion switch (choice)
{
// Typedef is in included file
case dog: Aok::Seq1Type cat;
@@ -50,23 +50,19 @@ union Bog switch (Agog)
// scope doesn't apply here, because Me is not
// defined in the struct, only referenced.
interface iface
-{
+{
enum postal
{
ME,
- TAO_FE // FE is #defined on HP-UX 10.20, so I prefix it with TAO
+ TAO_FE // FE is #defined on HP-UX 10.20, so I prefix it with TAO
};
-
+
struct using_incl
{
Aok::Me field1;
- };
+ };
};
-module VT_Test
-{
- typedef sequence<VT_Def::VT> VTSeq;
-};
#endif /* IDL_TEST_INCLUDING_IDL */
diff --git a/TAO/tests/IDL_Test/interface.idl b/TAO/tests/IDL_Test/interface.idl
index 966a1fd80b9..28e428251be 100644
--- a/TAO/tests/IDL_Test/interface.idl
+++ b/TAO/tests/IDL_Test/interface.idl
@@ -9,7 +9,7 @@
// interface.idl
//
// = DESCRIPTION
-// This file contains examples of IDL code that has
+// This file contains examples of IDL code that has
// caused problems in the past for the TAO IDL
// compiler. This test is to make sure the problems
// stay fixed.
@@ -21,7 +21,7 @@
-// Used to be a problem in the get() and set()
+// Used to be a problem in the get() and set()
// generated code.
interface Base
@@ -38,7 +38,7 @@ interface Derived : Base
// foo's scope.
module foo_mod
{
- struct date
+ struct date
{
short month;
};
@@ -71,10 +71,6 @@ interface child : mother, father
{
};
-interface try
-{
-};
-
// Definition below in file.
interface later;
@@ -82,11 +78,11 @@ typedef boolean Bool;
interface later_user
{
- later op (in later inarg,
+ later op (in later inarg,
inout later inoutarg,
out later outarg);
-
+
// Not a clash with the C++ keyword because they are case sensitive,
// but the Arg_Traits<> specialization parameter (ACE_InputCDR::to_boolean)
// needs the unaliased type name to work.
@@ -106,7 +102,7 @@ interface later {};
// somewhere other than the scope where the
// lookup starts.
-interface Begin
+interface Begin
{
typedef long Value;
};
@@ -115,11 +111,11 @@ interface Middle : Begin
{
};
-interface End : Middle
+interface End : Middle
{
};
-interface Client
+interface Client
{
attribute End::Value v;
};
@@ -141,53 +137,31 @@ module ParamMod
{
ParameterTester objref;
};
-
+
typedef sequence<ParameterTester> object_seq_type;
-
+
typedef ParameterTester object_array_type[5];
- struct object_struct_type
+ struct object_struct_type
{
octet o1;
ParameterTester p1;
- long l1;
+ long l1;
};
-
+
union object_union_type switch (long)
{
case 0: string str;
case 1: ParameterTester pt;
};
-
+
object_seq_type parameter_tester_op (
in object_struct_type inarg,
inout object_array_type inoutarg,
out object_union_type outarg
)
- raises (object_excep_type);
- };
-};
-
-local interface testlocal
-{
-};
-
-interface A {
- union U switch(boolean)
- {
- case TRUE: A aa;
+ raises (object_excep_type);
};
};
-module M
-{
- interface A;
-};
-
-module M
-{
- interface A;
-
- interface A {};
-};
-
+
diff --git a/TAO/tests/IDL_Test/main.cpp b/TAO/tests/IDL_Test/main.cpp
index 2c39344eabf..3cf1d731fdb 100644
--- a/TAO/tests/IDL_Test/main.cpp
+++ b/TAO/tests/IDL_Test/main.cpp
@@ -26,6 +26,7 @@
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/AnyTypeCode/Any.h"
class hello_i : public virtual POA_hello
@@ -85,14 +86,16 @@ struct something_handler : public POA_bug_1985_c::d::AMI_somethingHandler
};
int
-main (int argc , char *argv[])
+ACE_TMAIN (int argc , ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int error_count = 0;
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/IDL_Test/sequence.idl b/TAO/tests/IDL_Test/sequence.idl
index 9c3b32da80e..9cbd802c9b4 100644
--- a/TAO/tests/IDL_Test/sequence.idl
+++ b/TAO/tests/IDL_Test/sequence.idl
@@ -9,7 +9,7 @@
// sequence.idl
//
// = DESCRIPTION
-// This file contains examples of IDL code that has
+// This file contains examples of IDL code that has
// caused problems in the past for the TAO IDL
// compiler. This test is to make sure the problems
// stay fixed.
@@ -28,19 +28,13 @@ typedef sequence<CORBA::OctetSeq> OctetSeqSeq;
// Bounded string elements of a sequence,
// require the use of CORBA_Any::to_char.
-interface seqTest
+interface seqTest
{
typedef sequence< string<12> > dozens;
void send_dozen (inout dozens bouquets);
};
-local interface seqLocal
-{
-};
-
-typedef sequence<seqLocal> seqLocalSeq;
-
// Anonymous sequence members must be unique types even if the
// sequence itself is not, so the member name has been
// incorported into the sequence class name. #if !defined guards
@@ -60,7 +54,7 @@ struct nestedSeqStruct
};
// Tests deeply nested recursive type.
-module Deployment
+module Deployment
{
struct ComponentPackageDescription;
diff --git a/TAO/tests/IORManipulation/IORTest.cpp b/TAO/tests/IORManipulation/IORTest.cpp
index 29313aad9b1..098c4411bb4 100644
--- a/TAO/tests/IORManipulation/IORTest.cpp
+++ b/TAO/tests/IORManipulation/IORTest.cpp
@@ -13,6 +13,7 @@
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB.h"
#include "tao/Environment.h"
#include "tao/IORManipulation/IORManip_Loader.h"
@@ -23,8 +24,10 @@ ACE_RCSID (IORManipluation,
"$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
// The variable is declared volatile because, some compilers
// optimizes this the wrong way. A case is point is the CC compiler
// on IRIX.
@@ -37,8 +40,8 @@ main (int argc, char *argv[])
ACE_TRY
{
// Retrieve the ORB.
- CORBA::ORB_var orb_ = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb_ = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp b/TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp
index b4058e4deef..49601f81dca 100644
--- a/TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp
+++ b/TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp
@@ -6,17 +6,20 @@
#include "tao/corba.h"
#include "tao/PortableServer/PortableServer.h"
+#include "ace/Argv_Type_Converter.h"
#include "bogus_i.h"
ACE_RCSID (IOR_Endpoint_Hostnames, generate_ior, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp b/TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp
index c6f463d08bf..efd40b3bf20 100644
--- a/TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp
+++ b/TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp
@@ -13,7 +13,7 @@
ACE_RCSID (IOR_Endpoint_Hostnames, list_interfaces, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
ACE_UNUSED_ARG (argc);
ACE_UNUSED_ARG (argv);
diff --git a/TAO/tests/IPV6/IPV6_Hello.mpc b/TAO/tests/IPV6/IPV6_Hello.mpc
index 9a1892855d9..9ea6c4b127b 100644
--- a/TAO/tests/IPV6/IPV6_Hello.mpc
+++ b/TAO/tests/IPV6/IPV6_Hello.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/IPV6/client.cpp b/TAO/tests/IPV6/client.cpp
index 77a6ec4190b..1f736d6527d 100644
--- a/TAO/tests/IPV6/client.cpp
+++ b/TAO/tests/IPV6/client.cpp
@@ -3,6 +3,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
#include "ace/SString.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Hello, client, "$Id$")
@@ -13,7 +14,7 @@ bool expect_error = false;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:x");
int c;
while ((c = get_opts ()) != -1)
@@ -41,15 +42,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/IPV6/run_test.pl b/TAO/tests/IPV6/run_test.pl
index 82d3ef36246..fc6aea9ecbd 100755
--- a/TAO/tests/IPV6/run_test.pl
+++ b/TAO/tests/IPV6/run_test.pl
@@ -24,25 +24,25 @@ $clt_arg = "-k file://$iorfile ";
@configurations =
(
{
- description => "Testing server with '-ORBConnectIPV6Only 1'.\n",
- server => "$srv_arg -ORBConnectIPV6Only 1",
+ description => "Testing server with '-ORBConnectIPV6Only YES'.\n",
+ server => "$srv_arg -ORBConnectIPV6Only YES",
client => "$clt_arg",
error => 0,
url => 0,
url_address => "",
},
{
- description => "Testing client with '-ORBPreferIPV6Interfaces 1'.\n",
+ description => "Testing client with '-ORBPreferIPV6Interfaces YES'.\n",
server => "$srv_arg ",
- client => "$clt_arg -ORBPreferIPV6Interfaces 1",
+ client => "$clt_arg -ORBPreferIPV6Interfaces YES",
error => 0,
url => 0,
url_address => "",
},
{
- description => "Testing IPV4 server with client with '-ORBConnectIPV6Only 1'.\n",
+ description => "Testing IPV4 server with client with '-ORBConnectIPV6Only YES'.\n",
server => "$srv_arg -ORBListenEndpoints iiop://127.0.0.1",
- client => "$clt_arg -x -ORBConnectIPV6Only 1",
+ client => "$clt_arg -x -ORBConnectIPV6Only YES",
error => 1,
url => 0,
url_address => "",
@@ -73,7 +73,7 @@ $clt_arg = "-k file://$iorfile ";
},
{
description => "Testing IPV6Only server with client and IPV4-forced URL",
- server => "$srv_arg -ORBConnectIPV6Only 1 -ORBObjRefStyle url",
+ server => "$srv_arg -ORBConnectIPV6Only YES -ORBObjRefStyle url",
client => "-x",
error => 1,
url => 1,
diff --git a/TAO/tests/IPV6/server.cpp b/TAO/tests/IPV6/server.cpp
index 177aad4d1d8..b9b071c2cee 100644
--- a/TAO/tests/IPV6/server.cpp
+++ b/TAO/tests/IPV6/server.cpp
@@ -3,6 +3,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Hello,
server,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/InterOp-Naming/INS_test_client.cpp b/TAO/tests/InterOp-Naming/INS_test_client.cpp
index ffc40b2331e..d234d5e80b7 100644
--- a/TAO/tests/InterOp-Naming/INS_test_client.cpp
+++ b/TAO/tests/InterOp-Naming/INS_test_client.cpp
@@ -7,18 +7,21 @@
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int i = 0;
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Retrieve a reference to the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -34,7 +37,7 @@ main (int argc, char *argv[])
for (i = 1; i < argc; ++i)
{
- if (ACE_OS::strcmp (argv[i], "-l") == 0)
+ if (ACE_OS::strcmp (argv[i], ACE_TEXT("-l")) == 0)
{
// List initial services
CORBA::ORB::ObjectIdList_var list =
@@ -69,7 +72,7 @@ main (int argc, char *argv[])
}
else
{
- objref = orb->resolve_initial_references (argv[i] ACE_ENV_ARG_PARAMETER);
+ objref = orb->resolve_initial_references (ACE_TEXT_TO_CHAR_IN(argv[i]) ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (CORBA::is_nil (objref.in ()))
diff --git a/TAO/tests/InterOp-Naming/INS_test_server.cpp b/TAO/tests/InterOp-Naming/INS_test_server.cpp
index c45f732a26f..f0d12921979 100644
--- a/TAO/tests/InterOp-Naming/INS_test_server.cpp
+++ b/TAO/tests/InterOp-Naming/INS_test_server.cpp
@@ -5,8 +5,9 @@
// This is the main driver program for the INS test server.
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
Server_i server;
@@ -15,8 +16,7 @@ main (int argc, char *argv[])
ACE_TRY_NEW_ENV
{
- if (server.init (argc,
- argv
+ if (server.init (convert.get_argc(), convert.get_ASCII_argv()
ACE_ENV_ARG_PARAMETER) == -1)
return 1;
else
diff --git a/TAO/tests/InterOp-Naming/InterOp-Naming.mpc b/TAO/tests/InterOp-Naming/InterOp-Naming.mpc
index 163fd3de1c3..5604fafaf7b 100644
--- a/TAO/tests/InterOp-Naming/InterOp-Naming.mpc
+++ b/TAO/tests/InterOp-Naming/InterOp-Naming.mpc
@@ -12,7 +12,6 @@ project(*Server): taoserver, utils, iortable {
project(*Client): taoclient, anytypecode {
exename = INS_test_client
- after += *Server
Source_Files {
INSC.cpp
INS_test_client.cpp
diff --git a/TAO/tests/InterOp-Naming/Server_i.cpp b/TAO/tests/InterOp-Naming/Server_i.cpp
index ec60caff7ea..343dd6d4835 100644
--- a/TAO/tests/InterOp-Naming/Server_i.cpp
+++ b/TAO/tests/InterOp-Naming/Server_i.cpp
@@ -25,7 +25,7 @@ Server_i::~Server_i (void)
int
Server_i::parse_args (void)
{
- ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:ni:");
+ ACE_Get_Arg_Opt<char> get_opts (this->argc_, this->argv_, "do:ni:");
int c = 0;
while ((c = get_opts ()) != -1)
@@ -35,7 +35,7 @@ Server_i::parse_args (void)
TAO_debug_level++;
break;
case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
+ this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), ACE_TEXT("w"));
if (this->ior_output_file_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Unable to open %s for writing: %p\n",
diff --git a/TAO/tests/InterOp-Naming/Server_i.h b/TAO/tests/InterOp-Naming/Server_i.h
index 7df2f070c41..62abca27e44 100644
--- a/TAO/tests/InterOp-Naming/Server_i.h
+++ b/TAO/tests/InterOp-Naming/Server_i.h
@@ -22,6 +22,7 @@
#include "tao/Utils/ORB_Manager.h"
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
+#include "ace/Argv_Type_Converter.h"
#include "INS_i.h"
class Server_i
diff --git a/TAO/tests/Leader_Followers/Leader_Followers.mpc b/TAO/tests/Leader_Followers/Leader_Followers.mpc
index a3b794ac88f..c82979d0e98 100644
--- a/TAO/tests/Leader_Followers/Leader_Followers.mpc
+++ b/TAO/tests/Leader_Followers/Leader_Followers.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, strategies {
}
project(*Client): taoclient, strategies {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Leader_Followers/client.cpp b/TAO/tests/Leader_Followers/client.cpp
index 1711b12b175..a25eb1a6a08 100644
--- a/TAO/tests/Leader_Followers/client.cpp
+++ b/TAO/tests/Leader_Followers/client.cpp
@@ -17,6 +17,7 @@
#include "ace/Read_Buffer.h"
#include "ace/Task.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "tao/Strategies/advanced_resource.h"
@@ -45,7 +46,7 @@ static int shutdown_server = 0;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "k:c:e:w:t:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:c:e:w:t:x");
int c;
while ((c = get_opts ()) != -1)
@@ -236,22 +237,24 @@ private:
};
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
+ int parse_args_result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (parse_args_result != 0)
return parse_args_result;
diff --git a/TAO/tests/Leader_Followers/server.cpp b/TAO/tests/Leader_Followers/server.cpp
index 42575677363..492e3ad5a04 100644
--- a/TAO/tests/Leader_Followers/server.cpp
+++ b/TAO/tests/Leader_Followers/server.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "tao/Strategies/advanced_resource.h"
@@ -15,7 +16,7 @@ int number_of_event_loop_threads = 1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "e:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "e:o:");
int c;
while ((c = get_opts ()) != -1)
@@ -80,13 +81,15 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -108,7 +111,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
test_i servant (orb.in ());
@@ -124,7 +127,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/LongUpcalls/AMI_Manager.cpp b/TAO/tests/LongUpcalls/AMI_Manager.cpp
index 01b2d58bb9e..e244be88a2e 100644
--- a/TAO/tests/LongUpcalls/AMI_Manager.cpp
+++ b/TAO/tests/LongUpcalls/AMI_Manager.cpp
@@ -162,13 +162,13 @@ Controller_Handler::worker_started (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
void
Controller_Handler::worker_started_excep
- (::Messaging::ExceptionHolder* h
+ (Test::AMI_ControllerExceptionHolder* h
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_TRY
{
- h->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ h->raise_worker_started (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -190,13 +190,13 @@ Controller_Handler::worker_finished (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
void
Controller_Handler::worker_finished_excep
- (::Messaging::ExceptionHolder *h
+ (Test::AMI_ControllerExceptionHolder *h
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_TRY
{
- h->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ h->raise_worker_finished (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/tests/LongUpcalls/AMI_Manager.h b/TAO/tests/LongUpcalls/AMI_Manager.h
index 5d7d6a82eec..9e1d360e5e8 100644
--- a/TAO/tests/LongUpcalls/AMI_Manager.h
+++ b/TAO/tests/LongUpcalls/AMI_Manager.h
@@ -63,12 +63,12 @@ public:
virtual void worker_started (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void worker_started_excep (::Messaging::ExceptionHolder*
+ virtual void worker_started_excep (Test::AMI_ControllerExceptionHolder*
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void worker_finished (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void worker_finished_excep (::Messaging::ExceptionHolder*
+ virtual void worker_finished_excep (Test::AMI_ControllerExceptionHolder*
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/tests/LongUpcalls/LongUpcalls.mpc b/TAO/tests/LongUpcalls/LongUpcalls.mpc
index 13a0c026057..5bd663d16e0 100644
--- a/TAO/tests/LongUpcalls/LongUpcalls.mpc
+++ b/TAO/tests/LongUpcalls/LongUpcalls.mpc
@@ -10,24 +10,21 @@ project(*Server): taoserver, messaging, ami {
}
project(*Client): messaging, taoexe, portableserver, ami {
- after += *Server
Source_Files {
Controller.cpp
blocking_client.cpp
}
}
-project(*AMI_Server): taoserver, messaging, ami {
+project(*AMI Server): taoserver, messaging, ami {
exename = ami_server
- after += *Client
Source_Files {
AMI_Manager.cpp
ami_server.cpp
}
}
-project(*AMI_Client): messaging, taoexe, portableserver, ami {
- after += *AMI_Server
+project(*AMI Client): messaging, taoexe, portableserver, ami {
Source_Files {
Controller.cpp
Manager_Handler.cpp
diff --git a/TAO/tests/LongUpcalls/Manager_Handler.cpp b/TAO/tests/LongUpcalls/Manager_Handler.cpp
index c1532a2eb86..4223798dc86 100644
--- a/TAO/tests/LongUpcalls/Manager_Handler.cpp
+++ b/TAO/tests/LongUpcalls/Manager_Handler.cpp
@@ -34,13 +34,13 @@ Manager_Handler::start_workers (ACE_ENV_SINGLE_ARG_DECL)
}
void
-Manager_Handler::start_workers_excep (::Messaging::ExceptionHolder * holder
+Manager_Handler::start_workers_excep (Test::AMI_ManagerExceptionHolder * holder
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_TRY
{
- holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ holder->raise_start_workers (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/tests/LongUpcalls/Manager_Handler.h b/TAO/tests/LongUpcalls/Manager_Handler.h
index 8ee1d472c2e..742f4c76ca3 100644
--- a/TAO/tests/LongUpcalls/Manager_Handler.h
+++ b/TAO/tests/LongUpcalls/Manager_Handler.h
@@ -19,7 +19,7 @@ public:
// = The skeleton methods
virtual void start_workers (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void start_workers_excep (::Messaging::ExceptionHolder *holder
+ virtual void start_workers_excep (Test::AMI_ManagerExceptionHolder*
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/tests/LongUpcalls/ami_client.cpp b/TAO/tests/LongUpcalls/ami_client.cpp
index e22153a203d..db3afd7db23 100644
--- a/TAO/tests/LongUpcalls/ami_client.cpp
+++ b/TAO/tests/LongUpcalls/ami_client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "Controller.h"
#include "Manager_Handler.h"
@@ -11,7 +12,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Controller controller_impl;
diff --git a/TAO/tests/LongUpcalls/ami_server.cpp b/TAO/tests/LongUpcalls/ami_server.cpp
index ed7307129f9..5946477e568 100644
--- a/TAO/tests/LongUpcalls/ami_server.cpp
+++ b/TAO/tests/LongUpcalls/ami_server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "AMI_Manager.h"
ACE_RCSID(LongUpcalls, ami_server, "$Id$")
@@ -10,7 +11,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -33,12 +34,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -58,7 +61,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
AMI_Manager manager_impl (orb.in ());
@@ -72,7 +75,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/LongUpcalls/blocking_client.cpp b/TAO/tests/LongUpcalls/blocking_client.cpp
index b914c957950..6eda0fc867d 100644
--- a/TAO/tests/LongUpcalls/blocking_client.cpp
+++ b/TAO/tests/LongUpcalls/blocking_client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "Controller.h"
ACE_RCSID(LongUpcalls, blocking_client, "$Id$")
@@ -10,7 +11,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -33,12 +34,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var object =
@@ -58,7 +61,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Controller controller_impl;
diff --git a/TAO/tests/LongUpcalls/blocking_server.cpp b/TAO/tests/LongUpcalls/blocking_server.cpp
index eb5c55c3bf0..2fb3ea014f1 100644
--- a/TAO/tests/LongUpcalls/blocking_server.cpp
+++ b/TAO/tests/LongUpcalls/blocking_server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "Manager.h"
ACE_RCSID(LongUpcalls, blocking_server, "$Id$")
@@ -10,7 +11,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -33,12 +34,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -58,7 +61,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Manager manager_impl (orb.in ());
@@ -72,7 +75,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/MProfile/MProfile.mpc b/TAO/tests/MProfile/MProfile.mpc
index e48d767fd5c..40f7a4677d8 100644
--- a/TAO/tests/MProfile/MProfile.mpc
+++ b/TAO/tests/MProfile/MProfile.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, iormanip {
}
project(*Client): taoclient, iormanip {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/MProfile/client.cpp b/TAO/tests/MProfile/client.cpp
index b25b828894c..46e8d32920d 100644
--- a/TAO/tests/MProfile/client.cpp
+++ b/TAO/tests/MProfile/client.cpp
@@ -4,6 +4,7 @@
#include "ace/SString.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
ACE_RCSID(MT_Server, client, "$Id$")
@@ -16,7 +17,7 @@ const char *name = "file://amba.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "xk:m:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xk:m:");
int c;
while ((c = get_opts ()) != -1)
@@ -53,17 +54,19 @@ run_test (Simple_Server_ptr server
ACE_ENV_ARG_DECL);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Primary server
diff --git a/TAO/tests/MProfile/server.cpp b/TAO/tests/MProfile/server.cpp
index 12aea589a09..66753633013 100644
--- a/TAO/tests/MProfile/server.cpp
+++ b/TAO/tests/MProfile/server.cpp
@@ -4,6 +4,7 @@
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Client, server, "$Id$")
@@ -12,7 +13,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -64,7 +67,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -82,7 +85,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc b/TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc
index e4abfd734d6..cb84adb7841 100644
--- a/TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc
+++ b/TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver, messaging, iormanip {
}
project(*Client): taoclient, messaging, iormanip {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/MProfile_Connection_Timeout/client.cpp b/TAO/tests/MProfile_Connection_Timeout/client.cpp
index 5425b2e0ddd..0152c2d6a75 100644
--- a/TAO/tests/MProfile_Connection_Timeout/client.cpp
+++ b/TAO/tests/MProfile_Connection_Timeout/client.cpp
@@ -3,6 +3,7 @@
#include "tao/IORManipulation/IORManip_Loader.h"
#include "ace/SString.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "tao/TimeBaseC.h"
#include "tao/Messaging/Messaging.h"
@@ -21,7 +22,7 @@ TimeBase::TimeT timeout_period = 1000000;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "xk:m:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xk:m:");
int c;
while ((c = get_opts ()) != -1)
@@ -58,17 +59,19 @@ run_test (Simple_Server_ptr server
ACE_ENV_ARG_DECL);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Primary server
diff --git a/TAO/tests/MProfile_Connection_Timeout/server.cpp b/TAO/tests/MProfile_Connection_Timeout/server.cpp
index 9daac4d75f7..a8e06ff8f47 100644
--- a/TAO/tests/MProfile_Connection_Timeout/server.cpp
+++ b/TAO/tests/MProfile_Connection_Timeout/server.cpp
@@ -1,8 +1,9 @@
// $Id$
-#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
+#include "ace/Get_Opt.h"
ACE_RCSID(MProfile_Connection_Timeout,
server,
@@ -13,7 +14,7 @@ int orb_run = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:r");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:r");
int c;
while ((c = get_opts ()) != -1)
@@ -39,12 +40,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -68,7 +71,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -86,7 +89,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc b/TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc
index d6f4df5acc4..e38b68ca361 100644
--- a/TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc
+++ b/TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver, minimum_corba {
project(*Client): taoclient, anytypecode, minimum_corba {
exename = client
- after += *Server
Source_Files {
testC.cpp
client.cpp
@@ -19,7 +18,6 @@ project(*Client): taoclient, anytypecode, minimum_corba {
project(*Manager): taoserver, minimum_corba, iormanip {
exename = manager
- after += *Client
Source_Files {
testC.cpp
Servant_Locator.cpp
diff --git a/TAO/tests/MProfile_Forwarding/Manager.cpp b/TAO/tests/MProfile_Forwarding/Manager.cpp
index 7336bc42523..625b9c8c052 100644
--- a/TAO/tests/MProfile_Forwarding/Manager.cpp
+++ b/TAO/tests/MProfile_Forwarding/Manager.cpp
@@ -6,6 +6,7 @@
#include "ace/SString.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
const char *first_ior = 0;
const char *second_ior = 0;
@@ -15,7 +16,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "a:b:c:d:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "a:b:c:d:");
int c;
while ((c = get_opts ()) != -1)
@@ -50,9 +51,11 @@ parse_args (int argc, char *argv[])
int
-main (int argc,
- char *argv[])
+ACE_TMAIN (int argc,
+ ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
Manager manager;
@@ -60,12 +63,11 @@ main (int argc,
ACE_TRY
{
// Initilaize the ORB, POA etc.
- manager.init (argc,
- argv
+ manager.init (convert.get_argc(), convert.get_ASCII_argv()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) == -1)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
manager.activate_servant (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -280,7 +282,7 @@ Manager::make_iors_register (ACE_ENV_SINGLE_ARG_DECL)
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/MProfile_Forwarding/client.cpp b/TAO/tests/MProfile_Forwarding/client.cpp
index 610899838a9..31c2d829d59 100644
--- a/TAO/tests/MProfile_Forwarding/client.cpp
+++ b/TAO/tests/MProfile_Forwarding/client.cpp
@@ -4,6 +4,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_unistd.h"
#include "testC.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Server, client, "$Id$")
@@ -12,7 +13,7 @@ const char *ior_input_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,17 +40,19 @@ run_test (Simple_Server_ptr server
ACE_ENV_ARG_DECL);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) == -1)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
CORBA::Object_var objref =
diff --git a/TAO/tests/MProfile_Forwarding/server.cpp b/TAO/tests/MProfile_Forwarding/server.cpp
index 04c27ae739f..0c473d95b42 100755
--- a/TAO/tests/MProfile_Forwarding/server.cpp
+++ b/TAO/tests/MProfile_Forwarding/server.cpp
@@ -4,6 +4,7 @@
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Client, server, "$Id$")
@@ -12,7 +13,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -64,7 +67,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -82,7 +85,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/MT_BiDir/MT_BiDir.mpc b/TAO/tests/MT_BiDir/MT_BiDir.mpc
index ab023c419a3..db3f6d32dbf 100644
--- a/TAO/tests/MT_BiDir/MT_BiDir.mpc
+++ b/TAO/tests/MT_BiDir/MT_BiDir.mpc
@@ -13,7 +13,6 @@ project(*Server): taoexe, portableserver, minimum_corba, bidir_giop {
}
project(*Client): taoexe, portableserver, minimum_corba, bidir_giop {
- after += *Server
Source_Files {
ReceiverC.cpp
ReceiverS.cpp
diff --git a/TAO/tests/MT_BiDir/Sender_i.h b/TAO/tests/MT_BiDir/Sender_i.h
index 91b4b729db0..cda5d4bf54e 100644
--- a/TAO/tests/MT_BiDir/Sender_i.h
+++ b/TAO/tests/MT_BiDir/Sender_i.h
@@ -1,6 +1,6 @@
-// -*- C++ -*-
//
// $Id$
+//
#ifndef MT_BIDIR_RECEIVER_H
#define MT_BIDIR_RECEIVER_H
@@ -8,9 +8,7 @@
#include "SenderS.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/**
* Simply print count how many bytes were received.
diff --git a/TAO/tests/MT_BiDir/Server_Task.h b/TAO/tests/MT_BiDir/Server_Task.h
index 42686741b21..20d4142c2dd 100644
--- a/TAO/tests/MT_BiDir/Server_Task.h
+++ b/TAO/tests/MT_BiDir/Server_Task.h
@@ -16,10 +16,7 @@
#include "tao/ORB.h"
class Sender_i;
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implement a Task to run the experiments using multiple threads.
class Server_Task : public ACE_Task_Base
diff --git a/TAO/tests/MT_BiDir/client.cpp b/TAO/tests/MT_BiDir/client.cpp
index 23566a7d242..afe9c19c52b 100644
--- a/TAO/tests/MT_BiDir/client.cpp
+++ b/TAO/tests/MT_BiDir/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "Receiver_i.h"
#include "SenderC.h"
#include "tao/BiDir_GIOP/BiDirGIOP.h"
@@ -14,7 +15,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,17 +38,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var poa_object =
diff --git a/TAO/tests/MT_BiDir/server.cpp b/TAO/tests/MT_BiDir/server.cpp
index 7aeeeecdbc8..d5c3ae6d26f 100644
--- a/TAO/tests/MT_BiDir/server.cpp
+++ b/TAO/tests/MT_BiDir/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "Sender_i.h"
#include "tao/BiDir_GIOP/BiDirGIOP.h"
#include "tao/AnyTypeCode/Any.h"
@@ -23,7 +24,7 @@ static int no_clients = 2;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:i:c:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:i:c:");
int c;
while ((c = get_opts ()) != -1)
@@ -55,15 +56,17 @@ parse_args (int argc, char *argv[])
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var poa_object =
@@ -149,7 +152,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/MT_Client/MT_Client.mpc b/TAO/tests/MT_Client/MT_Client.mpc
index 1974ade69bd..2d52b489a66 100644
--- a/TAO/tests/MT_Client/MT_Client.mpc
+++ b/TAO/tests/MT_Client/MT_Client.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/MT_Client/client.cpp b/TAO/tests/MT_Client/client.cpp
index aaab6575632..0bbd22344ac 100644
--- a/TAO/tests/MT_Client/client.cpp
+++ b/TAO/tests/MT_Client/client.cpp
@@ -4,6 +4,7 @@
#include "tao/debug.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Client, client, "$Id$")
@@ -15,7 +16,7 @@ int server_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:n:i:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:n:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -76,15 +77,17 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/MT_Client/orb_creation.cpp b/TAO/tests/MT_Client/orb_creation.cpp
index 6a6f1db233d..afeb58353a0 100644
--- a/TAO/tests/MT_Client/orb_creation.cpp
+++ b/TAO/tests/MT_Client/orb_creation.cpp
@@ -3,6 +3,7 @@
#include "testC.h"
#include "tao/debug.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "ace/Task.h"
ACE_RCSID(MT_Client, orb_creation, "$Id$")
@@ -14,7 +15,7 @@ int niterations = 5;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:n:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:n:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -69,15 +70,17 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "");
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
@@ -144,7 +147,7 @@ Client::svc (void)
CORBA::String_var argv0 = CORBA::string_dup ("dummy_argv");
char* argv[1] = { argv0.inout () };
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var object =
diff --git a/TAO/tests/MT_Client/server.cpp b/TAO/tests/MT_Client/server.cpp
index bf5e6312642..ee5ece94ffa 100644
--- a/TAO/tests/MT_Client/server.cpp
+++ b/TAO/tests/MT_Client/server.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Client, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/MT_Server/MT_Server.mpc b/TAO/tests/MT_Server/MT_Server.mpc
index bfb96e8b536..4c15c26f959 100644
--- a/TAO/tests/MT_Server/MT_Server.mpc
+++ b/TAO/tests/MT_Server/MT_Server.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/MT_Server/client.cpp b/TAO/tests/MT_Server/client.cpp
index 3948231f376..b84f7d4ff82 100644
--- a/TAO/tests/MT_Server/client.cpp
+++ b/TAO/tests/MT_Server/client.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
ACE_RCSID(MT_Server, client, "$Id$")
@@ -13,7 +14,7 @@ int do_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xk:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -46,15 +47,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/MT_Server/server.cpp b/TAO/tests/MT_Server/server.cpp
index 982fc2cbc28..9fafa11b188 100644
--- a/TAO/tests/MT_Server/server.cpp
+++ b/TAO/tests/MT_Server/server.cpp
@@ -3,6 +3,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Server, server, "$Id$")
@@ -13,7 +14,7 @@ int nthreads = 4;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -61,12 +62,14 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -86,7 +89,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -104,7 +107,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/MT_Timeout/MT_Timeout.mpc b/TAO/tests/MT_Timeout/MT_Timeout.mpc
index 634030e4814..71d75c1743c 100644
--- a/TAO/tests/MT_Timeout/MT_Timeout.mpc
+++ b/TAO/tests/MT_Timeout/MT_Timeout.mpc
@@ -10,7 +10,6 @@ project(*Server): messaging, taoserver {
}
project(*Client): messaging, taoexe, portableserver {
- after += *Server
Source_Files {
TestC.cpp
Client_Task.cpp
diff --git a/TAO/tests/MT_Timeout/client.cpp b/TAO/tests/MT_Timeout/client.cpp
index 21262fc921d..d00712c2a34 100644
--- a/TAO/tests/MT_Timeout/client.cpp
+++ b/TAO/tests/MT_Timeout/client.cpp
@@ -2,6 +2,7 @@
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Client_Leaks, client, "$Id$")
@@ -12,7 +13,7 @@ int threads = 4;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -46,15 +47,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/MT_Timeout/server.cpp b/TAO/tests/MT_Timeout/server.cpp
index c3a5b91ae3e..9a48ddc7a06 100644
--- a/TAO/tests/MT_Timeout/server.cpp
+++ b/TAO/tests/MT_Timeout/server.cpp
@@ -3,6 +3,7 @@
#include "Sleep_Service.h"
#include "Server_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Timeout, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Sleep_Service *sleep_service_impl;
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -91,7 +94,7 @@ main (int argc, char *argv[])
Server_Task server_task (ACE_Thread_Manager::instance (),
orb.in (),
- ACE_Time_Value(240));
+ 240);
if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 8, 1) == -1)
{
diff --git a/TAO/tests/Multiple/Multiple.mpc b/TAO/tests/Multiple/Multiple.mpc
index 47b388a8e0f..2584e88308f 100644
--- a/TAO/tests/Multiple/Multiple.mpc
+++ b/TAO/tests/Multiple/Multiple.mpc
@@ -13,7 +13,6 @@ project(*Server): taoserver {
project(*Client): taoexe, portableserver {
idlflags += -Gd
- after += *Server
Source_Files {
Multiple_Impl.cpp
diff --git a/TAO/tests/Multiple/client.cpp b/TAO/tests/Multiple/client.cpp
index 8a2d499abce..37dadd157cf 100644
--- a/TAO/tests/Multiple/client.cpp
+++ b/TAO/tests/Multiple/client.cpp
@@ -1,17 +1,20 @@
// $Id$
# include "Collocation_Tester.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (tests, client, "$Id$")
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// ORB Initialization
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "TAO" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "TAO" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var object;
diff --git a/TAO/tests/Multiple/server.cpp b/TAO/tests/Multiple/server.cpp
index fcaa75221f3..0b251b2bfd6 100644
--- a/TAO/tests/Multiple/server.cpp
+++ b/TAO/tests/Multiple/server.cpp
@@ -2,18 +2,20 @@
#include "Multiple_Impl.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (tests, server, "$Id$")
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Orb Initialization
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "TAO" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "TAO" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var object;
@@ -49,7 +51,7 @@ int main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen ("s.ior", "w");
+ FILE *output_file= ACE_OS::fopen ("s.ior", ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc b/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc
index f818ca1c940..db84416b4cc 100644
--- a/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc
+++ b/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc
@@ -8,7 +8,6 @@ project(*Server): taoserver, utils {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
Multiple_InheritanceC.cpp
client.cpp
diff --git a/TAO/tests/Multiple_Inheritance/client.cpp b/TAO/tests/Multiple_Inheritance/client.cpp
index 8406386f614..9d9ef382b00 100644
--- a/TAO/tests/Multiple_Inheritance/client.cpp
+++ b/TAO/tests/Multiple_Inheritance/client.cpp
@@ -21,6 +21,7 @@
#include "ace/OS_NS_fcntl.h"
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Multiple_Inheritance, client, "$Id$")
@@ -30,7 +31,7 @@ static char *ior_input_file = 0;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "k:f:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:f:");
int c;
while ((c = get_opts ()) != -1)
@@ -69,18 +70,20 @@ parse_args (int argc, char **argv)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), 0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse the command-line arguments to get the IOR
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
// If ior_input_file exists, Read the file, and get the IOR
// else, it must have been specified on the command line
diff --git a/TAO/tests/Multiple_Inheritance/server.cpp b/TAO/tests/Multiple_Inheritance/server.cpp
index d29978c9163..87645cb5598 100644
--- a/TAO/tests/Multiple_Inheritance/server.cpp
+++ b/TAO/tests/Multiple_Inheritance/server.cpp
@@ -5,6 +5,7 @@
#include "tao/Utils/ORB_Manager.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Multiple_Inheritance, server, "$Id$")
@@ -20,7 +21,7 @@ Multiple_Inheritance_i::Multiple_Inheritance_i (void)
int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "f:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "f:");
int c;
while ((c = get_opts ()) != -1)
@@ -44,8 +45,10 @@ parse_args (int argc, char **argv)
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Multiple_Inheritance_i servant;
TAO_ORB_Manager orb_manager;
@@ -53,13 +56,12 @@ main (int argc, char **argv)
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- orb_manager.init_child_poa (argc,
- argv,
+ orb_manager.init_child_poa (convert.get_argc(), convert.get_ASCII_argv(),
"child_poa"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
CORBA::String_var ior =
@@ -74,7 +76,7 @@ main (int argc, char **argv)
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc b/TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc
index bfb96e8b536..4c15c26f959 100644
--- a/TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc
+++ b/TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Muxed_GIOP_Versions/client.cpp b/TAO/tests/Muxed_GIOP_Versions/client.cpp
index 6a9cb60d163..0440c4eb180 100644
--- a/TAO/tests/Muxed_GIOP_Versions/client.cpp
+++ b/TAO/tests/Muxed_GIOP_Versions/client.cpp
@@ -4,6 +4,7 @@
#include "tao/debug.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Client, client, "client.cpp,v 1.16 2002/01/29 20:21:08 okellogg Exp")
@@ -16,7 +17,7 @@ int server_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "l:k:n:i:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "l:k:n:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -80,15 +81,17 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Muxed_GIOP_Versions/server.cpp b/TAO/tests/Muxed_GIOP_Versions/server.cpp
index e911f5aa83c..26137e62112 100644
--- a/TAO/tests/Muxed_GIOP_Versions/server.cpp
+++ b/TAO/tests/Muxed_GIOP_Versions/server.cpp
@@ -4,6 +4,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
#include "ace/Synch_T.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Server, server, "server.cpp,v 1.7 2002/01/29 20:21:08 okellogg Exp")
@@ -17,7 +18,7 @@ int nclient_threads = nthreads;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "c:l:i:o:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "c:l:i:o:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -120,12 +121,14 @@ private:
/***************************************************/
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -145,7 +148,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i *server_impl = 0;
@@ -168,7 +171,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Muxing/Muxing.mpc b/TAO/tests/Muxing/Muxing.mpc
index 1d115e8dc19..2824b800b03 100644
--- a/TAO/tests/Muxing/Muxing.mpc
+++ b/TAO/tests/Muxing/Muxing.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
Client_Task.cpp
diff --git a/TAO/tests/Muxing/client.cpp b/TAO/tests/Muxing/client.cpp
index 01e0b962d78..9b1be08b07a 100644
--- a/TAO/tests/Muxing/client.cpp
+++ b/TAO/tests/Muxing/client.cpp
@@ -2,6 +2,7 @@
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Muxing, client, "$Id$")
@@ -10,7 +11,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -33,15 +34,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Muxing/server.cpp b/TAO/tests/Muxing/server.cpp
index 06a120b2183..c467615ebdb 100644
--- a/TAO/tests/Muxing/server.cpp
+++ b/TAO/tests/Muxing/server.cpp
@@ -3,6 +3,7 @@
#include "Receiver.h"
#include "Server_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Muxing, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Receiver *receiver_impl;
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Native_Exceptions/Native_Exceptions.mpc b/TAO/tests/Native_Exceptions/Native_Exceptions.mpc
index 1b292027ede..397406b1347 100644
--- a/TAO/tests/Native_Exceptions/Native_Exceptions.mpc
+++ b/TAO/tests/Native_Exceptions/Native_Exceptions.mpc
@@ -2,6 +2,7 @@
// $Id$
project(*Server): taoserver, anytypecode, exceptions {
+ idlflags = -Ge 0 -Sc -Sa -St
Source_Files {
test_i.cpp
server.cpp
@@ -9,7 +10,7 @@ project(*Server): taoserver, anytypecode, exceptions {
}
project(*Client): taoclient, anytypecode, exceptions {
- after += *Server
+ idlflags = -Ge 0 -Sc -Sa -St
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Native_Exceptions/client.cpp b/TAO/tests/Native_Exceptions/client.cpp
index 67811435ae2..7f7d110f6ca 100644
--- a/TAO/tests/Native_Exceptions/client.cpp
+++ b/TAO/tests/Native_Exceptions/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
ACE_RCSID(Native_Exceptions, client, "$Id$")
@@ -11,7 +12,7 @@ int niterations = 100;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -40,14 +41,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "");
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Native_Exceptions/server.cpp b/TAO/tests/Native_Exceptions/server.cpp
index 6e41137344e..5df8a0576f6 100644
--- a/TAO/tests/Native_Exceptions/server.cpp
+++ b/TAO/tests/Native_Exceptions/server.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Native_Exceptions, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "");
CORBA::Object_var poa_object =
orb->resolve_initial_references("RootPOA");
@@ -51,7 +54,7 @@ main (int argc, char *argv[])
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -67,7 +70,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc b/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc
index 35e6a89edfd..c8a1b7d2075 100644
--- a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc
@@ -1,15 +1,14 @@
// -*- MPC -*-
// $Id$
-project(*Nested_Upcall_Server): taoserver, utils {
+project(*Nested Upcall Server): taoserver, utils {
Source_Files {
MT_Object_i.cpp
server.cpp
}
}
-project(*Nested_Upcall_Client): taoexe, utils, portableserver {
- after += *Nested_Upcall_Server
+project(*Nested Upcall Client): taoexe, utils, portableserver {
Source_Files {
MT_Object_i.cpp
local_server.cpp
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp
index ba1c615cd55..59ba502b682 100644
--- a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp
@@ -25,6 +25,7 @@
#include "ace/Read_Buffer.h"
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_fcntl.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Client_Test, client, "$Id$")
@@ -87,7 +88,7 @@ MT_Client::read_ior (char *filename)
int
MT_Client::parse_args (void)
{
- ACE_Get_Opt get_opts (argc_, argv_, "df:g:h:i:n:s:");
+ ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "df:g:h:i:n:s:");
int c;
int result;
@@ -285,15 +286,16 @@ MT_Client::init (int argc, char **argv,
// This function runs the test.
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
TAO_ORB_Manager orb_manager;
- int r = orb_manager.init (argc,
- argv
+ int r = orb_manager.init (convert.get_argc(), convert.get_ASCII_argv()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -308,15 +310,15 @@ main (int argc, char **argv)
int threads = 1;
for (i = 0; i < argc; i++)
- if (ACE_OS::strcmp (argv[i], "-n") == 0)
+ if (ACE_OS::strcmp (argv[i], ACE_TEXT("-n")) == 0)
threads = ACE_OS::atoi(argv[i + 1]);
// create a separate server thread
ACE_Thread_Manager server_thr_mgr;
// starting the server thread
MT_Server_Task *server = new MT_Server_Task (&server_thr_mgr,
- argc,
- argv,
+ convert.get_argc(),
+ convert.get_ASCII_argv(),
&orb_manager);
if (server->activate () != 0)
{
@@ -331,7 +333,7 @@ main (int argc, char **argv)
MT_Client_Task **clients = new MT_Client_Task*[threads];
for (i = 0; i < threads; i++)
- clients[i] = new MT_Client_Task (argc, argv, i);
+ clients[i] = new MT_Client_Task (convert.get_argc(), convert.get_ASCII_argv(), i);
for (i = 0; i < threads; i++)
if (clients[i]->activate () != 0)
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.h b/TAO/tests/NestedUpcall/MT_Client_Test/client.h
index 0422ed8d7aa..482c71c2f2b 100644
--- a/TAO/tests/NestedUpcall/MT_Client_Test/client.h
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/client.h
@@ -21,6 +21,7 @@
#define MT_CLIENT_H
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp
index 36e81ffa7c3..078ced7852a 100644
--- a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp
@@ -87,7 +87,7 @@ MT_Server::read_ior (char *filename)
int
MT_Server::parse_args (void)
{
- ACE_Get_Opt get_opts (argc_, argv_, "d:f:g:h:i:n:s:");
+ ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "d:f:g:h:i:n:s:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h
index 01c4d33b760..bdd85598880 100644
--- a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h
@@ -30,10 +30,9 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
class TAO_ORB_Manager;
-TAO_END_VERSIONED_NAMESPACE_DECL
class MT_Server
{
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp
index c3e0377bee6..3a8020259a5 100644
--- a/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp
@@ -31,7 +31,7 @@ MT_Object_Server::MT_Object_Server (void)
int
MT_Object_Server::parse_args (void)
{
- ACE_Get_Opt get_opts (argc_, argv_, "do:m");
+ ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "do:m");
int c;
while ((c = get_opts ()) != -1)
@@ -41,7 +41,7 @@ MT_Object_Server::parse_args (void)
TAO_debug_level++;
break;
case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
+ this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), ACE_TEXT("w"));
if (this->ior_output_file_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Unable to open %s for writing: %p\n",
@@ -124,8 +124,10 @@ MT_Object_Server::~MT_Object_Server (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
MT_Object_Server MT_Object_Server;
ACE_DEBUG ((LM_DEBUG,
@@ -134,7 +136,7 @@ main (int argc, char *argv[])
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- int r = MT_Object_Server.init (argc,argv ACE_ENV_ARG_PARAMETER);
+ int r = MT_Object_Server.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (r == -1)
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/server.h b/TAO/tests/NestedUpcall/MT_Client_Test/server.h
index 8d57cc0d23e..37d4369c2e4 100644
--- a/TAO/tests/NestedUpcall/MT_Client_Test/server.h
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/server.h
@@ -22,6 +22,7 @@
#define MT_CLIENT_TEST_MT_OBJECT_SERVER_H
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
diff --git a/TAO/tests/NestedUpcall/Simple/Simple.mpc b/TAO/tests/NestedUpcall/Simple/Simple.mpc
index 766f62db832..c809e1301ee 100644
--- a/TAO/tests/NestedUpcall/Simple/Simple.mpc
+++ b/TAO/tests/NestedUpcall/Simple/Simple.mpc
@@ -1,15 +1,14 @@
// -*- MPC -*-
// $Id$
-project(*Nested_Upcall_Server): taoexe, portableserver {
+project(*Nested Upcall Server): taoexe, portableserver {
Source_Files {
server_i.cpp
server.cpp
}
}
-project(*Nested_Upcall_Client): taoexe, portableserver {
- after += *Nested_Upcall_Server
+project(*Nested Upcall Client): taoexe, portableserver {
Source_Files {
client_i.cpp
client.cpp
diff --git a/TAO/tests/NestedUpcall/Simple/client.cpp b/TAO/tests/NestedUpcall/Simple/client.cpp
index 33dc4890f6a..22e8ce0c447 100644
--- a/TAO/tests/NestedUpcall/Simple/client.cpp
+++ b/TAO/tests/NestedUpcall/Simple/client.cpp
@@ -3,6 +3,7 @@
#include "client_i.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Simple, client, "$Id$")
@@ -67,7 +68,7 @@ static int
parse_args (int argc,
char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "qxn:k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "qxn:k:");
int c;
while ((c = get_opts ()) != -1)
@@ -113,19 +114,20 @@ parse_args (int argc,
}
int
-main (int argc,
- char **argv)
+ACE_TMAIN (int argc,
+ ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int result = parse_args (argc,
- argv);
+ int result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/NestedUpcall/Simple/server.cpp b/TAO/tests/NestedUpcall/Simple/server.cpp
index f9f3763ca91..95db8076d74 100644
--- a/TAO/tests/NestedUpcall/Simple/server.cpp
+++ b/TAO/tests/NestedUpcall/Simple/server.cpp
@@ -3,6 +3,7 @@
#include "server_i.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Simple, server, "$Id$")
@@ -50,7 +51,7 @@ Server_Task::svc (void)
static int
write_ior_to_file (const char *ior)
{
- FILE *output_file = ACE_OS::fopen (ior_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output files for writing IOR: %s\n",
@@ -79,7 +80,7 @@ static int
parse_args (int argc,
char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "q:f:t:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "q:f:t:");
int c;
while ((c = get_opts ()) != -1)
@@ -113,19 +114,20 @@ parse_args (int argc,
}
int
-main (int argc,
- char **argv)
+ACE_TMAIN (int argc,
+ ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int result = parse_args (argc,
- argv);
+ int result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/NestedUpcall/Simple/simple-client.cpp b/TAO/tests/NestedUpcall/Simple/simple-client.cpp
index a014035dc5e..49096c9d7a9 100644
--- a/TAO/tests/NestedUpcall/Simple/simple-client.cpp
+++ b/TAO/tests/NestedUpcall/Simple/simple-client.cpp
@@ -3,6 +3,7 @@
#include "client_i.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Simple, client, "$Id$")
@@ -72,7 +73,7 @@ static int
parse_args (int argc,
char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "qxn:k:t:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "qxn:k:t:");
int c;
while ((c = get_opts ()) != -1)
@@ -122,19 +123,20 @@ parse_args (int argc,
}
int
-main (int argc,
+ACE_TMAIN (int argc,
char **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int result = parse_args (argc,
- argv);
+ int result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/TT.mpc b/TAO/tests/NestedUpcall/Triangle_Test/TT.mpc
index e8b0864ecd5..7480edb1f1c 100644
--- a/TAO/tests/NestedUpcall/Triangle_Test/TT.mpc
+++ b/TAO/tests/NestedUpcall/Triangle_Test/TT.mpc
@@ -1,23 +1,21 @@
// -*- MPC -*-
// $Id$
-project(*Nested_Upcall_Server_A): taoexe, utils, portableserver {
+project(*Nested Upcall Server_A): taoexe, utils, portableserver {
Source_Files {
Object_A_i.cpp
server_A.cpp
}
}
-project(*Nested_Upcall_Server_B): taoexe, utils, portableserver {
- after += *Nested_Upcal_Server_A
+project(*Nested Upcall Server_B): taoexe, utils, portableserver {
Source_Files {
Object_B_i.cpp
server_B.cpp
}
}
-project(*Nested_Upcall_Initiator): taoexe, utils, portableserver {
- after += *Nested_Upcall_Server_B
+project(*Nested Upcall Initiator): taoexe, utils, portableserver {
Source_Files {
Initiator_i.cpp
initiator.cpp
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp b/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
index 6e653ca4040..75baea08e6a 100644
--- a/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
+++ b/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
@@ -76,7 +76,7 @@ Initiator_Server::read_ior (char *filename, unsigned int A_B)
int
Initiator_Server::parse_args (void)
{
- ACE_Get_Opt get_opts (argc_, argv_, "df:g:");
+ ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "df:g:");
int c, result;
while ((c = get_opts ()) != -1)
@@ -289,8 +289,10 @@ Initiator_Server::~Initiator_Server (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DEBUG ((LM_DEBUG,
"\n \t NestedUpCalls.Triangle_Test: Initiator Server \n \n"));
@@ -300,7 +302,7 @@ main (int argc, char *argv[])
Initiator_Server initiator_Server;
int retval =
- initiator_Server.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ initiator_Server.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (retval == -1)
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/initiator.h b/TAO/tests/NestedUpcall/Triangle_Test/initiator.h
index 137f31e0dc6..6767a94dc09 100644
--- a/TAO/tests/NestedUpcall/Triangle_Test/initiator.h
+++ b/TAO/tests/NestedUpcall/Triangle_Test/initiator.h
@@ -22,6 +22,7 @@
#define _TRIANGLE_TEST_INITITATOR_SERVER_H
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp b/TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp
index 8ab9fe10dfe..038f5d4cc04 100644
--- a/TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp
+++ b/TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp
@@ -31,7 +31,7 @@ Object_A_Server::Object_A_Server (void)
int
Object_A_Server::parse_args (void)
{
- ACE_Get_Opt get_opts (argc_, argv_, "do:");
+ ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "do:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,7 +41,7 @@ Object_A_Server::parse_args (void)
TAO_debug_level++;
break;
case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
+ this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), ACE_TEXT("w"));
if (this->ior_output_file_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Unable to open %s for writing: %p\n",
@@ -118,8 +118,10 @@ Object_A_Server::~Object_A_Server (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Object_A_Server object_A_Server;
ACE_DEBUG ((LM_DEBUG,
@@ -129,7 +131,7 @@ main (int argc, char *argv[])
ACE_TRY
{
int retval =
- object_A_Server.init (argc,argv ACE_ENV_ARG_PARAMETER);
+ object_A_Server.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (retval == -1)
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/server_A.h b/TAO/tests/NestedUpcall/Triangle_Test/server_A.h
index 842cae01b00..1cbe49354d1 100644
--- a/TAO/tests/NestedUpcall/Triangle_Test/server_A.h
+++ b/TAO/tests/NestedUpcall/Triangle_Test/server_A.h
@@ -22,6 +22,7 @@
#define _TRIANGLE_TEST_OBJECT_A_SERVER_H
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp b/TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp
index 47837342aaa..617c682e34b 100644
--- a/TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp
+++ b/TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp
@@ -31,7 +31,7 @@ Object_B_Server::Object_B_Server (void)
int
Object_B_Server::parse_args (void)
{
- ACE_Get_Opt get_opts (argc_, argv_, "do:");
+ ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "do:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,7 +41,7 @@ Object_B_Server::parse_args (void)
TAO_debug_level++;
break;
case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
+ this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), ACE_TEXT("w"));
if (this->ior_output_file_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Unable to open %s for writing: %p\n",
@@ -118,8 +118,10 @@ Object_B_Server::~Object_B_Server (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Object_B_Server object_B_Server;
ACE_DEBUG ((LM_DEBUG,
@@ -128,7 +130,7 @@ main (int argc, char *argv[])
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- int retval = object_B_Server.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ int retval = object_B_Server.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (retval == -1)
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/server_B.h b/TAO/tests/NestedUpcall/Triangle_Test/server_B.h
index 3661f99bd71..95424f009b8 100644
--- a/TAO/tests/NestedUpcall/Triangle_Test/server_B.h
+++ b/TAO/tests/NestedUpcall/Triangle_Test/server_B.h
@@ -22,6 +22,7 @@
#define _TRIANGLE_TEST_OBJECT_B_SERVER_H
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
diff --git a/TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc b/TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc
index 50ef58ea252..47fc97557a4 100644
--- a/TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc
+++ b/TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc
@@ -9,7 +9,6 @@ project(*Server): strategies, taoexe, portableserver {
}
project(*Client): strategies, taoexe, portableserver {
- after += *Server
Source_Files {
test_i.cpp
client.cpp
diff --git a/TAO/tests/Nested_Event_Loop/client.cpp b/TAO/tests/Nested_Event_Loop/client.cpp
index ac198b31bd6..52984478707 100644
--- a/TAO/tests/Nested_Event_Loop/client.cpp
+++ b/TAO/tests/Nested_Event_Loop/client.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "tao/Strategies/advanced_resource.h"
@@ -24,7 +25,7 @@ static int shutdown_server = 0;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "k:d:i:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:d:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -68,22 +69,24 @@ parse_args (int argc, char **argv)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
+ int parse_args_result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (parse_args_result != 0)
return parse_args_result;
diff --git a/TAO/tests/Nested_Event_Loop/server.cpp b/TAO/tests/Nested_Event_Loop/server.cpp
index 134bd31f46a..581c618b7bd 100644
--- a/TAO/tests/Nested_Event_Loop/server.cpp
+++ b/TAO/tests/Nested_Event_Loop/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "tao/Strategies/advanced_resource.h"
@@ -12,7 +13,7 @@ const char *ior_output_file = "ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,13 +37,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -61,7 +64,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
server_i servant (orb.in ());
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp b/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp
index 2d1c7cbbb59..7f1b10dea24 100644
--- a/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp
+++ b/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp
@@ -10,11 +10,11 @@
ACE_RCSID(Nested_Upcall_Crash, Clock_Ticks, "$Id$")
-long
+int
Clock_Ticks::get_hz (void)
{
#if defined(_SC_CLK_TCK)
- long r = ACE_OS::sysconf(_SC_CLK_TCK);
+ int r = ACE_OS::sysconf(_SC_CLK_TCK);
if(r != -1)
return r;
#endif /* _SC_CLK_TCK */
diff --git a/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h b/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h
index 162dec87a9f..98e700da93b 100644
--- a/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h
+++ b/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h
@@ -14,7 +14,7 @@
namespace Clock_Ticks
{
/// Return the number of clock ticks per second
- long get_hz (void);
+ int get_hz (void);
/// Return the number of microseconds per tick
int get_usecs_per_tick (void);
diff --git a/TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc b/TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc
index 68469dc0fff..ade0f5e574f 100644
--- a/TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc
+++ b/TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc
@@ -15,7 +15,6 @@ project(*Server): taoserver, messaging {
project(*Scavenger): taoserver, messaging {
exename = scavenger
- after += *Server
Source_Files {
scavenger.cpp
}
@@ -23,7 +22,6 @@ project(*Scavenger): taoserver, messaging {
project(*Client): taoserver, messaging {
exename = client
- after += *Scavenger
Source_Files {
Clock_Ticks.cpp
Client_Peer.cpp
diff --git a/TAO/tests/Nested_Upcall_Crash/client.cpp b/TAO/tests/Nested_Upcall_Crash/client.cpp
index 0bafc403012..da732aee0c2 100644
--- a/TAO/tests/Nested_Upcall_Crash/client.cpp
+++ b/TAO/tests/Nested_Upcall_Crash/client.cpp
@@ -7,6 +7,7 @@
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
#include "ace/Reactor.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Nested_Upcall_Crash, client, "$Id$")
@@ -30,12 +31,14 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -88,7 +91,7 @@ main (int argc, char *argv[])
policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Client_Peer *impl;
@@ -155,7 +158,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Nested_Upcall_Crash/scavenger.cpp b/TAO/tests/Nested_Upcall_Crash/scavenger.cpp
index d2b7c7d3981..5091945dbde 100644
--- a/TAO/tests/Nested_Upcall_Crash/scavenger.cpp
+++ b/TAO/tests/Nested_Upcall_Crash/scavenger.cpp
@@ -5,6 +5,7 @@
#include "tao/AnyTypeCode/Any.h"
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Nested_Upcall_Crash, scavenger, "$Id$")
@@ -14,14 +15,16 @@ int
parse_args (int argc, char *argv[]);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int ret_val = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -57,7 +60,7 @@ main (int argc, char *argv[])
policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
@@ -104,7 +107,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Nested_Upcall_Crash/server.cpp b/TAO/tests/Nested_Upcall_Crash/server.cpp
index 0b7eb0628fe..c1a244f1615 100644
--- a/TAO/tests/Nested_Upcall_Crash/server.cpp
+++ b/TAO/tests/Nested_Upcall_Crash/server.cpp
@@ -8,6 +8,7 @@
#include "ace/Get_Opt.h"
#include "ace/Reactor.h"
#include "ace/OS_NS_time.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Nested_Upcall_Crash,
server,
@@ -33,12 +34,14 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -94,7 +97,7 @@ main (int argc, char *argv[])
seed = (ACE_RANDR_TYPE) ACE_OS::gethrtime ();
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
ACE_DEBUG ((LM_DEBUG, "SEED = %u\n", seed));
@@ -115,7 +118,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -161,7 +164,7 @@ main (int argc, char *argv[])
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:s:b:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:s:b:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc b/TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc
index bfb96e8b536..4c15c26f959 100644
--- a/TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc
+++ b/TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/No_Server_MT_Connect_Test/client.cpp b/TAO/tests/No_Server_MT_Connect_Test/client.cpp
index 4034e1245c9..b9eb181f305 100644
--- a/TAO/tests/No_Server_MT_Connect_Test/client.cpp
+++ b/TAO/tests/No_Server_MT_Connect_Test/client.cpp
@@ -4,6 +4,7 @@
#include "tao/debug.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Client, client, "$Id$")
@@ -15,7 +16,7 @@ int server_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:n:i:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:n:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -72,15 +73,17 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/No_Server_MT_Connect_Test/server.cpp b/TAO/tests/No_Server_MT_Connect_Test/server.cpp
index bf5e6312642..ee5ece94ffa 100644
--- a/TAO/tests/No_Server_MT_Connect_Test/server.cpp
+++ b/TAO/tests/No_Server_MT_Connect_Test/server.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(MT_Client, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/OBV/Any/AnyS_impl.cpp b/TAO/tests/OBV/Any/AnyS_impl.cpp
index aae537cf474..fa0778e6315 100644
--- a/TAO/tests/OBV/Any/AnyS_impl.cpp
+++ b/TAO/tests/OBV/Any/AnyS_impl.cpp
@@ -16,16 +16,15 @@ Test_impl::get_something (
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- CORBA::Any_ptr ret_val_ptr = 0;
- ACE_NEW_RETURN (ret_val_ptr, CORBA::Any, 0);
- CORBA::Any_var ret_val = ret_val_ptr;
+ CORBA::Any_var ret_val;
+ ACE_NEW_RETURN (ret_val, CORBA::Any, 0);
const CORBA::ULong magic = 3145;
if (need_vb)
{
OBV_AnyTest::VB_var vb;
- ACE_NEW_RETURN (vb.inout (), OBV_OBV_AnyTest::VB, 0);
+ ACE_NEW_RETURN (vb, OBV_OBV_AnyTest::VB, 0);
vb->id (magic);
@@ -34,7 +33,7 @@ Test_impl::get_something (
else
{
OBV_AnyTest::VA_var va;
- ACE_NEW_RETURN (va.inout (), OBV_OBV_AnyTest::VA, 0);
+ ACE_NEW_RETURN (va, OBV_OBV_AnyTest::VA, 0);
va->id (magic);
diff --git a/TAO/tests/OBV/Any/OBV_Any.mpc b/TAO/tests/OBV/Any/OBV_Any.mpc
index d49a9b37b23..568259acf4e 100644
--- a/TAO/tests/OBV/Any/OBV_Any.mpc
+++ b/TAO/tests/OBV/Any/OBV_Any.mpc
@@ -9,7 +9,6 @@ project(*Server): taoexe, portableserver, valuetype {
}
project(*Client): taoexe, valuetype {
- after += *Server
Source_Files {
AnyC.cpp
client.cpp
diff --git a/TAO/tests/OBV/Any/client.cpp b/TAO/tests/OBV/Any/client.cpp
index 9f03f474b9e..db5be17d3ea 100644
--- a/TAO/tests/OBV/Any/client.cpp
+++ b/TAO/tests/OBV/Any/client.cpp
@@ -2,6 +2,7 @@
#include "AnyC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Any, client, "$Id$")
@@ -10,7 +11,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,18 +35,20 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - test started.\n"));
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Create and register factories.
@@ -94,8 +97,8 @@ main (int argc, char *argv[])
// Do local test
OBV_AnyTest::VA_var va1, va2;
- ACE_NEW_RETURN (va1.inout (), OBV_OBV_AnyTest::VA, 1);
- ACE_NEW_RETURN (va2.inout (), OBV_OBV_AnyTest::VA, 1);
+ ACE_NEW_RETURN (va1, OBV_OBV_AnyTest::VA, 1);
+ ACE_NEW_RETURN (va2, OBV_OBV_AnyTest::VA, 1);
const CORBA::ULong magic = 3145;
diff --git a/TAO/tests/OBV/Any/server.cpp b/TAO/tests/OBV/Any/server.cpp
index aadb21d4cd5..f16fe8a83a0 100644
--- a/TAO/tests/OBV/Any/server.cpp
+++ b/TAO/tests/OBV/Any/server.cpp
@@ -3,6 +3,7 @@
#include "AnyS_impl.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Any, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Test_impl *test_impl;
@@ -79,7 +82,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s.",
diff --git a/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp b/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp
index 3c8697e8415..e85e098ae6e 100644
--- a/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp
+++ b/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp
@@ -79,14 +79,14 @@ Client_Task::svc (void)
// Now build simple graph (tree in our case).
TreeController_var tc;
- ACE_NEW_RETURN (tc.inout (),
+ ACE_NEW_RETURN (tc,
OBV_TreeController,
1);
// Create the root node.
{
StringNode_var sn;
- ACE_NEW_RETURN (sn.inout (),
+ ACE_NEW_RETURN (sn,
OBV_StringNode,
1);
sn->name ((const char*)("RootNode"));
@@ -95,7 +95,7 @@ Client_Task::svc (void)
// Create the left leaf.
{
StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
+ ACE_NEW_RETURN (dummy,
OBV_StringNode,
1);
dummy->name ((const char*)("LeftNode"));
@@ -105,7 +105,7 @@ Client_Task::svc (void)
// Create the right leaf.
{
StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
+ ACE_NEW_RETURN (dummy,
OBV_StringNode,
1);
dummy->name ((const char*)("RightNode"));
@@ -118,14 +118,14 @@ Client_Task::svc (void)
// Make copy
TreeController_var tc_copy;
- ACE_NEW_RETURN (tc_copy.inout (),
+ ACE_NEW_RETURN (tc_copy,
OBV_TreeController,
1);
// Create the root node.
{
StringNode_var sn;
- ACE_NEW_RETURN (sn.inout (),
+ ACE_NEW_RETURN (sn,
OBV_StringNode,
1);
sn->name ((const char*)("RootNode"));
@@ -134,7 +134,7 @@ Client_Task::svc (void)
// Create the left leaf.
{
StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
+ ACE_NEW_RETURN (dummy,
OBV_StringNode,
1);
dummy->name ((const char*)("LeftNode"));
@@ -144,7 +144,7 @@ Client_Task::svc (void)
// Create the right leaf.
{
StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
+ ACE_NEW_RETURN (dummy,
OBV_StringNode,
1);
dummy->name ((const char*)("RightNode"));
@@ -164,7 +164,7 @@ Client_Task::svc (void)
TreeController_var tc_result =
test->reflect (tc.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
-
+
// The following two ifs will fail until bug 1390 is fixed.
if (is_equal_tree (tc.in (), tc_result.in ()))
{
diff --git a/TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp b/TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp
index be09bb0c6db..a95296343b2 100644
--- a/TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp
+++ b/TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp
@@ -14,7 +14,7 @@ ACE_CString client_orb;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:o:n");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:o:n");
int c;
while ((c = get_opts ()) != -1)
@@ -41,19 +41,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- if (parse_args (argc,
- argv) == -1)
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- ACE_Argv_Type_Converter satc (argc, argv);
CORBA::ORB_var sorb =
- CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
server_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -74,10 +74,9 @@ main (int argc, char *argv[])
// Wait for the server thread to do some processing
me.wait ();
- ACE_Argv_Type_Converter catc (argc, argv);
CORBA::ORB_var corb =
- CORBA::ORB_init (catc.get_argc (),
- catc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
client_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/OBV/Collocated/Forward/Server_Task.cpp b/TAO/tests/OBV/Collocated/Forward/Server_Task.cpp
index 79efb6141fb..a7f1f49e0dc 100644
--- a/TAO/tests/OBV/Collocated/Forward/Server_Task.cpp
+++ b/TAO/tests/OBV/Collocated/Forward/Server_Task.cpp
@@ -98,7 +98,7 @@ Server_Task::svc (void)
ACE_TRY_CHECK;
// If the this->output_ exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (this->output_, "w");
+ FILE *output_file= ACE_OS::fopen (this->output_, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/OBV/Collocated/Forward/Server_Task.h b/TAO/tests/OBV/Collocated/Forward/Server_Task.h
index 60006aae0ba..4f2307adc30 100644
--- a/TAO/tests/OBV/Collocated/Forward/Server_Task.h
+++ b/TAO/tests/OBV/Collocated/Forward/Server_Task.h
@@ -15,9 +15,7 @@
#include "tao/ORB.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implement a Task to run the server in a single thread
class Server_Task : public ACE_Task_Base
diff --git a/TAO/tests/OBV/Factory/OBV_Factory.mpc b/TAO/tests/OBV/Factory/OBV_Factory.mpc
index e257b945987..cc812c1eebe 100644
--- a/TAO/tests/OBV/Factory/OBV_Factory.mpc
+++ b/TAO/tests/OBV/Factory/OBV_Factory.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, valuetype {
+project(*Server): taoexe, portableserver, valuetype {
Source_Files {
FactoryC_impl.cpp
FactoryS_impl.cpp
@@ -9,8 +9,7 @@ project(*Server): taoserver, valuetype {
}
}
-project(*Client): taoclient, valuetype {
- after += *Server
+project(*Client): taoexe, valuetype {
Source_Files {
FactoryC.cpp
FactoryC_impl.cpp
diff --git a/TAO/tests/OBV/Factory/client.cpp b/TAO/tests/OBV/Factory/client.cpp
index 2b6a232470a..187913bb64f 100644
--- a/TAO/tests/OBV/Factory/client.cpp
+++ b/TAO/tests/OBV/Factory/client.cpp
@@ -3,6 +3,7 @@
#include "FactoryC.h"
#include "FactoryC_impl.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Factory, client, "$Id$")
@@ -11,7 +12,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,74 +35,22 @@ parse_args (int argc, char *argv[])
return 0;
}
-bool
-no_factory (OBV_FactoryTest::Test_ptr test)
-{
- bool succeed = false;
- ACE_TRY_NEW_ENV
- {
- // Calling this without a factory registred should give a marshal
- // exception with minor code 1
- OBV_FactoryTest::BaseValue_var base_value =
- test->get_base_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::MARSHAL, ex)
- {
- if ((ex.minor() & 0xFFFU) == 1)
- {
- succeed = true;
- }
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!succeed)
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) ERROR, no_factory failed\n"));
- }
-
- return succeed;
-}
-
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Obtain reference to the object
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- OBV_FactoryTest::Test_var test =
- OBV_FactoryTest::Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil OBV_FactoryTest::Test reference <%s>\n",
- ior),
- 1);
- }
-
- // Check if we get the correct exception with minor code because no
- // factory has been set.
- if (!no_factory (test.in ()))
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Create factories.
+
OBV_FactoryTest::BaseValue_init *base_factory = 0;
ACE_NEW_RETURN (base_factory,
OBV_FactoryTest::BaseValue_init,
@@ -113,6 +62,8 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
base_factory->_remove_ref (); // release ownership
+
+
OBV_FactoryTest::Value1_init *value1_factory = 0;
ACE_NEW_RETURN (value1_factory,
OBV_FactoryTest::Value1_init,
@@ -124,6 +75,8 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
value1_factory->_remove_ref ();
+
+
OBV_FactoryTest::Value2_init *value2_factory = 0;
ACE_NEW_RETURN (value2_factory,
Value2_init_impl,
@@ -135,6 +88,24 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
value2_factory->_remove_ref ();
+
+ // Obtain reference to the object
+ CORBA::Object_var tmp =
+ orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ OBV_FactoryTest::Test_var test =
+ OBV_FactoryTest::Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (test.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil OBV_FactoryTest::Test reference <%s>\n",
+ ior),
+ 1);
+ }
+
// Now perform the test. I don't check return values.
// I just hope to get MARSHAL.
OBV_FactoryTest::BaseValue_var base_value =
diff --git a/TAO/tests/OBV/Factory/server.cpp b/TAO/tests/OBV/Factory/server.cpp
index 5f6788e57d4..abca3cf7603 100644
--- a/TAO/tests/OBV/Factory/server.cpp
+++ b/TAO/tests/OBV/Factory/server.cpp
@@ -3,6 +3,7 @@
#include "FactoryS_impl.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Factory, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Test_impl *test_impl;
@@ -79,7 +82,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/OBV/Forward/OBV_Forward.mpc b/TAO/tests/OBV/Forward/OBV_Forward.mpc
index ee6e2623910..a2e1bc181e0 100644
--- a/TAO/tests/OBV/Forward/OBV_Forward.mpc
+++ b/TAO/tests/OBV/Forward/OBV_Forward.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, valuetype {
+project(*Server): taoexe, portableserver, valuetype {
IDL_Files {
TreeBase.idl
TreeController.idl
@@ -13,8 +13,7 @@ project(*Server): taoserver, valuetype {
}
}
-project(*Client): taoclient, valuetype {
- after += *Server
+project(*Client): taoexe, valuetype {
Source_Files {
TreeBaseC.cpp
TreeControllerC.cpp
diff --git a/TAO/tests/OBV/Forward/client.cpp b/TAO/tests/OBV/Forward/client.cpp
index b61d1544147..0ef9d60f494 100644
--- a/TAO/tests/OBV/Forward/client.cpp
+++ b/TAO/tests/OBV/Forward/client.cpp
@@ -6,6 +6,7 @@
#include "TreeNodeC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Forward, client, "$Id$")
@@ -14,7 +15,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -80,15 +81,17 @@ dump_tree (TreeController *tc)
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// All factories are kindly provided by
@@ -151,14 +154,14 @@ main (int argc, char *argv[])
// Now build simple graph (tree in our case).
TreeController_var tc;
- ACE_NEW_RETURN (tc.inout (),
+ ACE_NEW_RETURN (tc,
OBV_TreeController,
1);
// Create the root node.
{
StringNode_var sn;
- ACE_NEW_RETURN (sn.inout (),
+ ACE_NEW_RETURN (sn,
OBV_StringNode,
1);
sn->name ((const char*)("RootNode"));
@@ -167,7 +170,7 @@ main (int argc, char *argv[])
// Create the left leaf.
{
StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
+ ACE_NEW_RETURN (dummy,
OBV_StringNode,
1);
dummy->name ((const char*)("LeftNode"));
@@ -177,7 +180,7 @@ main (int argc, char *argv[])
// Create the right leaf.
{
StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
+ ACE_NEW_RETURN (dummy,
OBV_StringNode,
1);
dummy->name ((const char*)("RightNode"));
diff --git a/TAO/tests/OBV/Forward/server.cpp b/TAO/tests/OBV/Forward/server.cpp
index bf17c26cc87..74ddd5cdfd2 100644
--- a/TAO/tests/OBV/Forward/server.cpp
+++ b/TAO/tests/OBV/Forward/server.cpp
@@ -7,6 +7,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Forward, server, "$Id$")
@@ -15,7 +16,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,12 +40,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// All factories are kindly provided by
@@ -105,7 +108,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Test_impl *test_impl;
@@ -123,7 +126,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/OBV/Supports/Supports_Test.mpc b/TAO/tests/OBV/Supports/Supports_Test.mpc
index 7d9df51c0b7..3de931f13dd 100644
--- a/TAO/tests/OBV/Supports/Supports_Test.mpc
+++ b/TAO/tests/OBV/Supports/Supports_Test.mpc
@@ -1,6 +1,7 @@
// $Id$
project(*Server): taoserver, valuetype, strategies {
+ exename = server
// This is just a dummy_label to prevent the test from being compiled
// in MPC builds
requires += dummy_label
@@ -19,7 +20,6 @@ project(*Server): taoserver, valuetype, strategies {
project(*Client): taoclient, taoserver, valuetype {
exename = client
- after += *Server
// This is just a dummy_label to prevent the test from being compiled
// in MPC builds
requires += dummy_label
diff --git a/TAO/tests/OBV/Supports/Supports_Test_impl.h b/TAO/tests/OBV/Supports/Supports_Test_impl.h
index 9d0932b1d87..8fed369a9ab 100644
--- a/TAO/tests/OBV/Supports/Supports_Test_impl.h
+++ b/TAO/tests/OBV/Supports/Supports_Test_impl.h
@@ -5,6 +5,7 @@
#include "Supports_TestS.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
/**
* \class node_impl
diff --git a/TAO/tests/OBV/Supports/client.cpp b/TAO/tests/OBV/Supports/client.cpp
index 076d397dfa4..b04321e8fb7 100644
--- a/TAO/tests/OBV/Supports/client.cpp
+++ b/TAO/tests/OBV/Supports/client.cpp
@@ -9,7 +9,7 @@ int id = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "t:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "t:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,15 +37,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var poa_object =
diff --git a/TAO/tests/OBV/Supports/server.cpp b/TAO/tests/OBV/Supports/server.cpp
index f92eee137c5..189dbdc8da8 100644
--- a/TAO/tests/OBV/Supports/server.cpp
+++ b/TAO/tests/OBV/Supports/server.cpp
@@ -6,12 +6,14 @@
const char * ior_output_file = "test.ior";
int
-main (int argc, char * argv[])
+ACE_TMAIN (int argc, ACE_TCHAR * argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
@@ -62,7 +64,7 @@ main (int argc, char * argv[])
CORBA::String_var ior = orb->object_to_string (a_test ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- FILE * output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE * output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: %s", ior_output_file), 1);
diff --git a/TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc b/TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc
index f9e3d32dc18..ac045461c97 100644
--- a/TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc
+++ b/TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, valuetype {
+project(*Server): taoexe, portableserver, valuetype {
Source_Files {
testS.cpp
testC.cpp
@@ -10,8 +10,7 @@ project(*Server): taoserver, valuetype {
}
}
-project(*Client): taoclient, valuetype {
- after += *Server
+project(*Client): taoexe, valuetype {
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/OBV/TC_Alignment/client.cpp b/TAO/tests/OBV/TC_Alignment/client.cpp
index 25da5405c51..6dddb8bb67d 100644
--- a/TAO/tests/OBV/TC_Alignment/client.cpp
+++ b/TAO/tests/OBV/TC_Alignment/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (TC_Alignment,
client,
@@ -126,7 +127,7 @@ run_test (test_ptr objref,
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "dk:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "dk:x");
int c;
while ((c = get_opts ()) != -1)
@@ -160,17 +161,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char* argv[])
+ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
return 1;
}
diff --git a/TAO/tests/OBV/TC_Alignment/server.cpp b/TAO/tests/OBV/TC_Alignment/server.cpp
index ba59b23fa58..7f1cc43354d 100644
--- a/TAO/tests/OBV/TC_Alignment/server.cpp
+++ b/TAO/tests/OBV/TC_Alignment/server.cpp
@@ -2,6 +2,7 @@
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (TC_Alignment,
server,
@@ -10,13 +11,15 @@ ACE_RCSID (TC_Alignment,
const char *ior_output_file = "test.ior";
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
{
diff --git a/TAO/tests/OBV/TC_Alignment/test_i.cpp b/TAO/tests/OBV/TC_Alignment/test_i.cpp
index b495f0bd3c1..daa27007ebd 100644
--- a/TAO/tests/OBV/TC_Alignment/test_i.cpp
+++ b/TAO/tests/OBV/TC_Alignment/test_i.cpp
@@ -2,8 +2,8 @@
#include "test_i.h"
-ACE_RCSID (TC_Alignment,
- test_i,
+ACE_RCSID (TC_Alignment,
+ test_i,
"$Id$")
test_i::test_i (CORBA::ORB_ptr orb)
@@ -16,11 +16,10 @@ test_i::get_value (CORBA::Long offset
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- CORBA::Any_ptr retval_ptr = 0;
- ACE_NEW_THROW_EX (retval_ptr,
+ CORBA::Any_var retval;
+ ACE_NEW_THROW_EX (retval,
CORBA::Any,
CORBA::NO_MEMORY ());
- CORBA::Any_var retval = retval_ptr;
switch (offset)
{
@@ -75,5 +74,5 @@ void
test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->orb_->shutdown ();
+ this->orb_->destroy ();
}
diff --git a/TAO/tests/OBV/ValueBox/Test_impl.cpp b/TAO/tests/OBV/ValueBox/Test_impl.cpp
index 2c74111f3f3..de55b910cc5 100644
--- a/TAO/tests/OBV/ValueBox/Test_impl.cpp
+++ b/TAO/tests/OBV/ValueBox/Test_impl.cpp
@@ -268,7 +268,7 @@ Test_impl::array_op1 (::VBlongarray * p1,
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- long array_len = sizeof(LongArray) / sizeof(CORBA::Long);
+ long array_len = sizeof(LongArray) / sizeof(long);
for (long i=0; i<array_len; i++)
{
@@ -294,7 +294,7 @@ Test_impl::array_op2 (const ::LongArray p1,
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- long array_len = sizeof(LongArray) / sizeof(CORBA::Long);
+ long array_len = sizeof(LongArray) / sizeof(long);
long i;
for (i=0; i<array_len; i++)
diff --git a/TAO/tests/OBV/ValueBox/client.cpp b/TAO/tests/OBV/ValueBox/client.cpp
index 27e63f25ec2..d7f198751d3 100644
--- a/TAO/tests/OBV/ValueBox/client.cpp
+++ b/TAO/tests/OBV/ValueBox/client.cpp
@@ -2,6 +2,7 @@
#include "valueboxC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(ValueBox,
client,
@@ -13,7 +14,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -545,7 +546,7 @@ int test_boxed_sequence (void)
VBseqlong (),
1);
- VBseqlong *temp = 0;
+ VBseqlong *temp;
ACE_NEW_RETURN (temp,
VBseqlong (),
1);
@@ -562,7 +563,7 @@ int test_boxed_sequence (void)
longarray[2] = 303;
// Create a sequence
- TDseqlong *temp2 = 0;
+ TDseqlong *temp2;
ACE_NEW_RETURN (temp2,
TDseqlong(10, 3, longarray, 1),
1);
@@ -610,6 +611,7 @@ int test_boxed_sequence (void)
// release
vbseqlong1->_remove_ref ();
+ vbseqlong3->_remove_ref ();
vbseqlong4->_remove_ref ();
return fail;
@@ -729,11 +731,10 @@ int test_boxed_struct (void)
1);
// Test boxed copy ctor.
- VBfixed_struct1* valuebox2_ptr = 0;
- ACE_NEW_RETURN (valuebox2_ptr,
+ VBfixed_struct1_var valuebox2;
+ ACE_NEW_RETURN (valuebox2,
VBfixed_struct1 (*valuebox1),
1);
- VBfixed_struct1_var valuebox2 = valuebox2_ptr;
VERIFY (valuebox1->l () == valuebox2->l ());
VERIFY ((valuebox1->abstruct ()).s1 == (valuebox2->abstruct ()).s1 );
@@ -792,8 +793,9 @@ int test_boxed_struct (void)
}
//
- // valuebox1 and valuebox3 must be explicitly removed.
+ // valuebox1, valuebox2, and valuebox3 must be explicitly removed.
CORBA::remove_ref (valuebox1);
+ CORBA::remove_ref (valuebox2);
CORBA::remove_ref (valuebox3);
//
@@ -1440,19 +1442,20 @@ int test_boxed_union_invocations (Test * test_object)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Test_var test_object;
CORBA::ORB_var orb;
-
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY_EX (init)
{
- orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK_EX (init);
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Obtain reference to the object.
diff --git a/TAO/tests/OBV/ValueBox/server.cpp b/TAO/tests/OBV/ValueBox/server.cpp
index 4eaa84c6db0..a3b3911538f 100644
--- a/TAO/tests/OBV/ValueBox/server.cpp
+++ b/TAO/tests/OBV/ValueBox/server.cpp
@@ -4,6 +4,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(ValueBox,
server,
@@ -14,7 +15,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -38,12 +39,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -63,7 +66,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Test_impl *test_impl;
@@ -81,7 +84,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/OBV/ValueBox/valuebox.mpc b/TAO/tests/OBV/ValueBox/valuebox.mpc
index 64145b1880f..9d07560ab99 100644
--- a/TAO/tests/OBV/ValueBox/valuebox.mpc
+++ b/TAO/tests/OBV/ValueBox/valuebox.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, valuetype {
+project(*Server): taoexe, portableserver, valuetype {
IDL_Files {
vb_basic.idl
vb_struct.idl
@@ -22,8 +22,7 @@ project(*Server): taoserver, valuetype {
}
}
-project(*Client): taoclient, valuetype {
- after += *Server
+project(*Client): taoexe, valuetype {
Source_Files {
vb_basicC.cpp
vb_structC.cpp
diff --git a/TAO/tests/ORB_destroy/ORB_destroy.cpp b/TAO/tests/ORB_destroy/ORB_destroy.cpp
index a1d4a89b03e..fa42a5dc9b5 100644
--- a/TAO/tests/ORB_destroy/ORB_destroy.cpp
+++ b/TAO/tests/ORB_destroy/ORB_destroy.cpp
@@ -20,6 +20,7 @@
#include "tao/PortableServer/PortableServer.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(ORB_destroy, ORB_destroy, "$Id$")
@@ -136,66 +137,68 @@ test_with_funky_poa_manager (int argc,
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int result = 0;
- result = test_with_regular_poa_manager (argc, argv,
+ result = test_with_regular_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_nothing_with_poa_manager",
0, 0);
ACE_ASSERT (result == 0);
- result = test_with_regular_poa_manager (argc, argv,
+ result = test_with_regular_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_poa_with_poa_manager",
0, 1);
ACE_ASSERT (result == 0);
- result = test_with_regular_poa_manager (argc, argv,
+ result = test_with_regular_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_orb_with_poa_manager",
1, 0);
ACE_ASSERT (result == 0);
- result = test_with_regular_poa_manager (argc, argv,
+ result = test_with_regular_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_poa_and_orb_with_poa_manager",
1, 1);
ACE_ASSERT (result == 0);
- result = test_with_funky_poa_manager (argc, argv,
+ result = test_with_funky_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_nothing_without_poa_manager",
0, 0, 0);
ACE_ASSERT (result == 0);
- result = test_with_funky_poa_manager (argc, argv,
+ result = test_with_funky_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_poa_without_poa_manager",
0, 1, 0);
ACE_ASSERT (result == 0);
- result = test_with_funky_poa_manager (argc, argv,
+ result = test_with_funky_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_orb_without_poa_manager",
1, 0, 0);
ACE_ASSERT (result == 0);
- result = test_with_funky_poa_manager (argc, argv,
+ result = test_with_funky_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_poa_and_orb_without_poa_manager",
1, 1, 0);
ACE_ASSERT (result == 0);
- result = test_with_funky_poa_manager (argc, argv,
+ result = test_with_funky_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_nothing_with_funky_poa_manager",
0, 0, 1);
ACE_ASSERT (result == 0);
- result = test_with_funky_poa_manager (argc, argv,
+ result = test_with_funky_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_poa_with_funky_poa_manager",
0, 1, 1);
ACE_ASSERT (result == 0);
- result = test_with_funky_poa_manager (argc, argv,
+ result = test_with_funky_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_orb_with_funky_poa_manager",
1, 0, 1);
ACE_ASSERT (result == 0);
- result = test_with_funky_poa_manager (argc, argv,
+ result = test_with_funky_poa_manager (convert.get_argc(), convert.get_ASCII_argv(),
"destroy_poa_and_orb_with_funky_poa_manager",
1, 1, 1);
ACE_ASSERT (result == 0);
diff --git a/TAO/tests/ORB_init/ORB_init.cpp b/TAO/tests/ORB_init/ORB_init.cpp
index 345f699a8eb..a64fe55a4b2 100644
--- a/TAO/tests/ORB_init/ORB_init.cpp
+++ b/TAO/tests/ORB_init/ORB_init.cpp
@@ -6,6 +6,7 @@
#include "tao/SystemException.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (ORB_init,
ORB_init,
@@ -19,8 +20,10 @@ static const char IOR[] =
"IOR:010000001600000049444c3a43756269745f466163746f72793a312e30000000010000000000000090000000010102cd14000000616e647572696c2e6563652e7563692e6564750057fecdcd2d00000014010f004e5550000000130000000001000000006368696c645f706f61000000000001000000666163746f7279cdcdcd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd01000100000000000901010000000000004f41540400000001cd0000";
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
CORBA::ORB_var orb;
ACE_DECLARE_NEW_CORBA_ENV;
@@ -31,7 +34,7 @@ main (int argc, char *argv[])
CORBA::ORB_ptr my_orb = CORBA::ORB::_nil();
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, orbid ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), orbid ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
my_orb = orb.in ();
@@ -48,7 +51,7 @@ main (int argc, char *argv[])
// used in that scope.
// -------------------------------------------------------------
- orb = CORBA::ORB_init (argc, argv, orbid ACE_ENV_ARG_PARAMETER);
+ orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), orbid ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// This isn't portable, but TAO implements an ORB_ptr as a
@@ -86,7 +89,7 @@ main (int argc, char *argv[])
orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- orb = CORBA::ORB_init (argc, argv, orbid ACE_ENV_ARG_PARAMETER);
+ orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), orbid ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// This isn't portable, but TAO implements an ORB_ptr as a
@@ -131,11 +134,11 @@ main (int argc, char *argv[])
// clean-up.
// -------------------------------------------------------------
CORBA::ORB_var orb2 =
- CORBA::ORB_init (argc, argv, "ORB number 2" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "ORB number 2" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::ORB_var orb3 =
- CORBA::ORB_init (argc, argv, "ORB number 3" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "ORB number 3" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// -------------------------------------------------------------
diff --git a/TAO/tests/ORB_init/Portspan/server.cpp b/TAO/tests/ORB_init/Portspan/server.cpp
index e93543879ed..91c160c3fec 100644
--- a/TAO/tests/ORB_init/Portspan/server.cpp
+++ b/TAO/tests/ORB_init/Portspan/server.cpp
@@ -1,14 +1,17 @@
// $Id$
#include "simpleI.h"
+#include "ace/Argv_Type_Converter.h"
int
-main( int argc, char *argv[] )
+ACE_TMAIN( int argc, ACE_TCHAR *argv[] )
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, ""
+ CORBA::ORB_var orb = CORBA::ORB_init(convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/ORB_shutdown/server.cpp b/TAO/tests/ORB_shutdown/server.cpp
index 1ab5469ae50..3b76f18f439 100644
--- a/TAO/tests/ORB_shutdown/server.cpp
+++ b/TAO/tests/ORB_shutdown/server.cpp
@@ -3,18 +3,21 @@
#include "Foo_Bar.h"
#include "ace/Time_Value.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Hello,
server,
"$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
diff --git a/TAO/tests/ORT/ORT_test_IORInterceptor.h b/TAO/tests/ORT/ORT_test_IORInterceptor.h
index 65ef1bf0f4e..cdea1c0d380 100644
--- a/TAO/tests/ORT/ORT_test_IORInterceptor.h
+++ b/TAO/tests/ORT/ORT_test_IORInterceptor.h
@@ -31,7 +31,7 @@
#endif /* _MSC_VER */
class ORT_test_IORInterceptor
- : public virtual PortableInterceptor::IORInterceptor_3_0,
+ : public virtual PortableInterceptor::IORInterceptor,
public virtual TAO_Local_RefCounted_Object
{
public:
diff --git a/TAO/tests/ORT/ServerRequestInterceptor.cpp b/TAO/tests/ORT/ServerRequestInterceptor.cpp
index 831c09fa69f..4a75bc70ec4 100644
--- a/TAO/tests/ORT/ServerRequestInterceptor.cpp
+++ b/TAO/tests/ORT/ServerRequestInterceptor.cpp
@@ -115,7 +115,7 @@ ServerRequestInterceptor::receive_request (
// Make sure the name of the RootPOA is the first in the AdapterName
// sequence.
- ACE_ASSERT (ACE_OS::strcmp ("RootPOA", name[(CORBA::ULong) 0]) == 0);
+ ACE_ASSERT (ACE_OS::strcmp ("RootPOA", name[(CORBA::ULong) 0].in()) == 0);
CORBA::String_var orb_id = ri->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
diff --git a/TAO/tests/ORT/client.cpp b/TAO/tests/ORT/client.cpp
index a1f0d2219a7..3c883a87b1a 100644
--- a/TAO/tests/ORT/client.cpp
+++ b/TAO/tests/ORT/client.cpp
@@ -3,6 +3,7 @@
#include "ORT_testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (ORT,
client,
@@ -13,7 +14,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,16 +35,18 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "client_sum_orb" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "client_sum_orb" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var obj =
diff --git a/TAO/tests/ORT/server.cpp b/TAO/tests/ORT/server.cpp
index d8656cc7c94..373f1dbbb05 100644
--- a/TAO/tests/ORT/server.cpp
+++ b/TAO/tests/ORT/server.cpp
@@ -5,6 +5,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (ORT,
server,
@@ -16,7 +17,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,8 +40,10 @@ parse_args (int argc, char *argv[])
return 0;
}
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -57,13 +60,13 @@ int main (int argc, char *argv[])
ACE_TRY_CHECK;
// Initialize the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"ORT Test ORB"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
CORBA::Object_var obj =
@@ -144,7 +147,7 @@ int main (int argc, char *argv[])
// Dump it to a file.
if (ior_output_file != 0)
{
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing "
diff --git a/TAO/tests/Object_Loader/Loader.cpp b/TAO/tests/Object_Loader/Loader.cpp
index 73ae41e115f..6b1ae9300b5 100644
--- a/TAO/tests/Object_Loader/Loader.cpp
+++ b/TAO/tests/Object_Loader/Loader.cpp
@@ -12,7 +12,7 @@ Loader::Loader (void)
CORBA::Object_ptr
Loader::create_object (CORBA::ORB_ptr orb,
int,
- char * []
+ ACE_TCHAR * []
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
diff --git a/TAO/tests/Object_Loader/Loader.h b/TAO/tests/Object_Loader/Loader.h
index 73b4c5708f4..f9620f082da 100644
--- a/TAO/tests/Object_Loader/Loader.h
+++ b/TAO/tests/Object_Loader/Loader.h
@@ -32,7 +32,7 @@ public:
virtual CORBA::Object_ptr create_object (CORBA::ORB_ptr orb,
int argc,
- char *argv []
+ ACE_TCHAR *argv []
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
// Create a new instance
diff --git a/TAO/tests/Object_Loader/Object_Loader.mpc b/TAO/tests/Object_Loader/Object_Loader.mpc
index a008ebf89a3..93ce5b41681 100644
--- a/TAO/tests/Object_Loader/Object_Loader.mpc
+++ b/TAO/tests/Object_Loader/Object_Loader.mpc
@@ -12,7 +12,6 @@ project(*Test): taolib_with_idl, portableserver {
}
project(*Driver): taoexe, portableserver {
- after += *Test
Source_Files {
TestC.cpp
driver.cpp
diff --git a/TAO/tests/Object_Loader/driver.cpp b/TAO/tests/Object_Loader/driver.cpp
index e7e9b391e0d..36a4ed78746 100644
--- a/TAO/tests/Object_Loader/driver.cpp
+++ b/TAO/tests/Object_Loader/driver.cpp
@@ -9,7 +9,7 @@
#include "ace/OS_NS_stdio.h"
int
-main (int, char *[])
+ACE_TMAIN (int, ACE_TCHAR *[])
{
int niterations = 10;
int norbs = 10;
diff --git a/TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc b/TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc
index 650b6c70356..fcf4ac7709c 100644
--- a/TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc
+++ b/TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc
@@ -8,7 +8,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Objref_Sequence_Test/client.cpp b/TAO/tests/Objref_Sequence_Test/client.cpp
index 3fb96a60ce4..470d3ae3616 100644
--- a/TAO/tests/Objref_Sequence_Test/client.cpp
+++ b/TAO/tests/Objref_Sequence_Test/client.cpp
@@ -1,13 +1,14 @@
//$Id$
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -32,22 +33,22 @@ parse_args (int argc, char *argv[])
int
-main (int argc, char *argv [])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- ACE_DECLARE_NEW_CORBA_ENV;
-
+ ACE_Argv_Type_Converter convert (argc, argv);
+ ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) == -1)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
// Connect to the server
diff --git a/TAO/tests/Objref_Sequence_Test/server.cpp b/TAO/tests/Objref_Sequence_Test/server.cpp
index 3890ff162fb..f4c918d9e64 100644
--- a/TAO/tests/Objref_Sequence_Test/server.cpp
+++ b/TAO/tests/Objref_Sequence_Test/server.cpp
@@ -2,6 +2,7 @@
#include "TestS.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
/// Implement the Server Interface
class ServerServant :
@@ -123,7 +124,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -147,20 +148,20 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv [])
-
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
- if (parse_args (argc, argv) == -1)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
ACE_TRY
{
// Initialize the broker
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -205,7 +206,7 @@ main (int argc, char *argv [])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/OctetSeq/OctetSeq.cpp b/TAO/tests/OctetSeq/OctetSeq.cpp
index 995499aca20..666cce2c1e6 100644
--- a/TAO/tests/OctetSeq/OctetSeq.cpp
+++ b/TAO/tests/OctetSeq/OctetSeq.cpp
@@ -20,6 +20,7 @@
#include "ace/Get_Opt.h"
#include "ace/High_Res_Timer.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB.h"
#include "tao/CDR.h"
@@ -161,13 +162,15 @@ run (char* buf, size_t bufsize,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -179,7 +182,8 @@ main (int argc, char *argv[])
int quiet = 0;
- ACE_Get_Opt get_opt (argc, argv, "qn:l:h:s:");
+ ACE_Get_Arg_Opt<char> get_opt (convert.get_argc(),
+ convert.get_ASCII_argv(), "qn:l:h:s:");
int opt;
while ((opt = get_opt ()) != EOF)
diff --git a/TAO/tests/OctetSeq/OctetSeq.mpc b/TAO/tests/OctetSeq/OctetSeq.mpc
index 4a526ffae60..f022a840487 100644
--- a/TAO/tests/OctetSeq/OctetSeq.mpc
+++ b/TAO/tests/OctetSeq/OctetSeq.mpc
@@ -2,7 +2,6 @@
// $Id$
project(*Server): taoserver {
- avoids += ace_for_tao
Source_Files {
test_i.cpp
server.cpp
@@ -10,8 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- avoids += ace_for_tao
- after += *Server
Source_Files {
testC.cpp
client.cpp
@@ -20,7 +17,6 @@ project(*Client): taoclient, anytypecode {
project(*OctetSeq): taoclient, anytypecode {
exename = OctetSeq
- after += *Client
Source_Files {
testC.cpp
OctetSeq.cpp
diff --git a/TAO/tests/OctetSeq/client.cpp b/TAO/tests/OctetSeq/client.cpp
index e781734a4b2..f6be23d2614 100644
--- a/TAO/tests/OctetSeq/client.cpp
+++ b/TAO/tests/OctetSeq/client.cpp
@@ -5,6 +5,7 @@
#include "testC.h"
#include "ace/OS_NS_time.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(OctetSeq, client, "$Id$")
@@ -16,7 +17,7 @@ int verbose = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "vk:i:s:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "vk:i:s:");
int c;
while ((c = get_opts ()) != -1)
@@ -55,15 +56,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/OctetSeq/server.cpp b/TAO/tests/OctetSeq/server.cpp
index 59e56b30f2d..e4d125e7c8d 100644
--- a/TAO/tests/OctetSeq/server.cpp
+++ b/TAO/tests/OctetSeq/server.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (OctetSeq,
server,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,12 +37,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -61,7 +64,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
{
@@ -81,7 +84,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc b/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc
index ee95112f143..0ac9fd7eafc 100644
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc
+++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc
@@ -18,7 +18,6 @@ project(*Server): messaging, taoexe, portableserver {
// succeeds.
project(*Client): messaging, taoexe, portableserver {
requires += corba_messaging
- after += *Server
Source_Files {
TestC.cpp
@@ -27,7 +26,6 @@ project(*Client): messaging, taoexe, portableserver {
}
project(*Admin): messaging, taoexe, portableserver {
- after += *Client
Source_Files {
Oneway_Buffering_Admin.cpp
admin.cpp
diff --git a/TAO/tests/Oneway_Buffering/admin.cpp b/TAO/tests/Oneway_Buffering/admin.cpp
index 4ab858a5e46..a78e49916a6 100644
--- a/TAO/tests/Oneway_Buffering/admin.cpp
+++ b/TAO/tests/Oneway_Buffering/admin.cpp
@@ -3,6 +3,7 @@
#include "Oneway_Buffering_Admin.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Oneway_Buffering, admin, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "admin.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Oneway_Buffering_Admin *oneway_buffering_admin_impl;
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Oneway_Buffering/client.cpp b/TAO/tests/Oneway_Buffering/client.cpp
index ca1b240ca78..c4a059307a2 100644
--- a/TAO/tests/Oneway_Buffering/client.cpp
+++ b/TAO/tests/Oneway_Buffering/client.cpp
@@ -7,6 +7,7 @@
#include "tao/AnyTypeCode/TAOA.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_sys_time.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Oneway_Buffering, client, "$Id$")
@@ -37,7 +38,7 @@ const double GIOP_OVERHEAD = 0.9;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:a:i:ctbr");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:a:i:ctbr");
int c;
while ((c = get_opts ()) != -1)
@@ -112,16 +113,18 @@ run_buffer_size (CORBA::ORB_ptr orb,
ACE_ENV_ARG_DECL);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int test_failed = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Oneway_Buffering/server.cpp b/TAO/tests/Oneway_Buffering/server.cpp
index 6997308857d..b154924c82d 100644
--- a/TAO/tests/Oneway_Buffering/server.cpp
+++ b/TAO/tests/Oneway_Buffering/server.cpp
@@ -3,6 +3,7 @@
#include "Oneway_Buffering.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Oneway_Buffering, server, "$Id$")
@@ -12,7 +13,7 @@ const char *ior = "file://admin.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:k:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,12 +42,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -66,7 +69,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
@@ -101,7 +104,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc b/TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc
index bd6dfbc4ff5..7aef588b5f2 100644
--- a/TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc
+++ b/TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver {
}
project(*Client): taoexe, portableserver {
- after += *Server
Source_Files {
Client_Task.cpp
Server_Task.cpp
diff --git a/TAO/tests/Oneways_Invoking_Twoways/client.cpp b/TAO/tests/Oneways_Invoking_Twoways/client.cpp
index 9d2b4cc90e8..5d8f4ccfb3a 100644
--- a/TAO/tests/Oneways_Invoking_Twoways/client.cpp
+++ b/TAO/tests/Oneways_Invoking_Twoways/client.cpp
@@ -4,6 +4,7 @@
#include "Client_Task.h"
#include "Server_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Muxing, client, "$Id$")
@@ -12,7 +13,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Get the sender reference..
diff --git a/TAO/tests/Oneways_Invoking_Twoways/server.cpp b/TAO/tests/Oneways_Invoking_Twoways/server.cpp
index 2c3131b2cda..7a492e3a9cb 100644
--- a/TAO/tests/Oneways_Invoking_Twoways/server.cpp
+++ b/TAO/tests/Oneways_Invoking_Twoways/server.cpp
@@ -3,6 +3,7 @@
#include "Sender_i.h"
#include "Server_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Oneways_Invoking_Twoways, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Sender_i *sender_impl;
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/POA/Current/Current.cpp b/TAO/tests/POA/Current/Current.cpp
index cfb3e541f38..af24e291645 100644
--- a/TAO/tests/POA/Current/Current.cpp
+++ b/TAO/tests/POA/Current/Current.cpp
@@ -21,18 +21,21 @@
#include "tao/PortableServer/PortableServer.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB first.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Deactivate_Object/server.cpp b/TAO/tests/POA/Deactivate_Object/server.cpp
index 13749603e33..bcebec6eda2 100644
--- a/TAO/tests/POA/Deactivate_Object/server.cpp
+++ b/TAO/tests/POA/Deactivate_Object/server.cpp
@@ -2,18 +2,21 @@
#include "Hello.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Hello,
server,
"$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
diff --git a/TAO/tests/POA/Default_Servant/Default_Servant.cpp b/TAO/tests/POA/Default_Servant/Default_Servant.cpp
index d0de0aad007..32b5fc7a95e 100644
--- a/TAO/tests/POA/Default_Servant/Default_Servant.cpp
+++ b/TAO/tests/POA/Default_Servant/Default_Servant.cpp
@@ -19,6 +19,7 @@
#include "testS.h"
#include "ace/SString.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/PortableServer/ServantManagerC.h"
class test_i : public POA_test
@@ -148,15 +149,17 @@ test_reference_to_servant_active_object(PortableServer::POA_ptr root_poa
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Etherealization/Etherealization.cpp b/TAO/tests/POA/Etherealization/Etherealization.cpp
index 1471f38f8b3..5a81ea19892 100644
--- a/TAO/tests/POA/Etherealization/Etherealization.cpp
+++ b/TAO/tests/POA/Etherealization/Etherealization.cpp
@@ -19,6 +19,7 @@
#include "testS.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/PortableServer/ServantActivatorC.h"
class test_i : public POA_test
@@ -117,15 +118,17 @@ Servant_Activator::etherealize (const PortableServer::ObjectId &id,
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp b/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp
index 7880507c3fa..211c3874891 100644
--- a/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp
+++ b/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp
@@ -20,6 +20,7 @@
//=========================================================================
#include "testS.h"
+#include "ace/Argv_Type_Converter.h"
class test_i : public POA_test
{
@@ -170,15 +171,16 @@ test_object_deactivation (PortableServer::POA_ptr poa,
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Identity/Identity.cpp b/TAO/tests/POA/Identity/Identity.cpp
index 1f3265ec6c4..17e6339a4cf 100644
--- a/TAO/tests/POA/Identity/Identity.cpp
+++ b/TAO/tests/POA/Identity/Identity.cpp
@@ -18,6 +18,7 @@
#include "testS.h"
#include "tao/ORB_Core.h"
#include "tao/Server_Strategy_Factory.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Identity, Identity, "$Id$")
@@ -694,13 +695,15 @@ test_poas (CORBA::ORB_ptr orb,
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), 0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp b/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp
index 11d740642cd..59ede0a423d 100644
--- a/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp
+++ b/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp
@@ -20,6 +20,7 @@
#include "testS.h"
#include "ace/Task.h"
#include "ace/Auto_Event.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/PortableServer/ServantLocatorC.h"
#include "tao/CDR.h"
@@ -246,15 +247,17 @@ overwrite_servant_manager (PortableServer::POA_ptr poa)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int retval = 0;
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp b/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp
index 70b54317789..d834e09eb39 100644
--- a/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp
+++ b/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp
@@ -20,6 +20,7 @@
#include "testS.h"
#include "ace/Task.h"
#include "ace/Auto_Event.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/PortableServer/ServantActivatorC.h"
class test_i :
@@ -217,13 +218,15 @@ Servant_Activator::etherealize (const PortableServer::ObjectId &,
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp b/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp
index 11aa293619d..1814d839680 100644
--- a/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp
+++ b/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp
@@ -20,6 +20,7 @@
//=========================================================================
#include "testS.h"
+#include "ace/Argv_Type_Converter.h"
// This is to remove "inherits via dominance" warnings from MSVC.
// MSVC is being a little too paranoid.
@@ -74,13 +75,15 @@ test_i::~test_i (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp b/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp
index 0c5c38a7ddf..01c8588bb8d 100644
--- a/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp
+++ b/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp
@@ -23,13 +23,14 @@
#include "ace/SString.h"
#include "ace/Auto_Event.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
static int debug = 1;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "d:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "d:");
int c;
while ((c = get_opts ()) != -1)
@@ -211,21 +212,23 @@ Deactivator::svc (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int parse_args_result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (parse_args_result != 0)
return parse_args_result;
diff --git a/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp b/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp
index a35208aa000..952869c6d6f 100644
--- a/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp
+++ b/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp
@@ -18,6 +18,7 @@
//=========================================================================
#include "testS.h"
+#include "ace/Argv_Type_Converter.h"
class test_i : public POA_test
{
@@ -42,15 +43,16 @@ test_i::destroy_poa (ACE_ENV_SINGLE_ARG_DECL)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Persistent_ID/Persistent_ID.mpc b/TAO/tests/POA/Persistent_ID/Persistent_ID.mpc
index de531ab3649..735ef5e6ed2 100644
--- a/TAO/tests/POA/Persistent_ID/Persistent_ID.mpc
+++ b/TAO/tests/POA/Persistent_ID/Persistent_ID.mpc
@@ -9,7 +9,6 @@ project(POA_server*): taoserver {
project(POA_client*): taoserver {
exename = client
- after += POA_server*
Source_Files {
client.cpp
}
diff --git a/TAO/tests/POA/Persistent_ID/client.cpp b/TAO/tests/POA/Persistent_ID/client.cpp
index 45519fdd154..1188073b165 100644
--- a/TAO/tests/POA/Persistent_ID/client.cpp
+++ b/TAO/tests/POA/Persistent_ID/client.cpp
@@ -17,6 +17,7 @@
#include "ace/Get_Opt.h"
#include "testC.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Generic_Servant, client, "$Id$")
@@ -26,7 +27,7 @@ static int shutdown_server = 0;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:x");
int c;
while ((c = get_opts ()) != -1)
@@ -59,21 +60,23 @@ parse_args (int argc, char **argv)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int parse_args_result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (parse_args_result != 0)
return parse_args_result;
diff --git a/TAO/tests/POA/Persistent_ID/server.cpp b/TAO/tests/POA/Persistent_ID/server.cpp
index 15f8272c1a9..a39d1917712 100644
--- a/TAO/tests/POA/Persistent_ID/server.cpp
+++ b/TAO/tests/POA/Persistent_ID/server.cpp
@@ -21,6 +21,7 @@
#include "testS.h"
#include "ace/OS_NS_stdio.h"
#include "tao/PortableServer/PortableServer.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Explicit_Activation, server, "$Id$")
@@ -130,15 +131,6 @@ test_i::create_POA (ACE_ENV_SINGLE_ARG_DECL)
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (test::_nil ());
- // Destroy the policies
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-
test_i *servant =
new test_i (this->orb_.in (),
this->child_poa_.in ());
@@ -181,7 +173,7 @@ const char *ior_file = "ior";
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "f:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "f:");
int c;
while ((c = get_opts ()) != -1)
@@ -208,7 +200,7 @@ static int
write_ior_to_file (const char *ior)
{
FILE *output_file =
- ACE_OS::fopen (ior_file, "w");
+ ACE_OS::fopen (ior_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output files for writing IOR: %s\n",
@@ -233,20 +225,22 @@ write_ior_to_file (const char *ior)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int result = parse_args (argc, argv);
+ int result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/POA/Policies/Policies.cpp b/TAO/tests/POA/Policies/Policies.cpp
index 095c1dca356..1fdf375e3ea 100644
--- a/TAO/tests/POA/Policies/Policies.cpp
+++ b/TAO/tests/POA/Policies/Policies.cpp
@@ -24,18 +24,22 @@
#include "tao/PI_Server/PI_Server.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB first.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/Reference_Counting/test.cpp b/TAO/tests/POA/Reference_Counting/test.cpp
index bd7b83a4082..015b2c47415 100644
--- a/TAO/tests/POA/Reference_Counting/test.cpp
+++ b/TAO/tests/POA/Reference_Counting/test.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "HelloS.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Reference_Counting,
test,
@@ -37,12 +38,14 @@ getRefCount (PortableServer::ServantBase * sb ACE_ENV_ARG_DECL)
}
int
-main (int argc, char * argv[])
+ACE_TMAIN (int argc, ACE_TCHAR * argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
diff --git a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp b/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
index f841fcdfdfd..35e01a574f4 100644
--- a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
+++ b/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
@@ -22,6 +22,7 @@
#include "testS.h"
#include "ace/Task.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
class test_i : public virtual POA_test
{
@@ -111,13 +112,15 @@ Worker::svc (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp b/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp
index 8b945a68c1b..d970ca71dad 100644
--- a/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp
+++ b/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp
@@ -17,6 +17,7 @@
//=========================================================================
#include "testS.h"
+#include "ace/Argv_Type_Converter.h"
class test_i : public POA_test
{
@@ -84,23 +85,23 @@ init_orb (int argc,
}
int
-main (int argc,
- char **argv)
+ACE_TMAIN (int argc,
+ ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
PortableServer::POA_var first_poa =
- init_orb (argc,
- argv,
+ init_orb (convert.get_argc(), convert.get_ASCII_argv(),
"first ORB"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
PortableServer::POA_var second_poa =
- init_orb (argc,
- argv,
+ init_orb (convert.get_argc(), convert.get_ASCII_argv(),
"second ORB"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Param_Test/Param_Test.mpc b/TAO/tests/Param_Test/Param_Test.mpc
index 4ad4fa1ba44..6124582c733 100644
--- a/TAO/tests/Param_Test/Param_Test.mpc
+++ b/TAO/tests/Param_Test/Param_Test.mpc
@@ -9,9 +9,8 @@ project(*Server): taoserver, minimum_corba {
}
project(*Client): taoserver, minimum_corba, dynamicinterface {
- avoids += ace_for_tao
- exename = client
- after += *Server
+ exename = client
+ after += Param_Test_Server
Source_Files {
any.cpp
@@ -60,7 +59,7 @@ project(*Client): taoserver, minimum_corba, dynamicinterface {
project(*Anyop): taoserver, minimum_corba {
exename = anyop
- after += *Client
+ after += Param_Test_Client
Source_Files {
param_testC.cpp
diff --git a/TAO/tests/Param_Test/anyop.cpp b/TAO/tests/Param_Test/anyop.cpp
index c15ba6afd10..886a06bd0ff 100644
--- a/TAO/tests/Param_Test/anyop.cpp
+++ b/TAO/tests/Param_Test/anyop.cpp
@@ -25,25 +25,28 @@
#include "tao/Object_T.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Param_Test,
anyop,
"$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int n = 1024;
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- ACE_Get_Opt get_opt (argc, argv, "dn:");
+ ACE_Get_Arg_Opt<char> get_opt (convert.get_argc(), convert.get_ASCII_argv(), "dn:");
int opt;
while ((opt = get_opt ()) != EOF)
diff --git a/TAO/tests/Param_Test/bd_str_seq.cpp b/TAO/tests/Param_Test/bd_str_seq.cpp
index 5d542556fa8..3c85b5c2747 100644
--- a/TAO/tests/Param_Test/bd_str_seq.cpp
+++ b/TAO/tests/Param_Test/bd_str_seq.cpp
@@ -150,9 +150,9 @@ Test_Bounded_String_Sequence::check_validity (void)
// lengths are same. Now compare the contents
for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
{
- if (ACE_OS::strcmp(this->in_[i], this->inout_[i]) ||
- ACE_OS::strcmp(this->in_[i], this->out_[i]) ||
- ACE_OS::strcmp(this->in_[i], this->ret_[i]))
+ if (ACE_OS::strcmp(this->in_[i].in(), this->inout_[i].in()) ||
+ ACE_OS::strcmp(this->in_[i].in(), this->out_[i].in()) ||
+ ACE_OS::strcmp(this->in_[i].in(), this->ret_[i].in()))
// not equal
flag = 0;
}
diff --git a/TAO/tests/Param_Test/complex_any.cpp b/TAO/tests/Param_Test/complex_any.cpp
index 0dd6c1199fe..6f1d268c760 100644
--- a/TAO/tests/Param_Test/complex_any.cpp
+++ b/TAO/tests/Param_Test/complex_any.cpp
@@ -257,8 +257,8 @@ Test_Complex_Any::comp_engine (const CORBA::AnySeq *level2_in_seq,
if (!((*level3_test_seq)[j] >>= level4_test_struct))
return 0;
- if (ACE_OS::strcmp (level4_in_struct->level5_string,
- level4_test_struct->level5_string))
+ if (ACE_OS::strcmp (level4_in_struct->level5_string.in(),
+ level4_test_struct->level5_string.in()))
{
ACE_DEBUG ((LM_DEBUG,
"mismatch of level 5 string values\n"));
@@ -288,8 +288,8 @@ Test_Complex_Any::comp_engine (const CORBA::AnySeq *level2_in_seq,
if (!((*level7_test_any) >>= level8_test_struct))
return 0;
- if (ACE_OS::strcmp (level8_in_struct->level9_string,
- level8_test_struct->level9_string))
+ if (ACE_OS::strcmp (level8_in_struct->level9_string.in(),
+ level8_test_struct->level9_string.in()))
{
ACE_DEBUG ((LM_DEBUG,
"mismatch of level 9 string values\n"));
diff --git a/TAO/tests/Param_Test/driver.cpp b/TAO/tests/Param_Test/driver.cpp
index 45a45f49b38..6a2152ffc86 100644
--- a/TAO/tests/Param_Test/driver.cpp
+++ b/TAO/tests/Param_Test/driver.cpp
@@ -21,6 +21,7 @@
#include "results.h"
#include "tests.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Param_Test,
driver,
@@ -28,13 +29,15 @@ ACE_RCSID (Param_Test,
// This function runs the test (main program)
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
// get an instance of the driver object
Driver drv;
// initialize the driver
- if (drv.init (argc, argv) == -1)
+ if (drv.init (convert.get_argc(), convert.get_ASCII_argv()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) driver.cpp - "
"Driver initialization failed\n"),
diff --git a/TAO/tests/Param_Test/nested_struct.cpp b/TAO/tests/Param_Test/nested_struct.cpp
index b48b8ef65ed..0b208edd2e3 100644
--- a/TAO/tests/Param_Test/nested_struct.cpp
+++ b/TAO/tests/Param_Test/nested_struct.cpp
@@ -168,9 +168,9 @@ Test_Nested_Struct::check_validity (void)
// lengths are same. Now compare the contents
for (CORBA::ULong i=0; i < this->in_.vs.seq.length () && flag; i++)
{
- if (ACE_OS::strcmp (this->in_.vs.seq[i], this->inout_->vs.seq[i]) ||
- ACE_OS::strcmp (this->in_.vs.seq[i], this->out_->vs.seq[i]) ||
- ACE_OS::strcmp (this->in_.vs.seq[i], this->ret_->vs.seq[i]))
+ if (ACE_OS::strcmp (this->in_.vs.seq[i].in(), this->inout_->vs.seq[i].in()) ||
+ ACE_OS::strcmp (this->in_.vs.seq[i].in(), this->out_->vs.seq[i].in()) ||
+ ACE_OS::strcmp (this->in_.vs.seq[i].in(), this->ret_->vs.seq[i].in()))
// not equal
flag = 0;
}
diff --git a/TAO/tests/Param_Test/objref_struct.cpp b/TAO/tests/Param_Test/objref_struct.cpp
index c299f461a8a..7c4e4079c52 100644
--- a/TAO/tests/Param_Test/objref_struct.cpp
+++ b/TAO/tests/Param_Test/objref_struct.cpp
@@ -194,9 +194,9 @@ Test_Objref_Struct::check_validity (void)
Coffee::Desc_var s_ret = this->ret_->y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (ACE_OS::strcmp (s_in->name, s_out->name) != 0
- || ACE_OS::strcmp (s_in->name, s_inout->name) != 0
- || ACE_OS::strcmp (s_in->name, s_ret->name) != 0 )
+ if (ACE_OS::strcmp (s_in->name.in(), s_out->name.in()) != 0
+ || ACE_OS::strcmp (s_in->name.in(), s_inout->name.in()) != 0
+ || ACE_OS::strcmp (s_in->name.in(), s_ret->name.in()) != 0 )
{
return 0;
}
diff --git a/TAO/tests/Param_Test/options.cpp b/TAO/tests/Param_Test/options.cpp
index e295371820b..af30c16083f 100644
--- a/TAO/tests/Param_Test/options.cpp
+++ b/TAO/tests/Param_Test/options.cpp
@@ -22,6 +22,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_fcntl.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Param_Test,
options,
@@ -47,7 +48,7 @@ Options::~Options (void)
int
Options::parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "xdn:f:i:t:k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xdn:f:i:t:k:");
int c;
int result;
diff --git a/TAO/tests/Param_Test/results.h b/TAO/tests/Param_Test/results.h
index 7c7857acd6c..e75bf267210 100644
--- a/TAO/tests/Param_Test/results.h
+++ b/TAO/tests/Param_Test/results.h
@@ -28,12 +28,10 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace CORBA
{
class Environment;
}
-TAO_END_VERSIONED_NAMESPACE_DECL
class Results
{
diff --git a/TAO/tests/Param_Test/run_test.pl b/TAO/tests/Param_Test/run_test.pl
index 9b3b96bc124..e70233ece97 100755
--- a/TAO/tests/Param_Test/run_test.pl
+++ b/TAO/tests/Param_Test/run_test.pl
@@ -76,35 +76,28 @@ foreach $type (@types) {
print STDERR "==== Testing $type === wait....\n";
- $server = $SV->Spawn ();
+ $SV->Spawn ();
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
+ if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+ }
+
+ $CL->Arguments ("$debug -f $iorfile -i $invocation -t $type -n $num -x");
+
+ $client = $CL->SpawnWaitKill (60);
+
+ if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
$status = 1;
}
- else
- {
- if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
- }
-
- $CL->Arguments ("$debug -f $iorfile -i $invocation -t $type -n $num -x");
-
- $client = $CL->SpawnWaitKill (60);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-
- $server = $SV->WaitKill (10);
+
+ $server = $SV->WaitKill (10);
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
+ if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/tests/Param_Test/server.cpp b/TAO/tests/Param_Test/server.cpp
index c66e703967f..4b610be96fd 100644
--- a/TAO/tests/Param_Test/server.cpp
+++ b/TAO/tests/Param_Test/server.cpp
@@ -18,6 +18,7 @@
#include "ace/Get_Opt.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Param_Test,
server,
@@ -30,7 +31,7 @@ static const char *ior_output_filename = "test.ior";
static int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "do:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "do:");
int c;
while ((c = get_opts ()) != -1)
@@ -56,8 +57,10 @@ parse_args (int argc, char *argv[])
// Standard command line parsing utilities used.
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
PortableServer::POA_var oa_ptr;
Param_Test_i *param_test = 0;
@@ -66,7 +69,7 @@ main (int argc, char *argv[])
{
const char *orb_name = "";
CORBA::ORB_var orb_ptr =
- CORBA::ORB_init (argc, argv, orb_name ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), orb_name ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var temp; // holder for the myriad of times we get
@@ -112,7 +115,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Parse remaining command line and verify parameters.
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
// initialize a param_test target object and register it with the object
// adapter
@@ -149,7 +152,7 @@ main (int argc, char *argv[])
str.in ()));
}
- ior_output_file = ACE_OS::fopen (ior_output_filename, "w");
+ ior_output_file = ACE_OS::fopen (ior_output_filename, ACE_TEXT("w"));
if (ior_output_file == 0)
{
diff --git a/TAO/tests/Param_Test/ub_str_seq.cpp b/TAO/tests/Param_Test/ub_str_seq.cpp
index 730701506f0..ba7ed77ef62 100644
--- a/TAO/tests/Param_Test/ub_str_seq.cpp
+++ b/TAO/tests/Param_Test/ub_str_seq.cpp
@@ -152,9 +152,9 @@ Test_String_Sequence::check_validity (void)
// lengths are same. Now compare the contents
for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
{
- if (ACE_OS::strcmp(this->in_[i], this->inout_[i]) ||
- ACE_OS::strcmp(this->in_[i], this->out_[i]) ||
- ACE_OS::strcmp(this->in_[i], this->ret_[i]))
+ if (ACE_OS::strcmp(this->in_[i].in(), this->inout_[i].in()) ||
+ ACE_OS::strcmp(this->in_[i].in(), this->out_[i].in()) ||
+ ACE_OS::strcmp(this->in_[i].in(), this->ret_[i].in()))
// not equal
flag = 0;
}
diff --git a/TAO/tests/Param_Test/var_struct.cpp b/TAO/tests/Param_Test/var_struct.cpp
index 679ed7b3db3..35874446813 100644
--- a/TAO/tests/Param_Test/var_struct.cpp
+++ b/TAO/tests/Param_Test/var_struct.cpp
@@ -166,15 +166,15 @@ Test_Var_Struct::check_validity (void)
if (this->in_.dbl == this->inout_->dbl &&
this->in_.dbl == this->out_->dbl &&
this->in_.dbl == this->ret_->dbl &&
- (!ACE_OS::strcmp (this->in_.dummy1, this->inout_->dummy1)) &&
- (!ACE_OS::strcmp (this->in_.dummy1, this->out_->dummy1)) &&
- (!ACE_OS::strcmp (this->in_.dummy1, this->ret_->dummy1)) &&
+ (!ACE_OS::strcmp (this->in_.dummy1.in(), this->inout_->dummy1.in())) &&
+ (!ACE_OS::strcmp (this->in_.dummy1.in(), this->out_->dummy1.in())) &&
+ (!ACE_OS::strcmp (this->in_.dummy1.in(), this->ret_->dummy1.in())) &&
this->in_.boole == this->inout_->boole &&
this->in_.boole == this->out_->boole &&
this->in_.boole == this->ret_->boole &&
- (!ACE_OS::strcmp (this->in_.dummy2, this->inout_->dummy2)) &&
- (!ACE_OS::strcmp (this->in_.dummy2, this->out_->dummy2)) &&
- (!ACE_OS::strcmp (this->in_.dummy2, this->ret_->dummy2)) &&
+ (!ACE_OS::strcmp (this->in_.dummy2.in(), this->inout_->dummy2.in())) &&
+ (!ACE_OS::strcmp (this->in_.dummy2.in(), this->out_->dummy2.in())) &&
+ (!ACE_OS::strcmp (this->in_.dummy2.in(), this->ret_->dummy2.in())) &&
this->in_.shrt == this->inout_->shrt &&
this->in_.shrt == this->out_->shrt &&
this->in_.shrt == this->ret_->shrt &&
@@ -186,9 +186,9 @@ Test_Var_Struct::check_validity (void)
// lengths are same. Now compare the contents
for (CORBA::ULong i=0; i < this->in_.seq.length () && flag; i++)
{
- if (ACE_OS::strcmp (this->in_.seq[i], this->inout_->seq[i]) ||
- ACE_OS::strcmp (this->in_.seq[i], this->out_->seq[i]) ||
- ACE_OS::strcmp (this->in_.seq[i], this->ret_->seq[i]))
+ if (ACE_OS::strcmp (this->in_.seq[i].in(), this->inout_->seq[i].in()) ||
+ ACE_OS::strcmp (this->in_.seq[i].in(), this->out_->seq[i].in()) ||
+ ACE_OS::strcmp (this->in_.seq[i].in(), this->ret_->seq[i].in()))
// not equal
flag = 0;
}
diff --git a/TAO/tests/Permanent_Forward/Permanent_Forward.mpc b/TAO/tests/Permanent_Forward/Permanent_Forward.mpc
deleted file mode 100755
index ab5cf4db05d..00000000000
--- a/TAO/tests/Permanent_Forward/Permanent_Forward.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*StubTest) : taoexe, iormanip {
- exename = StubTest
-}
diff --git a/TAO/tests/Permanent_Forward/README b/TAO/tests/Permanent_Forward/README
deleted file mode 100755
index 283aa20a87d..00000000000
--- a/TAO/tests/Permanent_Forward/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This program tests the various forward and forward-permanent
-combinations possible in applications. The tests operates directly on
-Objects and TAO_Stub interfaces.
diff --git a/TAO/tests/Permanent_Forward/StubTest.cpp b/TAO/tests/Permanent_Forward/StubTest.cpp
deleted file mode 100755
index 21fbd5409bd..00000000000
--- a/TAO/tests/Permanent_Forward/StubTest.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-// $Id$
-
-//========================================================================
-/**
- * @file StubTest.cpp
- *
- * This program tests the basic functionality of the TAO_Stub in case
- * of permanent_forward
- *
- * @author Frank Rehberger
- */
-//=========================================================================
-
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-#include "tao/ORB.h"
-#include "tao/Environment.h"
-#include "tao/SystemException.h"
-#include "tao/Object.h"
-#include "tao/Stub.h"
-#include "tao/Profile.h"
-#include "tao/IIOP_Profile.h"
-
-#ifndef FRANKS_ASSERT
-#define FRANKS_ASSERT(X) \
- ((X) \
- ? static_cast<void>(0) \
- : ACE_VERSIONED_NAMESPACE_NAME::__ace_assert(__FILE__, __LINE__, ACE_TEXT_CHAR_TO_TCHAR (#X)))
-#endif
-
-ACE_RCSID (Permanent_Forward,
- StubTest,
- "$Id$")
-
-static bool
-is_endpoint (TAO_Profile *profile, const char *host, unsigned short port)
- {
- TAO_IIOP_Profile *iiop = dynamic_cast<TAO_IIOP_Profile*> (profile);
- TAO_Endpoint *endpoint = iiop->endpoint ();
- TAO_IIOP_Endpoint *iiop_endpoint = dynamic_cast<TAO_IIOP_Endpoint*> (endpoint);
- const char * endpoint_host = iiop_endpoint->host();
- unsigned short endpoint_port = iiop_endpoint->port();
-
- bool retval =
- ACE_OS::strcmp (endpoint_host, host)==0
- && endpoint_port == port;
-
- return retval;
- }
-
-static bool
-equal_endpoint (TAO_Profile *profile, TAO_Profile *other)
- {
- TAO_IIOP_Profile *iiop = dynamic_cast<TAO_IIOP_Profile*> (profile);
- TAO_Endpoint *endpoint = iiop->endpoint ();
- TAO_IIOP_Endpoint *iiop_endpoint = dynamic_cast<TAO_IIOP_Endpoint*> (endpoint);
- const char * endpoint_host = iiop_endpoint->host();
- unsigned short endpoint_port = iiop_endpoint->port();
-
- TAO_IIOP_Profile *other_iiop = dynamic_cast<TAO_IIOP_Profile*> (other);
- TAO_Endpoint *other_endpoint = other_iiop->endpoint ();
- TAO_IIOP_Endpoint *other_iiop_endpoint = dynamic_cast<TAO_IIOP_Endpoint*> (other_endpoint);
- const char * other_endpoint_host = other_iiop_endpoint->host();
- unsigned short other_endpoint_port = other_iiop_endpoint->port();
-
- bool retval =
- ACE_OS::strcmp (endpoint_host, other_endpoint_host)==0
- && endpoint_port == other_endpoint_port;
-
- return retval;
- }
-
-static bool
-marshaled_equal_to_other (CORBA::ORB_ptr orb, CORBA::Object_ptr obj, TAO_MProfile *other_mprofile)
-{
- CORBA::String_var str = orb->object_to_string (obj ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj_copy = orb->string_to_object (str.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Stub *stub_copy = obj_copy->_stubobj ();
- TAO_MProfile *copy_mprofile = &(stub_copy->base_profiles ());
-
- if ( copy_mprofile->size() != other_mprofile->size())
- return false;
-
- for (size_t i=0; i<copy_mprofile->size(); ++i)
- {
- TAO_Profile *copy_profile = copy_mprofile->get_profile (i);
- TAO_Profile *other_profile = other_mprofile->get_profile (i);
-
- if ( ! equal_endpoint (copy_profile, other_profile) )
- return false;
- }
-
- return true;
-}
-
-static void
-test_forward_permanent (CORBA::ORB_ptr orb)
-{
- CORBA::Object_var obj1 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:1111,iiop:192.168.1.3:1111/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // the permanent profile
- CORBA::Object_var obj4 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:4444,iiop:192.168.1.3:4444/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Stub *stub1 = obj1->_stubobj ();
- TAO_Stub *stub4 = obj4->_stubobj ();
-
- TAO_Profile *profile = NULL;
-
- profile = stub1->profile_in_use ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 1111));
-
- // ----- forward to obj2 permanently
- stub1->add_forward_profiles (stub4->base_profiles(), true /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 4444));
-
- // ----- stringified object reference must be equal to obj4->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub4->base_profiles())) );
-
- // ----- consume second profile of obj2
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 4444));
-
-
- // ----- reached end, next_profile() must yield NULL
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (profile == NULL);
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-}
-
-static void
-test_forward_permanent_mix (CORBA::ORB_ptr orb)
-{
- CORBA::Object_var obj1 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:1111,iiop:192.168.1.3:1111/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj2 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:2222,iiop:192.168.1.3:2222/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj3 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:3333,iiop:192.168.1.3:3333/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj4 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:4444,iiop:192.168.1.3:4444/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj5 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:5555,iiop:192.168.1.3:5555/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Stub *stub1 = obj1->_stubobj ();
- TAO_Stub *stub2 = obj2->_stubobj ();
- TAO_Stub *stub3 = obj3->_stubobj ();
- TAO_Stub *stub4 = obj4->_stubobj ();
- TAO_Stub *stub5 = obj5->_stubobj ();
-
- TAO_Profile *profile = NULL;
-
- profile = stub1->profile_in_use ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 1111));
-
- // ----- forward to obj2
- stub1->add_forward_profiles (stub2->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 2222));
-
- // ----- forward to obj3
- stub1->add_forward_profiles (stub3->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 3333));
-
- // ----- stringified object reference must be equal to obj1->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub1->base_profiles())) );
-
- // ----- forward to obj4 permanently
- stub1->add_forward_profiles (stub4->base_profiles(), true /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 4444));
-
- // ----- stringified object reference must be equal to obj4->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub4->base_profiles())) );
-
- // ----- consume second profile from obj4
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 4444));
-
- // ----- forward to obj2
- stub1->add_forward_profiles (stub2->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 2222));
-
- // ----- forward to obj3
- stub1->add_forward_profiles (stub3->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 3333));
-
- // ----- stringified object reference must be equal to obj4->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub4->base_profiles())) );
-
- // ----- forward to obj5 permanently
- stub1->add_forward_profiles (stub5->base_profiles(), true /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 5555));
-
- // ----- stringified object reference must be equal to obj5->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub5->base_profiles())) );
-
- // ----- consume second profile from obj5
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 5555));
-
- // ----- stringified object reference must be equal to obj1->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub5->base_profiles())) );
-
- // reached end of profiles, next_profile must return NULL
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (profile == NULL);
-}
-
-static void
-test_forward (CORBA::ORB_ptr orb)
-{
- CORBA::Object_var obj1 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:1111,iiop:192.168.1.3:1111/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj2 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:2222,iiop:192.168.1.3:2222/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj3 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:3333,iiop:192.168.1.3:3333/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Stub *stub1 = obj1->_stubobj ();
- TAO_Stub *stub2 = obj2->_stubobj ();
- TAO_Stub *stub3 = obj3->_stubobj ();
-
- TAO_Profile *profile = NULL;
-
- profile = stub1->profile_in_use ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 1111));
-
- // ----- forward to obj2
- stub1->add_forward_profiles (stub2->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 2222));
-
- // ----- forward to obj3
-
- stub1->add_forward_profiles (stub3->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 3333));
-
- // ----- stringified object reference must be equal to obj1->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub1->base_profiles())) );
-
- // ----- consume second profile of obj3
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 3333));
-
- // ----- consume second profile of obj2
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 2222));
-
- // ----- consume second profile of obj1
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 1111));
-
- FRANKS_ASSERT (stub1->forward_profiles () == NULL);
-
- // ----- reached end, next_profile() must yield NULL
-
- profile = stub1->next_profile ();
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));
- ACE_DEBUG ((LM_DEBUG, "Running the Stub Tests.\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Retrieve the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_forward (orb.in());
- test_forward_permanent (orb.in());
- test_forward_permanent_mix (orb.in());
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex,
- "Unexpected system Exception!!\n");
- return -1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected ACE_CATCHANY Exception!\n");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "Stub Tests Successfully Completed!\n"));
- ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Permanent_Forward/run_test.pl b/TAO/tests/Permanent_Forward/run_test.pl
deleted file mode 100755
index 60c2fb9ac3d..00000000000
--- a/TAO/tests/Permanent_Forward/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("StubTest");
-}
-else {
- $T = new PerlACE::Process ("StubTest");
-}
-
-$test = $T->SpawnWaitKill (20);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/Policies/Manipulation.cpp b/TAO/tests/Policies/Manipulation.cpp
index d3f78ece1b0..28cb1b58941 100644
--- a/TAO/tests/Policies/Manipulation.cpp
+++ b/TAO/tests/Policies/Manipulation.cpp
@@ -10,6 +10,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
#include "ace/OS_NS_time.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Policies, Manipulation, "$Id$")
@@ -19,7 +20,7 @@ int niterations = 100;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "n:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "n:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -81,15 +82,17 @@ private:
};
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp b/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp
index 3dc6be77b96..d1778da8bb6 100644
--- a/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp
+++ b/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp
@@ -27,7 +27,7 @@ Echo_Handler::echo_operation (char const *
}
void
-Echo_Handler::echo_operation_excep (::Messaging::ExceptionHolder *
+Echo_Handler::echo_operation_excep (Test::AMI_EchoExceptionHolder *
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC((CORBA::SystemException))
{
@@ -40,7 +40,7 @@ Echo_Handler::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-Echo_Handler::shutdown_excep (::Messaging::ExceptionHolder *
+Echo_Handler::shutdown_excep (Test::AMI_EchoExceptionHolder *
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC((CORBA::SystemException))
{
diff --git a/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h b/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h
index 76517aa76f2..8ecb15d64f1 100644
--- a/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h
+++ b/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h
@@ -20,12 +20,12 @@ public:
virtual void echo_operation(char const * retval
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC((CORBA::SystemException));
- virtual void echo_operation_excep(::Messaging::ExceptionHolder * h
+ virtual void echo_operation_excep(Test::AMI_EchoExceptionHolder * h
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC((CORBA::SystemException));
virtual void shutdown(ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC((CORBA::SystemException));
- virtual void shutdown_excep(::Messaging::ExceptionHolder * h
+ virtual void shutdown_excep(Test::AMI_EchoExceptionHolder * h
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC((CORBA::SystemException));
diff --git a/TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc b/TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc
index f55237bc40f..e53f00164a1 100644
--- a/TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc
+++ b/TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc
@@ -13,7 +13,6 @@ project(*Client) : taoserver, ami, pi, interceptors {
project(*server) : taoserver, ami, pi_server, interceptors {
exename = server
- after += *Client
source_files {
server.cpp
Server_Interceptor.cpp
diff --git a/TAO/tests/Portable_Interceptors/AMI/client.cpp b/TAO/tests/Portable_Interceptors/AMI/client.cpp
index 571ccf476a0..dce0f615d48 100644
--- a/TAO/tests/Portable_Interceptors/AMI/client.cpp
+++ b/TAO/tests/Portable_Interceptors/AMI/client.cpp
@@ -6,6 +6,7 @@
#include "ace/Get_Opt.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
#include <iostream>
ACE_RCSID (AMI,
@@ -20,7 +21,7 @@ const unsigned long ITERATIONS = 100;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -50,8 +51,10 @@ static void test_ami (CORBA::ORB_ptr orb,
Test::Echo_ptr echo
ACE_ENV_ARG_DECL);
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
{
@@ -63,10 +66,10 @@ main (int argc, char *argv[])
}
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var poa_object =
diff --git a/TAO/tests/Portable_Interceptors/AMI/server.cpp b/TAO/tests/Portable_Interceptors/AMI/server.cpp
index 0c52ac89b18..3b3d86fec08 100644
--- a/TAO/tests/Portable_Interceptors/AMI/server.cpp
+++ b/TAO/tests/Portable_Interceptors/AMI/server.cpp
@@ -5,6 +5,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Portable_Interceptors,
@@ -17,7 +18,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -41,8 +42,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
{
@@ -54,7 +57,7 @@ main (int argc, char *argv[])
}
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -74,7 +77,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Echo *echo_impl;
@@ -92,7 +95,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/AdvSlot.mpc b/TAO/tests/Portable_Interceptors/AdvSlot/AdvSlot.mpc
deleted file mode 100644
index d53cfd5839c..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/AdvSlot.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-project(*idl): taoidldefaults {
- IDL_Files {
- StateTransfer.idl
- }
- custom_only = 1
-}
-
-project(*Server): taoserver, pi_server, exceptions {
- after += *idl
- Source_Files {
- StateTransferS.cpp
- StateTransferC.cpp
- server.cpp
- }
- IDL_Files {
- }
-}
-
-project(*Client): taoclient, exceptions {
- after += *idl
- Source_Files {
- StateTransferC.cpp
- client.cpp
- }
- IDL_Files {
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/StateTransfer.idl b/TAO/tests/Portable_Interceptors/AdvSlot/StateTransfer.idl
deleted file mode 100644
index 663d4c57cbc..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/StateTransfer.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-// file : StateTransfer.idl
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-interface StateTransfer
-{
- short
- number ();
-
- oneway void
- shutdown ();
-};
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/client.cpp b/TAO/tests/Portable_Interceptors/AdvSlot/client.cpp
deleted file mode 100644
index 0a9b7436bf1..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/client.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "StateTransferC.h"
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- if (argc != 2)
- {
- ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0]));
- return -1;
- }
-
- CORBA::Object_var obj = orb->string_to_object (argv[1]);
- StateTransfer_var server = StateTransfer::_narrow (obj.in ());
-
- CORBA::Short n = server->number ();
-
- ACE_DEBUG ((LM_ERROR, "Got number %d\n", n));
-
- server->shutdown ();
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/run_test.pl b/TAO/tests/Portable_Interceptors/AdvSlot/run_test.pl
deleted file mode 100755
index 2cfe882b1b5..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("server.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $SV = new PerlACE::Process ("server", "");
-}
-$CL = new PerlACE::Process ("client", "file://$file");
-
-print STDERR "\n\n==== Running advanced slot test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/server.cpp b/TAO/tests/Portable_Interceptors/AdvSlot/server.cpp
deleted file mode 100644
index 6c5f5825295..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/server.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-// author : Boris Kolpackov <boris@kolpackov.net>
-// cvs-id : $Id$
-
-#include "tao/LocalObject.h"
-#include "tao/ORBInitializer_Registry.h"
-
-#include "tao/PI/PI.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#include "ace/OS_NS_stdio.h"
-
-#include "StateTransferS.h"
-
-using namespace CORBA;
-using namespace PortableServer;
-using namespace PortableInterceptor;
-
-//
-//
-PortableInterceptor::SlotId slot_id;
-
-
-//
-//
-class StateTransferImpl: public virtual POA_StateTransfer
-{
-public:
- StateTransferImpl (ORB_ptr orb)
- : orb_ (ORB::_duplicate (orb))
- {
- }
-
- virtual Short
- number () throw (SystemException)
- {
- // Prepare state update.
- //
- Any state;
- CORBA::Long number = 5;
- state <<= number;
-
- Object_var obj (orb_->resolve_initial_references ("PICurrent"));
- PortableInterceptor::Current_var pic (
- PortableInterceptor::Current::_narrow (obj.in ()));
-
- pic->set_slot (slot_id, state);
-
- return 1;
- }
-
- virtual void
- shutdown () throw (SystemException)
- {
- ACE_DEBUG ((LM_DEBUG, "Server is shutting down.\n"));
- this->orb_->shutdown (0);
- }
-
-private:
- ORB_var orb_;
-};
-
-
-//
-//
-class ReplicaController: public virtual ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual char*
- name () throw (SystemException)
- {
- return string_dup ("ReplicaController");
- }
-
- virtual void
- destroy () throw (SystemException)
- {
- }
-
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- virtual void
- tao_ft_interception_point (ServerRequestInfo_ptr, OctetSeq_out)
- throw (SystemException, ForwardRequest)
- {
- }
-#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
-
- virtual void
- receive_request_service_contexts (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- receive_request (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- send_reply (ServerRequestInfo_ptr ri) throw (SystemException)
- {
- Any_var state (ri->get_slot (slot_id));
- CORBA::Long n (0);
- state >>= n;
-
- if (n == 5)
- ACE_DEBUG ((LM_DEBUG, "State value is correctly %d.\n", n));
- else
- ACE_ERROR ((LM_ERROR, "ERROR: State value is incorrectly %d.\n", n));
- }
-
- virtual void
- send_exception (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- send_other (ServerRequestInfo_ptr) throw (SystemException, ForwardRequest)
- {
- }
-};
-
-
-//
-//
-class ORB_Initializer : public virtual ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual void
- pre_init (ORBInitInfo_ptr) throw (SystemException)
- {
- }
-
- virtual void
- post_init (ORBInitInfo_ptr info) throw (SystemException)
- {
- slot_id = info->allocate_slot_id ();
- ACE_DEBUG ((LM_DEBUG, "Allocated slot with id %d.\n", slot_id));
-
-
- ServerRequestInterceptor_var interceptor (new ReplicaController ());
- info->add_server_request_interceptor (interceptor.in ());
- }
-};
-
-int
-main (int argc, char *argv[])
-{
- ORBInitializer_var orb_initializer (new ORB_Initializer ());
- register_orb_initializer (orb_initializer.in ());
-
- ORB_var orb (ORB_init (argc, argv));
-
- Object_var obj (orb->resolve_initial_references ("RootPOA"));
-
- POA_var root_poa (POA::_narrow (obj.in ()));
- POAManager_var poa_manager (root_poa->the_POAManager ());
-
- StateTransferImpl* impl = new StateTransferImpl (orb.in ());
- ServantBase_var impl_var (impl);
-
- StateTransfer_var ref (impl->_this ());
- String_var ior (orb->object_to_string (ref.in ()));
-
- poa_manager->activate ();
-
-
- // Dump the ior.
- //
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG, "Server is ready, IOR is in 'server.ior'\n"));
-
-
- // Run the ORB event loop.
- //
- orb->run ();
-
- root_poa->destroy (1, 1);
- orb->destroy ();
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/AdvSlotDblCpy.mpc b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/AdvSlotDblCpy.mpc
deleted file mode 100644
index 0242f6d3360..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/AdvSlotDblCpy.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-project(*idl): taoidldefaults {
- IDL_Files {
- InvokeMe.idl
- }
- custom_only = 1
-}
-
-project(*Server): taoserver, pi_server, exceptions {
- after += *idl
- Source_Files {
- InvokeMeS.cpp
- InvokeMeC.cpp
- server.cpp
- }
- IDL_Files {
- }
-}
-
-project(*Client): taoclient, exceptions {
- after += *idl
- Source_Files {
- InvokeMeC.cpp
- client.cpp
- }
- IDL_Files {
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/InvokeMe.idl b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/InvokeMe.idl
deleted file mode 100644
index a6f58fd0b93..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/InvokeMe.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-// file : StateTransfer.idl
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-interface InvokeMe
-{
- void
- invoke_me ();
-
- oneway void
- shutdown ();
-};
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/README b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/README
deleted file mode 100644
index 0ccccc13a8c..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/README
+++ /dev/null
@@ -1,60 +0,0 @@
-The test should complete without exceptions or asserts.
-
-This test checks that simply calling GetSlot works at every
-Server side interception point.
-
-This used to trigger the following assert in the send_reply
-interception point if the slot had not actually been updated
-after the RSC->TSC logical copy that occurs after the
-"receive_request_service_contexts" (such as in the
-"receive_request" or the actual IDL interface implementation
-code) before the logical copy TSC->RSC that then occurs
-before the "send_reply" interception point.
-
-send_reply -> get_slot(TSC) -> long (62) SERVER
-send_reply -> get_slot(RSC)
-ACE_ASSERT: file ...\TAO\tao\PI\PICurrent_Impl.cpp, line 53
-assertion failed for 'this->lc_slot_table_ !=
-&this->slot_table_'.Aborting...
-
-This test also checks that the set_slot(RSC) does not effect
-the TSC that exists before the first logical copy (at the end
-of receive_request_service_contexts) and after the second
-logical copy that occurs after the IDL interface implimentation
-call (i.e. during send_reply).
-
-The run should look like this:
-
-Allocated slot with id 0.
-Server is ready, IOR is in 'server.ior'
-SERVER receive_request_service_contexts -> get_slot(TSC) -> is EMPTY -> OK
-SERVER receive_request_service_contexts -> get_slot(RSC) -> is EMPTY -> OK
-SERVER receive_request_service_contexts -> set_slot(RSC) -> long (62)
-SERVER receive_request_service_contexts -> get_slot(TSC) -> is EMPTY -> OK
-SERVER receive_request_service_contexts -> get_slot(RSC) -> is long (62) -> OK
-SERVER receive_request -> get_slot(TSC) -> is long (62) -> OK
-SERVER receive_request -> get_slot(RSC) -> is long (62) -> OK
-invoke_me
-SERVER send_reply -> get_slot(TSC) -> is long (62) -> OK
-SERVER send_reply -> get_slot(RSC) -> is long (62) -> OK
-SERVER send_reply -> set_slot(RSC) -> long (63)
-SERVER send_reply -> get_slot(TSC) -> is long (62) -> OK
-SERVER send_reply -> get_slot(RSC) -> is long (63) -> OK
-
-SERVER receive_request_service_contexts -> get_slot(TSC) -> is long (62) -> OK
-SERVER receive_request_service_contexts -> get_slot(RSC) -> is EMPTY -> OK
-SERVER receive_request_service_contexts -> set_slot(RSC) -> long (62)
-SERVER receive_request_service_contexts -> get_slot(TSC) -> is long (62) -> OK
-SERVER receive_request_service_contexts -> get_slot(RSC) -> is long (62) -> OK
-SERVER receive_request -> get_slot(TSC) -> is long (62) -> OK
-SERVER receive_request -> get_slot(RSC) -> is long (62) -> OK
-invoke_me
-SERVER send_reply -> get_slot(TSC) -> is long (62) -> OK
-SERVER send_reply -> get_slot(RSC) -> is long (62) -> OK
-SERVER send_reply -> set_slot(RSC) -> long (63)
-SERVER send_reply -> get_slot(TSC) -> is long (62) -> OK
-SERVER send_reply -> get_slot(RSC) -> is long (63) -> OK
-
-
-Server is shutting down.
-Event loop finished.
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp
deleted file mode 100644
index 8a959137c9a..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "InvokeMeC.h"
-
-namespace
-{
- class always
- {
- const InvokeMe_ptr server_;
- public:
- always(const InvokeMe_ptr x):server_(x) {}
- ~always()
- {
- ACE_DEBUG ((LM_DEBUG, "\n"));
- server_->shutdown ();
- }
- };
-}
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- if (argc != 2)
- {
- ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0]));
- return -1;
- }
-
- CORBA::Object_var obj = orb->string_to_object (argv[1]);
- InvokeMe_var server = InvokeMe::_narrow (obj.in ());
-
- always Shutdown( server.in () ); // When goes out of scope!
- server->invoke_me ();
- ACE_DEBUG ((LM_DEBUG, "\n"));
- server->invoke_me ();
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/run_test.pl b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/run_test.pl
deleted file mode 100755
index 6adfc99fd7b..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("server.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $SV = new PerlACE::Process ("server", "");
-}
-$CL = new PerlACE::Process ("client", "file://$file");
-
-print STDERR "\n\n==== Running advanced slot double copy test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp
deleted file mode 100644
index 729804b2872..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp
+++ /dev/null
@@ -1,326 +0,0 @@
-// author : Boris Kolpackov <boris@kolpackov.net>
-// cvs-id : $Id$
-
-#include "tao/AnyTypeCode/AnyTypeCode_methods.h"
-
-#include "tao/PI/PI.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#include "tao/LocalObject.h"
-#include "tao/ORBInitializer_Registry.h"
-
-#include "ace/OS_NS_stdio.h"
-
-#include "InvokeMeS.h"
-
-using namespace CORBA;
-using namespace PortableServer;
-using namespace PortableInterceptor;
-
-namespace
-{
- PortableInterceptor::SlotId slot_id;
-
- CORBA::Long getMySlot(
- PortableInterceptor::ServerRequestInfo_ptr ri,
- PortableInterceptor::Current_ptr pi_current,
- const char *location,
- const CORBA::Long correctTSCvalue,
- const CORBA::Long correctRSCvalue)
- {
- CORBA::Long number= 0;
- CORBA::String_var
- op= ri->operation ();
-
- const bool correctOperation=
- (0 == ACE_OS::strcmp( op.in (), "invoke_me" ));
-
- if (correctOperation)
- {
- CORBA::Any_var data;
-
- ACE_DEBUG ((LM_DEBUG, "SERVER %s -> get_slot(TSC) -> is ", location));
- data= pi_current->get_slot( slot_id );
- CORBA::TypeCode_var
- tc= data->type();
- if (tc->kind() == CORBA::tk_null)
- {
- ACE_DEBUG ((LM_DEBUG, "EMPTY -> "));
- if (0 != correctTSCvalue)
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG\n"));
- throw INTERNAL ();
- }
- ACE_DEBUG ((LM_DEBUG, "OK\n"));
- }
- else if (data.in() >>= number)
- {
- ACE_DEBUG ((LM_DEBUG, "long (%d) -> ", number));
- if ((0 != correctTSCvalue) && (correctTSCvalue != number))
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG\n"));
- throw INTERNAL ();
- }
- ACE_DEBUG ((LM_DEBUG, "OK\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "UNKNOWN TYPE\n"));
- throw INTERNAL ();
- }
-
- ACE_DEBUG ((LM_DEBUG, "SERVER %s -> get_slot(RSC) -> is ", location));
- data= ri->get_slot( slot_id );
-
- tc= data->type();
- if (tc->kind() == CORBA::tk_null)
- {
- ACE_DEBUG ((LM_DEBUG, "EMPTY -> "));
- if (0 != correctRSCvalue)
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG\n"));
- throw INTERNAL ();
- }
- ACE_DEBUG ((LM_DEBUG, "OK\n"));
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- number= 61;
-#else
- number= 62;
-#endif /* TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1 */
- }
- else if (data.in() >>= number)
- {
- ACE_DEBUG ((LM_DEBUG, "long (%d) -> ", number));
- if ((0 != correctRSCvalue) && (correctRSCvalue != number))
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG\n"));
- throw INTERNAL ();
- }
- ACE_DEBUG ((LM_DEBUG, "OK\n"));
- ++number;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG TYPE\n"));
- throw INTERNAL();
- }
- }
-
- return number;
- }
-
- void getAndSetMySlot(
- PortableInterceptor::ServerRequestInfo_ptr ri,
- PortableInterceptor::Current_ptr pi_current,
- const char *location,
- const CORBA::Long correctTSCvalue,
- const CORBA::Long correctRSCvalue)
- {
- const CORBA::Long number=
- getMySlot(
- ri,
- pi_current,
- location,
- correctTSCvalue,
- correctRSCvalue );
-
- if (number && (0 != ACE_OS::strcmp( location, "receive_request" )))
- {
- // Insert data into the RSC (request scope current).
- CORBA::Any data;
- data <<= number;
-
- ACE_DEBUG ((LM_DEBUG, "SERVER %s -> set_slot(RSC)", location));
- ri->set_slot( slot_id, data );
-
- ACE_DEBUG ((LM_DEBUG, " -> long (%d)\n", number));
-
- getMySlot(
- ri,
- pi_current,
- location,
- correctTSCvalue,
- number );
- }
- }
-}
-
-//
-//
-class InvokeMeImpl: public virtual POA_InvokeMe
-{
-public:
- InvokeMeImpl (ORB_ptr orb)
- : orb_ (ORB::_duplicate (orb))
- {
- }
-
- virtual void invoke_me() throw (SystemException)
- {
- ACE_DEBUG ((LM_DEBUG, "invoke_me\n"));
- }
-
- virtual void
- shutdown () throw (SystemException)
- {
- ACE_DEBUG ((LM_DEBUG, "\nServer is shutting down.\n"));
- this->orb_->shutdown (0);
- }
-
-private:
- ORB_var orb_;
-};
-
-
-//
-//
-class ReplicaController: public virtual ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- PortableInterceptor::Current_ptr pi_current_;
-public:
- ReplicaController ( PortableInterceptor::Current_ptr pi_current )
- : pi_current_( pi_current )
- {
- }
-
- virtual char*
- name () throw (SystemException)
- {
- return string_dup ("ReplicaController");
- }
-
- virtual void
- destroy () throw (SystemException)
- {
- }
-
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- virtual void
- tao_ft_interception_point (ServerRequestInfo_ptr ri, OctetSeq_out)
- throw (SystemException, ForwardRequest)
- {
- getAndSetMySlot( ri, this->pi_current_, "tao_ft_interception_point", 0, 0 );
- }
-#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
-
- virtual void
- receive_request_service_contexts (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- getAndSetMySlot( ri, this->pi_current_, "receive_request_service_contexts", 0, 61 );
-#else
- getAndSetMySlot( ri, this->pi_current_, "receive_request_service_contexts", 0, 0 );
-#endif /* TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1 */
- }
-
- virtual void
- receive_request (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
- getAndSetMySlot( ri, this->pi_current_, "receive_request", 62, 62 );
- }
-
- virtual void
- send_reply (ServerRequestInfo_ptr ri) throw (SystemException)
- {
- getAndSetMySlot( ri, this->pi_current_, "send_reply", 62, 62 );
- }
-
- virtual void
- send_exception (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
- getAndSetMySlot( ri, this->pi_current_, "send_exception", 62, 62 );
- }
-
- virtual void
- send_other (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
- getAndSetMySlot( ri, this->pi_current_, "send_other", 62, 62 );
- }
-};
-
-
-//
-//
-class ORB_Initializer : public virtual ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual void
- pre_init (ORBInitInfo_ptr) throw (SystemException)
- {
- }
-
- virtual void
- post_init (ORBInitInfo_ptr info) throw (SystemException)
- {
- CORBA::Object_var obj =
- info->resolve_initial_references ("PICurrent");
-
- PortableInterceptor::Current_var pi_current =
- PortableInterceptor::Current::_narrow (obj.in ());
-
- slot_id = info->allocate_slot_id ();
- ACE_DEBUG ((LM_DEBUG, "Allocated slot with id %d.\n", slot_id));
-
- ServerRequestInterceptor_var
- interceptor (new ReplicaController (pi_current.in ()));
- info->add_server_request_interceptor (interceptor.in ());
- }
-};
-
-int
-main (int argc, char *argv[])
-{
- ORBInitializer_var orb_initializer (new ORB_Initializer ());
- register_orb_initializer (orb_initializer.in ());
-
- ORB_var orb (ORB_init (argc, argv));
-
- Object_var obj (orb->resolve_initial_references ("RootPOA"));
-
- POA_var root_poa (POA::_narrow (obj.in ()));
- POAManager_var poa_manager (root_poa->the_POAManager ());
-
- InvokeMeImpl* impl = new InvokeMeImpl (orb.in ());
- ServantBase_var impl_var (impl);
-
- InvokeMe_var ref (impl->_this ());
- String_var ior (orb->object_to_string (ref.in ()));
-
- poa_manager->activate ();
-
-
- // Dump the ior.
- //
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG, "Server is ready, IOR is in 'server.ior'\n"));
-
-
- // Run the ORB event loop.
- //
- orb->run ();
-
- root_poa->destroy (1, 1);
- orb->destroy ();
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/AdvSlotExt.mpc b/TAO/tests/Portable_Interceptors/AdvSlotExt/AdvSlotExt.mpc
deleted file mode 100644
index d53cfd5839c..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/AdvSlotExt.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-project(*idl): taoidldefaults {
- IDL_Files {
- StateTransfer.idl
- }
- custom_only = 1
-}
-
-project(*Server): taoserver, pi_server, exceptions {
- after += *idl
- Source_Files {
- StateTransferS.cpp
- StateTransferC.cpp
- server.cpp
- }
- IDL_Files {
- }
-}
-
-project(*Client): taoclient, exceptions {
- after += *idl
- Source_Files {
- StateTransferC.cpp
- client.cpp
- }
- IDL_Files {
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/StateTransfer.idl b/TAO/tests/Portable_Interceptors/AdvSlotExt/StateTransfer.idl
deleted file mode 100644
index 663d4c57cbc..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/StateTransfer.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-// file : StateTransfer.idl
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-interface StateTransfer
-{
- short
- number ();
-
- oneway void
- shutdown ();
-};
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/client.cpp b/TAO/tests/Portable_Interceptors/AdvSlotExt/client.cpp
deleted file mode 100644
index 0a9b7436bf1..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/client.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "StateTransferC.h"
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- if (argc != 2)
- {
- ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0]));
- return -1;
- }
-
- CORBA::Object_var obj = orb->string_to_object (argv[1]);
- StateTransfer_var server = StateTransfer::_narrow (obj.in ());
-
- CORBA::Short n = server->number ();
-
- ACE_DEBUG ((LM_ERROR, "Got number %d\n", n));
-
- server->shutdown ();
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/run_test.pl b/TAO/tests/Portable_Interceptors/AdvSlotExt/run_test.pl
deleted file mode 100755
index 2cfe882b1b5..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("server.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $SV = new PerlACE::Process ("server", "");
-}
-$CL = new PerlACE::Process ("client", "file://$file");
-
-print STDERR "\n\n==== Running advanced slot test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/server.cpp b/TAO/tests/Portable_Interceptors/AdvSlotExt/server.cpp
deleted file mode 100644
index 1a1256f6ad7..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/server.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-// author : Boris Kolpackov <boris@kolpackov.net>
-// cvs-id : $Id$
-
-#include "tao/LocalObject.h"
-#include "tao/ORBInitializer_Registry.h"
-
-#include "tao/PI/PI.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#include "ace/OS_NS_stdio.h"
-
-#include "StateTransferS.h"
-
-using namespace CORBA;
-using namespace PortableServer;
-using namespace PortableInterceptor;
-
-//
-//
-PortableInterceptor::SlotId slot_id;
-
-
-//
-//
-class StateTransferImpl: public virtual POA_StateTransfer
-{
-public:
- StateTransferImpl (ORB_ptr orb)
- : orb_ (ORB::_duplicate (orb))
- {
- }
-
- virtual Short
- number () throw (SystemException)
- {
- // Prepare state update.
- //
- Any state;
- CORBA::Long number = 5;
- state <<= number;
-
- Object_var obj (orb_->resolve_initial_references ("PICurrent"));
- PortableInterceptor::Current_var pic (
- PortableInterceptor::Current::_narrow (obj.in ()));
-
- pic->set_slot (slot_id, state);
-
- return 1;
- }
-
- virtual void
- shutdown () throw (SystemException)
- {
- ACE_DEBUG ((LM_DEBUG, "Server is shutting down.\n"));
- this->orb_->shutdown (0);
- }
-
-private:
- ORB_var orb_;
-};
-
-
-//
-//
-class ReplicaController: public virtual ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- ReplicaController (PortableInterceptor::Current_ptr pi_current)
- : pi_current_ (PortableInterceptor::Current::_duplicate (pi_current))
- {
- }
-
- virtual char*
- name () throw (SystemException)
- {
- return string_dup ("ReplicaController");
- }
-
- virtual void
- destroy () throw (SystemException)
- {
- }
-
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- virtual void
- tao_ft_interception_point (ServerRequestInfo_ptr, OctetSeq_out)
- throw (SystemException, ForwardRequest)
- {
- }
-#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
-
- virtual void
- receive_request_service_contexts (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- receive_request (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
- Any state;
- CORBA::Long number = 5;
- state <<= number;
-
- // After we have set things to TSC, change the value in RSC, at this
- // moment no copy should be done anymore.
- pi_current_->set_slot (slot_id, state);
- CORBA::Long number6 = 6;
- state <<= number6;
- ri->set_slot (slot_id, state);
-
- Any_var state_get (pi_current_->get_slot (slot_id));
- CORBA::Long n (0);
- state_get >>= n;
-
- if (n == 5)
- ACE_DEBUG ((LM_DEBUG, "State value is correctly %d.\n", n));
- else
- ACE_ERROR ((LM_ERROR, "ERROR: State value is incorrectly %d.\n", n));
- }
-
- virtual void
- send_reply (ServerRequestInfo_ptr ri) throw (SystemException)
- {
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- if (ACE_OS::strcmp (op.in (), "number") != 0)
- return; // Don't mess with PICurrent if not invoking test method.
-
- Any_var state (ri->get_slot (slot_id));
- CORBA::Long n (0);
- state >>= n;
-
- if (n == 5)
- ACE_DEBUG ((LM_DEBUG, "State value is correctly %d.\n", n));
- else
- ACE_ERROR ((LM_ERROR, "ERROR: State value is incorrectly %d.\n", n));
- }
-
- virtual void
- send_exception (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- send_other (ServerRequestInfo_ptr) throw (SystemException, ForwardRequest)
- {
- }
- PortableInterceptor::Current_var pi_current_;
-};
-
-
-//
-//
-class ORB_Initializer : public virtual ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual void
- pre_init (ORBInitInfo_ptr) throw (SystemException)
- {
- }
-
- virtual void
- post_init (ORBInitInfo_ptr info) throw (SystemException)
- {
- slot_id = info->allocate_slot_id ();
- ACE_DEBUG ((LM_DEBUG, "Allocated slot with id %d.\n", slot_id));
-
- CORBA::Object_var obj =
- info->resolve_initial_references ("PICurrent");
-
- PortableInterceptor::Current_var pi_current =
- PortableInterceptor::Current::_narrow (obj.in ());
-
- if (CORBA::is_nil (pi_current.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Could not resolve PICurrent object.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- ServerRequestInterceptor_var interceptor (new ReplicaController (pi_current.in ()));
- info->add_server_request_interceptor (interceptor.in ());
- }
-};
-
-int
-main (int argc, char *argv[])
-{
- ORBInitializer_var orb_initializer (new ORB_Initializer ());
- register_orb_initializer (orb_initializer.in ());
-
- ORB_var orb (ORB_init (argc, argv));
-
- Object_var obj (orb->resolve_initial_references ("RootPOA"));
-
- POA_var root_poa (POA::_narrow (obj.in ()));
- POAManager_var poa_manager (root_poa->the_POAManager ());
-
- StateTransferImpl* impl = new StateTransferImpl (orb.in ());
- ServantBase_var impl_var (impl);
-
- StateTransfer_var ref (impl->_this ());
- String_var ior (orb->object_to_string (ref.in ()));
-
- poa_manager->activate ();
-
-
- // Dump the ior.
- //
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG, "Server is ready, IOR is in 'server.ior'\n"));
-
-
- // Run the ORB event loop.
- //
- orb->run ();
-
- root_poa->destroy (1, 1);
- orb->destroy ();
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp b/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp
index 4d79250c2cb..1f6c8ba7482 100644
--- a/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp
+++ b/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp
@@ -16,13 +16,13 @@ void get_interceptor_type (int argc, char *argv[],
{
if (ACE_OS_String::strcmp (argv[i], "-r") == 0)
{
- if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("none")) == 0)
+ if (ACE_OS_String::strcmp (argv[i+1], "none") == 0)
interceptor_type = IT_NONE;
- if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("noop")) == 0)
+ if (ACE_OS_String::strcmp (argv[i+1], "noop") == 0)
interceptor_type = IT_NOOP;
- if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("context")) == 0)
+ if (ACE_OS_String::strcmp (argv[i+1], "context") == 0)
interceptor_type = IT_CONTEXT;
- if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("dynamic")) == 0)
+ if (ACE_OS_String::strcmp (argv[i+1], "dynamic") == 0)
interceptor_type = IT_DYNAMIC;
}
}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc b/TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc
index 59737568104..44a76c957f7 100644
--- a/TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc
+++ b/TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc
@@ -13,7 +13,6 @@ project(*Server): taoserver, pi_server, interceptors {
}
project(*Client): taoclient, pi, interceptors {
- after += *Server
Source_Files {
testC.cpp
client_interceptors.cpp
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/client.cpp b/TAO/tests/Portable_Interceptors/Benchmark/client.cpp
index a874f7d3121..fe89e466e8b 100644
--- a/TAO/tests/Portable_Interceptors/Benchmark/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Benchmark/client.cpp
@@ -10,6 +10,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_errno.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Benchmark,
client,
@@ -22,7 +23,7 @@ int register_interceptor = 1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "ef:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "ef:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -158,8 +159,10 @@ run_test (Test_Interceptors::Secure_Vault_ptr server
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int priority =
(ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
+ ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
@@ -181,7 +184,7 @@ main (int argc, char *argv[])
}
int interceptor_type;
- get_interceptor_type (argc, argv, interceptor_type);
+ get_interceptor_type (convert.get_argc(), convert.get_ASCII_argv(), interceptor_type);
ACE_TRY_NEW_ENV
{
@@ -198,10 +201,10 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/marker.cpp b/TAO/tests/Portable_Interceptors/Benchmark/marker.cpp
index dda5ff3c73b..1f4be34e3e7 100644
--- a/TAO/tests/Portable_Interceptors/Benchmark/marker.cpp
+++ b/TAO/tests/Portable_Interceptors/Benchmark/marker.cpp
@@ -30,13 +30,13 @@ Marker::dump_stats (const char* msg,
switch (which_method)
{
case 1: // method ready
- this->throughput_method_ready_.dump_results (msg, gsf);
+ this->throughput_method_ready_.dump_results (ACE_TEXT_TO_TCHAR_IN(msg), gsf);
break;
case 2: // method authentciate
- this->throughput_method_authenticate_.dump_results (msg, gsf);
+ this->throughput_method_authenticate_.dump_results (ACE_TEXT_TO_TCHAR_IN(msg), gsf);
break;
case 3: // method update_records
- this->throughput_method_update_records_.dump_results (msg, gsf);
+ this->throughput_method_update_records_.dump_results (ACE_TEXT_TO_TCHAR_IN(msg), gsf);
break;
default:
break;
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/server.cpp b/TAO/tests/Portable_Interceptors/Benchmark/server.cpp
index c556aed2940..03cb740a662 100644
--- a/TAO/tests/Portable_Interceptors/Benchmark/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Benchmark/server.cpp
@@ -8,6 +8,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Benchmark, server, "$Id$")
@@ -17,7 +18,7 @@ int register_interceptor = 1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -40,10 +41,12 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int interceptor_type;
- get_interceptor_type (argc, argv, interceptor_type);
+ get_interceptor_type (convert.get_argc(), convert.get_ASCII_argv(), interceptor_type);
ACE_TRY_NEW_ENV
{
@@ -60,10 +63,10 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var poa_object =
@@ -113,7 +116,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc b/TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc
index 2e992878fcb..1a864c9e26f 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc
@@ -11,7 +11,6 @@ project(*Server): taoserver, pi_server, interceptors {
}
project(*Client): taoclient, pi, interceptors {
- after += *Server
Source_Files {
testC.cpp
Client_ORBInitializer.cpp
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp
index 09231faacf2..0f94ba59f5c 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "Client_ORBInitializer.h"
#include "tao/ORBInitializer_Registry.h"
@@ -12,7 +13,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "ef:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "ef:");
int c;
while ((c = get_opts ()) != -1)
@@ -76,8 +77,10 @@ run_test (Test_Interceptors::Visual_ptr server
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
PortableInterceptor::ORBInitializer_ptr temp_initializer;
@@ -93,10 +96,10 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp
index 35f0c3ada75..81e0b7e9aee 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "Server_ORBInitializer.h"
#include "tao/ORBInitializer_Registry.h"
@@ -15,7 +16,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -38,8 +39,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
Server_ORBInitializer * temp_initializer = 0;
@@ -56,7 +59,7 @@ main (int argc, char *argv[])
// Now we can create the ORB
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -79,7 +82,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Visual_i server_impl (orb.in ());
@@ -136,7 +139,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Portable_Interceptors/Bug_2088/client.cpp b/TAO/tests/Portable_Interceptors/Bug_2088/client.cpp
index 2b3ff3f6fbb..934d4d279d9 100644
--- a/TAO/tests/Portable_Interceptors/Bug_2088/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_2088/client.cpp
@@ -1,14 +1,17 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "Client_ORBInitializer.h"
#include "tao/ORBInitializer_Registry.h"
ACE_RCSID(Interceptors, client, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Client_ORBInitializer* initializer1 = 0;
Client_ORBInitializer* initializer2 = 0;
bool caught_exception = false;
@@ -38,7 +41,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
index 1aaceae2c8c..894d6616e48 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
@@ -9,6 +9,7 @@
#include "ace/Argv_Type_Converter.h"
#include "ace/SString.h"
#include "ace/Manual_Event.h"
+#include "ace/Argv_Type_Converter.h"
const char *output = "test.ior";
const char *input = "file://test.ior";
@@ -17,7 +18,7 @@ ACE_CString client_orb;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:o");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:o");
int c;
while ((c = get_opts ()) != -1)
@@ -39,10 +40,11 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- if (parse_args (argc,
- argv) == -1)
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
server_orb.set ("server_orb");
@@ -64,10 +66,9 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- ACE_Argv_Type_Converter satc (argc, argv);
CORBA::ORB_var sorb =
- CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
server_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -88,10 +89,9 @@ main (int argc, char *argv[])
// Wait for the server thread to do some processing
me.wait ();
- ACE_Argv_Type_Converter catc (argc, argv);
CORBA::ORB_var corb =
- CORBA::ORB_init (catc.get_argc (),
- catc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
client_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -109,9 +109,6 @@ main (int argc, char *argv[])
ACE_Thread_Manager::instance ()->wait ();
- sorb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
CORBA::ULong number_called =
Echo_Server_Request_Interceptor::server_interceptor_check_;
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp
index a9db6a71b8a..939313f9865 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp
@@ -76,7 +76,7 @@ Server_Task::svc (void)
// If the ior_output_file exists, output the ior to it
if (output_ != 0)
{
- FILE *output_file= ACE_OS::fopen (this->output_, "w");
+ FILE *output_file= ACE_OS::fopen (this->output_, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -96,6 +96,9 @@ Server_Task::svc (void)
root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
+
+ this->sorb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
}
ACE_CATCHANY
{
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h
index 2101f9a9a15..7bac19ca641 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h
@@ -15,9 +15,7 @@
#include "ace/Task.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implement a Task to run the server in a single thread
class Server_Task : public ACE_Task_Base
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp
index 949bea21eb6..3f4b1a38bb3 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp
@@ -1,7 +1,6 @@
// $Id$
#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
ACE_RCSID(Dynamic, test_i, "$Id$")
@@ -52,9 +51,5 @@ Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
- // Give the client thread time to return from the collocated
- // call to this method before shutting down the ORB. We sleep
- // to avoid BAD_INV_ORDER exceptions on fast dual processor machines.
- ACE_OS::sleep (1);
this->orb_->shutdown ();
}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp
index 27644baab31..5f337e514d2 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp
@@ -7,6 +7,7 @@
#include "ace/Argv_Type_Converter.h"
#include "ace/SString.h"
#include "ace/Manual_Event.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "interceptors.h"
#include "Collocated_ORBInitializer.h"
@@ -19,7 +20,7 @@ ACE_CString client_orb;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:o");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:o");
int c;
while ((c = get_opts ()) != -1)
@@ -41,10 +42,11 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- if (parse_args (argc,
- argv) == -1)
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
server_orb.set ("server_orb");
@@ -65,11 +67,9 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- ACE_Argv_Type_Converter satc (argc, argv);
-
CORBA::ORB_var sorb =
- CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
server_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -91,10 +91,9 @@ main (int argc, char *argv[])
// Wait for the server thread to do some processing
me.wait ();
- ACE_Argv_Type_Converter catc (argc, argv);
CORBA::ORB_var corb =
- CORBA::ORB_init (catc.get_argc (),
- catc.get_TCHAR_argv (),
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
client_orb.c_str ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp
index 1133217c973..69e1e5cb96b 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp
@@ -69,7 +69,7 @@ Server_Task::svc (void)
// If the ior_output_file exists, output the ior to it
if (output_ != 0)
{
- FILE *output_file= ACE_OS::fopen (output_, "w");
+ FILE *output_file= ACE_OS::fopen (output_, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h
index e048b0f737d..2d0c8fbdb2b 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h
+++ b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h
@@ -13,9 +13,7 @@
#include "tao/ORB.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implement a Task to run the server in a single thread
class Server_Task : public ACE_Task_Base
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp
index c51e4c75a58..ade05ba7202 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp
@@ -51,6 +51,6 @@ Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ this->orb_->shutdown (1 ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc b/TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc
index a55faf91bbf..88fa97fd7ba 100644
--- a/TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc
+++ b/TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc
@@ -11,7 +11,6 @@ project(*Server): taoserver, pi_server, interceptors {
}
project(*Client): taoclient, pi, interceptors {
- after += *Server
Source_Files {
testC.cpp
client_interceptor.cpp
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/client.cpp b/TAO/tests/Portable_Interceptors/Dynamic/client.cpp
index c3d906faeb3..d506f6b6adc 100644
--- a/TAO/tests/Portable_Interceptors/Dynamic/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Dynamic/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "Echo_Client_ORBInitializer.h"
@@ -16,7 +17,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "ef:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "ef:");
int c;
while ((c = get_opts ()) != -1)
@@ -97,8 +98,10 @@ run_test (Test_Interceptors::Visual_ptr server
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
#if TAO_HAS_INTERCEPTORS == 1
@@ -117,10 +120,10 @@ main (int argc, char *argv[])
#endif /* TAO_HAS_INTERCEPTORS == 1 */
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/server.cpp b/TAO/tests/Portable_Interceptors/Dynamic/server.cpp
index 2197bc560bb..16795ae9459 100644
--- a/TAO/tests/Portable_Interceptors/Dynamic/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Dynamic/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "Echo_Server_ORBInitializer.h"
#include "ace/OS_NS_stdio.h"
@@ -16,7 +17,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,8 +40,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
#if TAO_HAS_INTERCEPTORS == 1
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
#endif /* TAO_HAS_INTERCEPTORS == 1 */
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -82,7 +85,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Visual_i server_impl (orb.in ());
@@ -111,7 +114,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp b/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp
index 3e1cf79ca24..9bf6e9024a2 100644
--- a/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp
@@ -1,12 +1,12 @@
// $Id$
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-
#include "server_interceptor.h"
#include "testC.h"
+#include "tao/AnyTypeCode/DynamicC.h"
+#include "tao/AnyTypeCode/TypeCode.h"
+#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
+
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc b/TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc
index 57393219165..37b911f8198 100644
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc
+++ b/TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc
@@ -2,6 +2,7 @@
// $Id$
project(*Server): taoserver, valuetype, pi, pi_server, interceptors {
+ idlflags += -DCORBA3
Source_Files {
test_i.cpp
@@ -12,8 +13,8 @@ project(*Server): taoserver, valuetype, pi, pi_server, interceptors {
}
project(*Client): taoclient, valuetype, pi, pi_server, interceptors {
- after += *Server
-
+ idlflags += -DCORBA3
+
Source_Files {
testC.cpp
Client_ORBInitializer.cpp
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp
index c04cfbaf890..1fea9ed48aa 100644
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp
+++ b/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "Client_ORBInitializer.h"
@@ -22,7 +23,7 @@ parse_args (int argc, char *argv[])
"Wrong number of arguments.\n"),
-1);
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -48,8 +49,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int status = 0;
ACE_DECLARE_NEW_CORBA_ENV;
@@ -70,13 +73,13 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
#endif /* TAO_HAS_INTERCEPTORS == 1 */
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"Client ORB"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (::parse_args (argc, argv) != 0)
+ if (::parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// Start out with the first IOR. Interaction with the second
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp
index 286a18b98c0..22b93a566d1 100644
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp
+++ b/TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "Server_ORBInitializer.h"
@@ -24,7 +25,7 @@ parse_args (int argc, char *argv[])
"Wrong number of arguments.\n"),
-1);
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
int ior_count = 1;
@@ -58,8 +59,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
#endif /* TAO_HAS_INTERCEPTORS == 1 */
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "Server ORB" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "Server ORB" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -97,7 +100,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (::parse_args (argc, argv) != 0)
+ if (::parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
CORBA::PolicyList policies; // Empty policy list.
@@ -186,7 +189,7 @@ main (int argc, char *argv[])
// Write each IOR to a file.
// IOR 1
- FILE *output_file= ACE_OS::fopen (ior1_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior1_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file <%s> for writing "
@@ -197,7 +200,7 @@ main (int argc, char *argv[])
ACE_OS::fclose (output_file);
// IOR 2
- output_file= ACE_OS::fopen (ior2_file, "w");
+ output_file= ACE_OS::fopen (ior2_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp
index 2bf02d1ef30..6cfa38f8bde 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp
@@ -3,7 +3,7 @@
#include "ace/Log_Msg.h"
-#include "tao/AnyTypeCode/TypeCode_Constants.h"
+#include "tao/AnyTypeCode/TC_Constants_Forward.h"
ACE_RCSID (IORInterceptor,
FOO_ClientRequestInterceptor,
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h
index 699083a8fde..3470e22c973 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h
@@ -42,7 +42,7 @@
* properly.
*/
class FOO_IORInterceptor
- : public virtual PortableInterceptor::IORInterceptor_3_0,
+ : public virtual PortableInterceptor::IORInterceptor,
public virtual TAO_Local_RefCounted_Object
{
public:
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc b/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc
index fddc7298207..26777d6f625 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc
@@ -11,7 +11,6 @@ project(*Server): taoserver, iorinterceptor, interceptors {
}
project(*Client): taoclient, pi, interceptors {
- after += *Server
Source_Files {
testC.cpp
FOO_Client_ORBInitializer.cpp
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp
index a482b81963e..dd87bbcbc9a 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "FOO_Client_ORBInitializer.h"
@@ -16,7 +17,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,8 +38,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -58,10 +61,10 @@ main (int argc, char *argv[])
#endif /* TAO_HAS_INTERCEPTORS == 1 */
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "client_orb" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "client_orb" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var obj =
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp
index a91cf021548..2830c220741 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "FOO_IORInterceptor_ORBInitializer.h"
@@ -17,7 +18,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -40,8 +41,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -61,8 +64,8 @@ main (int argc, char *argv[])
#endif /* TAO_HAS_INTERCEPTORS == 1 */
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"test_orb"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -88,7 +91,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
test_i server_impl (orb.in ());
@@ -115,7 +118,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the IOR to it.
if (ior_output_file != 0)
{
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing "
@@ -130,10 +133,6 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
ACE_DEBUG ((LM_INFO, "Event loop finished.\n"));
-
- // The interceptors will be destroyed when we call this
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
}
ACE_CATCHANY
{
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc b/TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc
index 600ba5c118b..90a4632fc2b 100644
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc
+++ b/TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc
@@ -12,7 +12,6 @@ project(*Server): taoserver, pi_server, interceptors {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
testC.cpp
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp b/TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp
index ca70543c315..be930e9932e 100644
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp
+++ b/TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
@@ -15,7 +16,7 @@ const char *ior = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,18 +40,20 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"Client ORB"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (::parse_args (argc, argv) != 0)
+ if (::parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
CORBA::Object_var object =
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp b/TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp
index 000fda92d76..ce7eff2c135 100644
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp
+++ b/TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp
@@ -1,4 +1,5 @@
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "Server_ORBInitializer.h"
@@ -18,7 +19,7 @@ const char *ior_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,8 +40,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
#endif /* TAO_HAS_INTERCEPTORS == 1 */
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "Server ORB" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "Server ORB" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -83,7 +86,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (::parse_args (argc, argv) != 0)
+ if (::parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
test_i servant (orb.in ());
@@ -102,7 +105,7 @@ main (int argc, char *argv[])
ior.in ()));
// Write IOR to a file.
- FILE *output_file= ACE_OS::fopen (ior_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file <%s> for writing "
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc b/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc
index 39a60cd5c75..fcb0a6c8382 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc
+++ b/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc
@@ -12,7 +12,6 @@ project(*Server): taoserver, pi_server, interceptors {
}
project(*Client): taoclient, pi, interceptors {
- after += *Server
Source_Files {
testC.cpp
ClientORBInitializer.cpp
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
index a76d1d5b774..d3c5ed1d9b8 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
@@ -80,60 +80,11 @@ ServerRequestInterceptor::receive_request_service_contexts (
void
ServerRequestInterceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ServerRequestInfo_ptr
+ ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
- ACE_TRY
- {
- CORBA::Any new_data;
- CORBA::Long number = 19;
- new_data <<= number;
-
- // Set a value in RSC, this should not effect TSC anymore
- ri->set_slot (this->slot_id_,
- new_data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Now retrieve the data from the TSC again. It should not have
- // changed to the new value
- CORBA::Any_var data2 =
- this->pi_current_->get_slot (this->slot_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Long number2 = 0;
- if ((data2.in () >>= number2)
- && number == number2)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: TSC was modified because "
- "RSC was modified.\n"));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "send_reply()\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) Server side RSC/TSC semantics appear "
- "to be correct.\n"));
-
}
void
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/client.cpp b/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
index 4325478fd98..ec44721b6da 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "ClientORBInitializer.h"
@@ -17,7 +18,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -38,8 +39,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -57,13 +60,13 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"client_orb"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Get the PICurrent object.
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/server.cpp b/TAO/tests/Portable_Interceptors/PICurrent/server.cpp
index 3e0b650480f..3fac7025e6a 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/server.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/server.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "ServerORBInitializer.h"
@@ -20,7 +21,7 @@ extern PortableInterceptor::SlotId slot_id;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -43,8 +44,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -61,8 +64,8 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"test_orb"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -88,7 +91,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
obj = orb->resolve_initial_references ("PICurrent" ACE_ENV_ARG_PARAMETER);
@@ -130,7 +133,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the IOR to it.
if (ior_output_file != 0)
{
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing "
@@ -144,9 +147,6 @@ main (int argc, char *argv[])
orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
ACE_DEBUG ((LM_INFO, "Event loop finished.\n"));
}
ACE_CATCHANY
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp b/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp
index 5c9cae1b492..c2231d58046 100644
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp
@@ -76,3 +76,29 @@ IORInterceptor::establish_components (
ACE_CHECK;
}
+void
+IORInterceptor::components_established (
+ PortableInterceptor::IORInfo_ptr
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+
+}
+
+void
+IORInterceptor::adapter_manager_state_changed (
+ PortableInterceptor::AdapterManagerId,
+ PortableInterceptor::AdapterState
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+void
+IORInterceptor:: adapter_state_changed (
+ const PortableInterceptor::ObjectReferenceTemplateSeq &,
+ PortableInterceptor::AdapterState
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h b/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h
index c2ab7cf6602..503c7390a10 100644
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h
+++ b/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h
@@ -70,6 +70,23 @@ public:
PortableInterceptor::IORInfo_ptr info
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void components_established (
+ PortableInterceptor::IORInfo_ptr info
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void adapter_manager_state_changed (
+ PortableInterceptor::AdapterManagerId id,
+ PortableInterceptor::AdapterState state
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void adapter_state_changed (
+ const PortableInterceptor::ObjectReferenceTemplateSeq & templates,
+ PortableInterceptor::AdapterState state
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
//@}
protected:
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl b/TAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl
index 58fa821c094..77a14c57980 100755
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl
+++ b/TAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl
@@ -22,7 +22,7 @@ print STDERR "\n\n==== Running PolicyFactory test\n";
$SV->Spawn ();
-$server = $SV->WaitKill (30);
+$server = $SV->WaitKill (5);
if ($server != 0) {
print STDERR "ERROR: server returned $server\n";
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp b/TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp
index 1a52aa6b982..5023dabe538 100644
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp
+++ b/TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp
@@ -7,14 +7,17 @@
#include "tao/PortableServer/PortableServer.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (PolicyFactory,
server,
"$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -31,8 +34,8 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"test_orb"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.cpp
deleted file mode 100644
index fca62b6fe50..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "testC.h"
-#include "interceptors.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , input_ (ior)
- , corb_ (CORBA::ORB::_duplicate (corb))
-
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var object =
- corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- this->input_),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
-
-
-void
-Client_Task::run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long one = 1, two = 1;
- (void) server->calculate (one,
- two
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_TRY
- {
- (void) server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "As expected, Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "As expected, Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.h
deleted file mode 100644
index 49074e04e89..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef COLLOCATED_TEST_CLIENT_TASK_H
-#define COLLOCATED_TEST_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-#include "ace/Task.h"
-#include "testS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/ORB.h"
-
-
-/// Implement a Task to run the client as a thread
-class Client_Task : public ACE_Task_Base
-{
-public:
-
- /// Constructor
- Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- void run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL);
-
- /// The status of the svc loop
- int status (void) const;
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
- int status_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp
deleted file mode 100644
index 41d8c39fec7..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-//$Id$
-#include "Server_Task.h"
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/SString.h"
-#include "ace/Manual_Event.h"
-#include "Echo_Collocated_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "interceptors.h"
-
-const char *output = "test.ior";
-const char *input = "file://test.ior";
-
-ACE_CString server_proc_mode_str;
-ACE_CString client_proc_mode_str;
-ACE_CString server_orb;
-ACE_CString client_orb;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "s:c:k:o");
- int c;
-
- server_proc_mode_str.set ("LOCAL_AND_REMOTE");
- client_proc_mode_str.set ("LOCAL_AND_REMOTE");
-
- while ((c = get_opts ()) != -1)
- {
- switch (c)
- {
- case 's':
- server_proc_mode_str.set (get_opts.opt_arg ());
- break;
- case 'c':
- client_proc_mode_str.set (get_opts.opt_arg ());
- break;
- case 'o':
- output = get_opts.opt_arg ();
- break;
- case 'k':
- input = get_opts.opt_arg ();
- break;
- case '?':
- default:
- return 0;
- }
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- server_orb.set ("server_orb");
- client_orb.set ("client_orb");
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- // Set up our default expectations.
- CORBA::ULong expected_server_interceptor_check = 10;
- CORBA::ULong expected_client_interceptor_check = 10;
-
- PortableInterceptor::ProcessingMode client_proc_mode =
- PortableInterceptor::LOCAL_AND_REMOTE;
-
- if (client_proc_mode_str == "LOCAL_ONLY")
- {
- client_proc_mode = PortableInterceptor::LOCAL_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_ONLY for client-side ProcessingMode.\n"));
- }
- else if (client_proc_mode_str == "REMOTE_ONLY")
- {
- client_proc_mode = PortableInterceptor::REMOTE_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using REMOTE_ONLY for client-side ProcessingMode.\n"));
-
- // Since all of the calls are collocated, setting the client-side
- // ProcessingMode to REMOTE_ONLY will cause the client request
- // interceptor to not fire. Thus, we expect 0 calls on the
- // client interceptor.
- expected_client_interceptor_check = 0;
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_AND_REMOTE for client-side ProcessingMode.\n"));
- }
-
- PortableInterceptor::ProcessingMode server_proc_mode =
- PortableInterceptor::LOCAL_AND_REMOTE;
-
- if (server_proc_mode_str == "LOCAL_ONLY")
- {
- server_proc_mode = PortableInterceptor::LOCAL_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_ONLY for server-side ProcessingMode.\n"));
- }
- else if (server_proc_mode_str == "REMOTE_ONLY")
- {
- server_proc_mode = PortableInterceptor::REMOTE_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using REMOTE_ONLY for server-side ProcessingMode.\n"));
-
- // Since all of the calls are collocated, setting the server-side
- // ProcessingMode to REMOTE_ONLY will cause the server request
- // interceptor to not fire. Thus, we expect 0 calls on the
- // server interceptor.
- expected_server_interceptor_check = 0;
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_AND_REMOTE for server-side ProcessingMode.\n"));
- }
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Collocated_ORBInitializer (server_proc_mode,
- client_proc_mode),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Argv_Type_Converter satc (argc, argv);
- CORBA::ORB_var sorb =
- CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv (),
- server_orb.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Manual_Event me;
- Server_Task server_task (output,
- sorb.in (),
- me,
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE,
- 1,
- 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
-
- // Wait for the server thread to do some processing
- me.wait ();
-
- ACE_Argv_Type_Converter catc (argc, argv);
- CORBA::ORB_var corb =
- CORBA::ORB_init (catc.get_argc (),
- catc.get_TCHAR_argv (),
- client_orb.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (input,
- corb.in (),
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE,
- 1,
- 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- sorb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- bool failed_check = false;
-
- CORBA::ULong number_called =
- Echo_Server_Request_Interceptor::server_interceptor_check_;
-
- if (number_called != expected_server_interceptor_check)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Server-Side Interceptors not "
- "called properly, called %d times, expected %d.\n",
- number_called, expected_server_interceptor_check));
- failed_check = true;
- }
-
- number_called =
- Echo_Client_Request_Interceptor::client_interceptor_check_;
-
- if (number_called != expected_client_interceptor_check)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR:Client-Side Interceptors not called "
- "properly, called %d times, expected %d.\n",
- number_called, expected_client_interceptor_check));
- failed_check = true;
- }
-
- if (failed_check)
- {
- return 1;
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Some exception was caught in main().\n"));
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.cpp
deleted file mode 100644
index b9773fde351..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Collocated_ORBInitializer.h"
-#include "interceptors.h"
-#include "tao/PI/ORBInitInfo.h"
-#include "tao/ORB_Core.h"
-#include "ace/OS_NS_string.h"
-
-Echo_Collocated_ORBInitializer::Echo_Collocated_ORBInitializer (
- PortableInterceptor::ProcessingMode server_proc_mode,
- PortableInterceptor::ProcessingMode client_proc_mode)
- : server_processing_mode_(server_proc_mode),
- client_processing_mode_(client_proc_mode)
-{
-}
-
-void
-Echo_Collocated_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Collocated_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // TAO-Specific way to get to the ORB Core (and thus, the ORB).
- TAO_ORBInitInfo_var tao_info =
- TAO_ORBInitInfo::_narrow (info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB::_duplicate(tao_info->orb_core()->orb());
-
- if (CORBA::is_nil(orb.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ORBInitInfo_3_1_var info_3_1 =
- PortableInterceptor::ORBInitInfo_3_1::_narrow(info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(info_3_1.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- if (!ACE_OS::strcmp (orb_id.in (), "client_orb"))
- {
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- CORBA::Any client_proc_mode_as_any;
- client_proc_mode_as_any <<= this->client_processing_mode_;
-
- CORBA::PolicyList policy_list (1);
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (PortableInterceptor::PROCESSING_MODE_POLICY_TYPE,
- client_proc_mode_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- info_3_1->add_client_request_interceptor_with_policy (
- client_interceptor.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
- }
- else if (!ACE_OS::strcmp (orb_id.in (), "server_orb"))
- {
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = interceptor;
-
- CORBA::Any server_proc_mode_as_any;
- server_proc_mode_as_any <<= this->server_processing_mode_;
-
- CORBA::PolicyList policy_list (1);
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (PortableInterceptor::PROCESSING_MODE_POLICY_TYPE,
- server_proc_mode_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- info_3_1->add_server_request_interceptor_with_policy (
- server_interceptor.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
- }
- else
- {
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.h
deleted file mode 100644
index 57d361b7b9a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-#define TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/orbconf.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PI/ProcessingModePolicyC.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo client ORB initializer.
-class Echo_Collocated_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- Echo_Collocated_ORBInitializer
- (PortableInterceptor::ProcessingMode server_proc_mode,
- PortableInterceptor::ProcessingMode client_proc_mode);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- PortableInterceptor::ProcessingMode server_processing_mode_;
- PortableInterceptor::ProcessingMode client_processing_mode_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/PI_ProcMode_Collocated.mpc b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/PI_ProcMode_Collocated.mpc
deleted file mode 100644
index 0e1f9788ad5..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/PI_ProcMode_Collocated.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Collocated): taoserver, pi, pi_server, interceptors {
- exename = PI_ProcMode_Collocated_Test
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- interceptors.cpp
- Echo_Collocated_ORBInitializer.cpp
- Collocated_Test.cpp
- Client_Task.cpp
- Server_Task.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.cpp
deleted file mode 100644
index a9db6a71b8a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "test_i.h"
-#include "interceptors.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(Collocated_Test,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , output_ (output)
- , me_ (me)
- , sorb_ (CORBA::ORB::_duplicate (sorb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var poa_object =
- sorb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Visual_i * server_impl = 0;
- ACE_NEW_RETURN (server_impl, Visual_i (sorb_.in ()), 1);
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Test_Interceptors::Visual: <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (output_ != 0)
- {
- FILE *output_file= ACE_OS::fopen (this->output_, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- this->output_),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.h
deleted file mode 100644
index 2f63a0724de..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef COLLOCATED_SERVER_TASK_H
-#define COLLOCATED_SERVER_TASK_H
-
-#include /**/ "ace/pre.h"
-
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/ORB.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-/// Implement a Task to run the server in a single thread
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (const char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- /// The status of the svc loop
- int status (void) const;
-
-private:
- /// Output file for IOR
- const char *output_;
-
- /// Manual event to wake up the main thread to create a client
- /// thread.
- ACE_Manual_Event &me_;
-
- CORBA::ORB_var sorb_;
-
- int status_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.cpp
deleted file mode 100644
index 2082c0d81c9..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-// $Id$
-
-#include "interceptors.h"
-#include "tao/PI/ClientRequestInfoC.h"
-#include "tao/PI_Server/ServerRequestInfoC.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Dynamic,
- interceptors,
- "$Id$")
-
-const char *request_msg = "The Echo_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Request_Interceptor reply message";
-CORBA::ULong Echo_Client_Request_Interceptor::client_interceptor_check_ = 0;
-CORBA::ULong Echo_Server_Request_Interceptor::server_interceptor_check_ = 0;
-
-Echo_Client_Request_Interceptor::Echo_Client_Request_Interceptor (void)
- : myname_ ("Echo_Client_Interceptor")
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var op =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- client_interceptor_check_++;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request from "
- "\"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- client_interceptor_check_++;
- }
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_other "
- "from \"%s\"\n",
- op.in ()));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- client_interceptor_check_++;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_reply "
- "from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- }
- else if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- client_interceptor_check_++;
- }
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::received_exception "
- "from \"%s\"\n",
- op.in ()));
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id.in ()));
-}
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- ++server_interceptor_check_;
- }
-
- PortableInterceptor::ObjectId_var test_oid =
- ri->object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::receive_request from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
-
- }
-
- CORBA::String_var tmdi =
- ri->target_most_derived_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Target most derived interface: %s\n",
- tmdi.in ()));
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- ++server_interceptor_check_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_reply from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-
- if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result = 0;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- ++server_interceptor_check_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_exception "
- "from \"%s\"\n",
- op.in ()));
-
-
- CORBA::Any_var any =
- ri->sending_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var type = any->type ();
-
- const char *exception_id = type->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id));
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.h
deleted file mode 100644
index c136eb18144..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_INTERCEPTORS_H
-#define TAO_INTERCEPTORS_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
-
- Echo_Client_Request_Interceptor (void);
- // ctor.
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong client_interceptor_check_;
-private:
- const char *myname_;
-};
-
-class Echo_Server_Request_Interceptor
- : public PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong server_interceptor_check_;
-
-private:
- const char *myname_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_INTERCEPTORS_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/run_test.pl b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/run_test.pl
deleted file mode 100755
index e877773b96e..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/run_test.pl
+++ /dev/null
@@ -1,134 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../../bin';
-use PerlACE::Run_Test;
-
-sub get_test_modes
-{
- my $testid = shift;
-
- my $client_mode = "LOCAL_AND_REMOTE";
- my $server_mode = "LOCAL_AND_REMOTE";
-
- # There are Nine Permutations.
- if ($testid == 1)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 2)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 3)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "REMOTE_ONLY";
- }
- elsif ($testid == 4)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 5)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 6)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "REMOTE_ONLY";
- }
- elsif ($testid == 7)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 8)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 9)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "REMOTE_ONLY";
- }
- else
- {
- print STDERR "ERROR: invalid testid: $testid\n";
- exit 1;
- }
-
- return ($client_mode, $server_mode);
-}
-
-my $status = 0;
-my $file = PerlACE::LocalFile ("test.ior");
-
-my $testid;
-
-for ($testid = 1; $testid <= 9; ++$testid)
-{
- unlink $file;
-
- my $client_mode;
- my $server_mode;
-
- ($client_mode, $server_mode) = get_test_modes($testid);
-
- my $SV;
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("PI_ProcMode_Collocated_Test",
- "-c $client_mode " .
- "-s $server_mode " .
- "-ORBobjrefstyle url");
- }
- else {
- $SV = new PerlACE::Process ("PI_ProcMode_Collocated_Test",
- "-c $client_mode " .
- "-s $server_mode " .
- "-ORBobjrefstyle url");
- }
-
- print STDERR "\n\n==== Starting test variant #$testid\n\n";
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
- }
-
- my $collocated = $SV->WaitKill (5);
-
- if ($collocated != 0) {
- print STDERR "ERROR: PI_ProcMode_Collocated_Test returned $collocated\n";
- print STDERR "ERROR: For client-side mode [$client_mode],\n";
- print STDERR "ERROR: and server-side mode [$server_mode].\n";
- $status = 1;
- print STDERR "\nTest variant #$testid of 9 failed!\n\n";
- }
- else {
- print STDERR "\nTest variant #$testid of 9 passed!\n\n";
- }
-}
-
-unlink $file;
-
-if ($status == 0) {
- print STDERR "\n==== All 9 test variants were successful!\n";
-}
-else {
- print STDERR "\n==== One or more of the 9 test variants failed!\n";
-}
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test.idl b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test.idl
deleted file mode 100644
index 07ed4dee088..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test portable interceptor support.
-//
-// = AUTHORS
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- void normal (in long arg);
- // Normal operation.
-
- long calculate (in long one, in long two);
- // Normal operation with a return val.
-
- void user ()
- raises (Silly);
- // throws a user exception.
-
- void system ();
- // thows a system exception.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.cpp
deleted file mode 100644
index 31585a94528..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Dynamic, test_i, "$Id$")
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
- // ctor
-
-void
-Visual_i::normal (CORBA::Long
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-CORBA::Long
-Visual_i::calculate (CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
- return (one + two);
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwning Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Give the client thread time to return from the collocated
- // call to this method before shutting down the ORB. We sleep
- // to avoid BAD_INV_ORDER exceptions on fast dual processor machines.
- ACE_OS::sleep(1);
- this->orb_->shutdown ();
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.h
deleted file mode 100644
index f31756fb10a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors/Dynamic
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Nanbor Wang
-//
-// ============================================================================
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-class Visual_i : public POA_Test_Interceptors::Visual
-{
- // = DESCRIPTION
- // Implements the Visual interface in test.idl
-
-public:
- Visual_i (CORBA::ORB_ptr orb);
- // ctor
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::Long calculate (
- CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB pointer (for shutdown.)
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.cpp
deleted file mode 100644
index 0990fd47209..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "testC.h"
-#include "client_interceptor.h"
-
-ACE_RCSID(Remote, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , input_ (ior)
- , corb_ (CORBA::ORB::_duplicate (corb))
-
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var object =
- corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- this->input_),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
-
-
-void
-Client_Task::run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long one = 1, two = 1;
- (void) server->calculate (one,
- two
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_TRY
- {
- (void) server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "As expected, Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "As expected, Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.h
deleted file mode 100644
index 3678e806775..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef TEST_CLIENT_TASK_H
-#define TEST_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-#include "ace/Task.h"
-#include "testS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/ORB.h"
-
-
-/// Implement a Task to run the client as a thread
-class Client_Task : public ACE_Task_Base
-{
-public:
-
- /// Constructor
- Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- void run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL);
-
- /// The status of the svc loop
- int status (void) const;
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
- int status_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.cpp
deleted file mode 100644
index 15751d6f087..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Client_ORBInitializer.h"
-#include "client_interceptor.h"
-#include "tao/PI/ORBInitInfo.h"
-#include "tao/ORB_Core.h"
-#include "ace/OS_NS_string.h"
-
-Echo_Client_ORBInitializer::Echo_Client_ORBInitializer (
- PortableInterceptor::ProcessingMode proc_mode)
- : processing_mode_(proc_mode)
-{
-}
-
-void
-Echo_Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // TAO-Specific way to get to the ORB Core (and thus, the ORB).
- TAO_ORBInitInfo_var tao_info =
- TAO_ORBInitInfo::_narrow (info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB::_duplicate(tao_info->orb_core()->orb());
-
- if (CORBA::is_nil(orb.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ORBInitInfo_3_1_var info_3_1 =
- PortableInterceptor::ORBInitInfo_3_1::_narrow(info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(info_3_1.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- CORBA::Any client_proc_mode_as_any;
- client_proc_mode_as_any <<= this->processing_mode_;
-
- CORBA::PolicyList policy_list (1);
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (PortableInterceptor::PROCESSING_MODE_POLICY_TYPE,
- client_proc_mode_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- info_3_1->add_client_request_interceptor_with_policy (
- client_interceptor.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.h
deleted file mode 100644
index 58506555153..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-#define TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/orbconf.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-#include "tao/PI/PI.h"
-#include "tao/PI/ProcessingModePolicyC.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo client ORB initializer.
-class Echo_Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- Echo_Client_ORBInitializer
- (PortableInterceptor::ProcessingMode proc_mode);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- PortableInterceptor::ProcessingMode processing_mode_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.cpp
deleted file mode 100644
index 9136e25e126..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Server_ORBInitializer.h"
-#include "server_interceptor.h"
-#include "tao/PI/ORBInitInfo.h"
-#include "tao/ORB_Core.h"
-#include "ace/OS_NS_string.h"
-
-Echo_Server_ORBInitializer::Echo_Server_ORBInitializer (
- PortableInterceptor::ProcessingMode proc_mode)
- : processing_mode_(proc_mode)
-{
-}
-
-void
-Echo_Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // TAO-Specific way to get to the ORB Core (and thus, the ORB).
- TAO_ORBInitInfo_var tao_info =
- TAO_ORBInitInfo::_narrow (info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB::_duplicate(tao_info->orb_core()->orb());
-
- if (CORBA::is_nil(orb.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ORBInitInfo_3_1_var info_3_1 =
- PortableInterceptor::ORBInitInfo_3_1::_narrow(info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(info_3_1.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = interceptor;
-
- CORBA::Any proc_mode_as_any;
- proc_mode_as_any <<= this->processing_mode_;
-
- CORBA::PolicyList policy_list (1);
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (PortableInterceptor::PROCESSING_MODE_POLICY_TYPE,
- proc_mode_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- info_3_1->add_server_request_interceptor_with_policy (
- server_interceptor.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.h
deleted file mode 100644
index f3af07cc4ae..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_SERVER_ORB_INITIALIZER_H
-#define TAO_ECHO_SERVER_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/orbconf.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PI/ProcessingModePolicyC.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo client ORB initializer.
-class Echo_Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- Echo_Server_ORBInitializer
- (PortableInterceptor::ProcessingMode proc_mode);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- PortableInterceptor::ProcessingMode processing_mode_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/PI_ProcMode_Remote.mpc b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/PI_ProcMode_Remote.mpc
deleted file mode 100644
index deab03af74f..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/PI_ProcMode_Remote.mpc
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*RemoteServer): taoserver, pi_server, interceptors {
- exename = PI_ProcMode_Remote_TestServer
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- server_interceptor.cpp
- Echo_Server_ORBInitializer.cpp
- server_main.cpp
- Server_Task.cpp
- }
-}
-
-project(*RemoteClient): taoclient, portableserver, pi, interceptors {
- exename = PI_ProcMode_Remote_TestClient
- Source_Files {
- testC.cpp
- client_interceptor.cpp
- Echo_Client_ORBInitializer.cpp
- client_main.cpp
- Client_Task.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.cpp
deleted file mode 100644
index 7fbab820892..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "test_i.h"
-#include "server_interceptor.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(Remote,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , output_ (output)
- , me_ (me)
- , sorb_ (CORBA::ORB::_duplicate (sorb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var poa_object =
- sorb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Visual_i * server_impl = 0;
- ACE_NEW_RETURN (server_impl, Visual_i (sorb_.in ()), 1);
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Test_Interceptors::Visual: <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (output_ != 0)
- {
- FILE *output_file= ACE_OS::fopen (this->output_, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- this->output_),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->sorb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.h
deleted file mode 100644
index 6b7b9404bd5..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TEST_SERVER_TASK_H
-#define TEST_SERVER_TASK_H
-
-#include /**/ "ace/pre.h"
-
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/ORB.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-/// Implement a Task to run the server in a single thread
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (const char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- /// The status of the svc loop
- int status (void) const;
-
-private:
- /// Output file for IOR
- const char *output_;
-
- /// Manual event to wake up the main thread to create a client
- /// thread.
- ACE_Manual_Event &me_;
-
- CORBA::ORB_var sorb_;
-
- int status_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.cpp
deleted file mode 100644
index 399025fa883..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-// $Id$
-
-#include "client_interceptor.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Remote,
- client_interceptor,
- "$Id$")
-
-const char *request_msg = "The Echo_Client_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Client_Request_Interceptor reply message";
-CORBA::ULong Echo_Client_Request_Interceptor::client_interceptor_check_ = 0;
-
-Echo_Client_Request_Interceptor::Echo_Client_Request_Interceptor (void)
- : myname_ ("Echo_Client_Interceptor")
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request from "
- "\"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_other "
- "from \"%s\"\n",
- op.in ()));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_reply "
- "from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- }
- else if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::received_exception "
- "from \"%s\"\n",
- op.in ()));
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id.in ()));
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.h
deleted file mode 100644
index fc49396097a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_CLIENT_INTERCEPTOR_H
-#define TAO_CLIENT_INTERCEPTOR_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
-
- Echo_Client_Request_Interceptor (void);
- // ctor.
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong client_interceptor_check_;
-private:
- const char *myname_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp
deleted file mode 100644
index 78a62bdf25e..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-//$Id$
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/SString.h"
-#include "ace/Manual_Event.h"
-#include "Echo_Client_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "client_interceptor.h"
-
-const char *input = "file://test.ior";
-
-ACE_CString proc_mode_str;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "p:k:");
- int c;
-
- proc_mode_str.set ("LOCAL_AND_REMOTE");
-
- while ((c = get_opts ()) != -1)
- {
- switch (c)
- {
- case 'p':
- proc_mode_str.set (get_opts.opt_arg ());
- break;
- case 'k':
- input = get_opts.opt_arg ();
- break;
- case '?':
- default:
- return 0;
- }
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- // Set up our default expectations.
- CORBA::ULong expected_interceptor_check = 12;
-
- PortableInterceptor::ProcessingMode proc_mode =
- PortableInterceptor::LOCAL_AND_REMOTE;
-
- if (proc_mode_str == "LOCAL_ONLY")
- {
- proc_mode = PortableInterceptor::LOCAL_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_ONLY for client-side ProcessingMode.\n"));
-
- // Since all of the calls are remote, setting the client-side
- // ProcessingMode to LOCAL_ONLY will cause the client request
- // interceptor to not fire. Thus, we expect 0 calls on the
- // client interceptor.
- expected_interceptor_check = 0;
- }
- else if (proc_mode_str == "REMOTE_ONLY")
- {
- proc_mode = PortableInterceptor::REMOTE_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using REMOTE_ONLY for client-side ProcessingMode.\n"));
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_AND_REMOTE for client-side ProcessingMode.\n"));
- }
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Client_ORBInitializer (proc_mode),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Argv_Type_Converter atc (argc, argv);
- CORBA::ORB_var orb =
- CORBA::ORB_init (atc.get_argc (),
- atc.get_TCHAR_argv (),
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (input,
- orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE,
- 1,
- 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- CORBA::ULong number_called =
- Echo_Client_Request_Interceptor::client_interceptor_check_;
-
- if (number_called != expected_interceptor_check)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR:Client-Side Interceptors not called "
- "properly, called %d times, expected %d.\n",
- number_called, expected_interceptor_check));
- return 1;
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Some exception was caught in main().\n"));
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/run_test.pl b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/run_test.pl
deleted file mode 100755
index b04af3c2968..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/run_test.pl
+++ /dev/null
@@ -1,154 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../../bin';
-use PerlACE::Run_Test;
-
-sub get_test_modes
-{
- my $testid = shift;
-
- my $client_mode = "LOCAL_AND_REMOTE";
- my $server_mode = "LOCAL_AND_REMOTE";
-
- # There are Nine Permutations.
- if ($testid == 1)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 2)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 3)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "REMOTE_ONLY";
- }
- elsif ($testid == 4)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 5)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 6)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "REMOTE_ONLY";
- }
- elsif ($testid == 7)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 8)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 9)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "REMOTE_ONLY";
- }
- else
- {
- print STDERR "ERROR: invalid testid: $testid\n";
- exit 1;
- }
-
- return ($client_mode, $server_mode);
-}
-
-my $status = 0;
-my $file = PerlACE::LocalFile ("test.ior");
-
-my $testid;
-
-for ($testid = 1; $testid <= 9; ++$testid)
-{
- unlink $file;
-
- my $client_mode;
- my $server_mode;
-
- ($client_mode, $server_mode) = get_test_modes($testid);
-
- my $SV;
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("PI_ProcMode_Remote_TestServer",
- "-p $server_mode " .
- "-ORBobjrefstyle url");
- }
- else {
- $SV = new PerlACE::Process ("PI_ProcMode_Remote_TestServer",
- "-p $server_mode " .
- "-ORBobjrefstyle url");
- }
-
- print STDERR "\n\n==== Starting test variant #$testid\n\n";
-
- $server = $SV->Spawn ();
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
- }
-
- if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
- }
-
- my $CLIENT;
- $CLIENT = new PerlACE::Process ("PI_ProcMode_Remote_TestClient",
- "-p $client_mode " .
- "-ORBobjrefstyle url");
-
- my $client_status = $CLIENT->SpawnWaitKill (5);
-
- if ($client_status != 0) {
- print STDERR "ERROR: PI_ProcMode_TestClient returned $client_status\n";
- print STDERR "ERROR: For client-side mode [$client_mode],\n";
- print STDERR "ERROR: and server-side mode [$server_mode].\n";
- $status = 1;
- }
-
- my $server_status = $SV->WaitKill (5);
-
- if ($server_status != 0) {
- print STDERR "ERROR: PI_ProcMode_TestServer returned $server_status\n";
- print STDERR "ERROR: For client-side mode [$client_mode],\n";
- print STDERR "ERROR: and server-side mode [$server_mode].\n";
- $status = 1;
- }
-
- if (($server_status == 0) && ($client_status == 0)) {
- print STDERR "\n==== Test variant #$testid (of 9) passed!\n";
- }
- else {
- print STDERR "\n==== Test variant #$testid (of 9) failed!\n";
- }
-}
-
-unlink $file;
-
-if ($status == 0) {
- print STDERR "\n==== All 9 test variants were successful!\n";
-}
-else {
- print STDERR "\n==== One or more of the 9 test variants failed!\n";
-}
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.cpp
deleted file mode 100644
index a1928755bec..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-// $Id$
-
-#include "server_interceptor.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Remote,
- server_interceptor,
- "$Id$")
-
-const char *request_msg = "The Echo_Server_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Server_Request_Interceptor reply message";
-CORBA::ULong Echo_Server_Request_Interceptor::server_interceptor_check_ = 0;
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ObjectId_var test_oid =
- ri->object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::receive_request from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
-
- }
-
- CORBA::String_var tmdi =
- ri->target_most_derived_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Target most derived interface: %s\n",
- tmdi.in ()));
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_reply from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-
- if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result = 0;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_exception "
- "from \"%s\"\n",
- op.in ()));
-
-
- CORBA::Any_var any =
- ri->sending_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var type = any->type ();
-
- const char *exception_id = type->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id));
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.h
deleted file mode 100644
index 1c6f50936a3..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_SERVER_INTERCEPTOR_H
-#define TAO_SERVER_INTERCEPTOR_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Server_Request_Interceptor
- : public PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong server_interceptor_check_;
-
-private:
- const char *myname_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_SERVER_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_main.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_main.cpp
deleted file mode 100644
index 720d51ab9ad..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_main.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-//$Id$
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/SString.h"
-#include "ace/Manual_Event.h"
-#include "Echo_Server_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "server_interceptor.h"
-
-const char *output = "test.ior";
-
-ACE_CString proc_mode_str;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "p:o:");
- int c;
-
- proc_mode_str.set ("LOCAL_AND_REMOTE");
-
- while ((c = get_opts ()) != -1)
- {
- switch (c)
- {
- case 'p':
- proc_mode_str.set (get_opts.opt_arg ());
- break;
- case 'o':
- output = get_opts.opt_arg ();
- break;
- case '?':
- default:
- return 0;
- }
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- // Set up our default expectations.
- CORBA::ULong expected_interceptor_check = 12;
-
- PortableInterceptor::ProcessingMode proc_mode =
- PortableInterceptor::LOCAL_AND_REMOTE;
-
- if (proc_mode_str == "LOCAL_ONLY")
- {
- proc_mode = PortableInterceptor::LOCAL_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_ONLY for server-side ProcessingMode.\n"));
-
- // Since all of the calls are remote, setting the server-side
- // ProcessingMode to LOCAL_ONLY will cause the server request
- // interceptor to not fire. Thus, we expect 0 calls on the
- // server interceptor.
- expected_interceptor_check = 0;
- }
- else if (proc_mode_str == "REMOTE_ONLY")
- {
- proc_mode = PortableInterceptor::REMOTE_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using REMOTE_ONLY for server-side ProcessingMode.\n"));
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_AND_REMOTE for server-side ProcessingMode.\n"));
- }
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Server_ORBInitializer (proc_mode),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Argv_Type_Converter atc (argc, argv);
- CORBA::ORB_var orb =
- CORBA::ORB_init (atc.get_argc (),
- atc.get_TCHAR_argv (),
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Manual_Event me;
- Server_Task server_task (output,
- orb.in (),
- me,
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE,
- 1,
- 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- CORBA::ULong number_called =
- Echo_Server_Request_Interceptor::server_interceptor_check_;
-
- if (number_called != expected_interceptor_check)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Server-Side Interceptors not "
- "called properly, called %d times, expected %d.\n",
- number_called, expected_interceptor_check));
- return 1;
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Some exception was caught in main().\n"));
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test.idl b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test.idl
deleted file mode 100644
index 07ed4dee088..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test portable interceptor support.
-//
-// = AUTHORS
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- void normal (in long arg);
- // Normal operation.
-
- long calculate (in long one, in long two);
- // Normal operation with a return val.
-
- void user ()
- raises (Silly);
- // throws a user exception.
-
- void system ();
- // thows a system exception.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.cpp
deleted file mode 100644
index bf5fe31c9f8..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID(Remote, test_i, "$Id$")
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
- // ctor
-
-void
-Visual_i::normal (CORBA::Long
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-CORBA::Long
-Visual_i::calculate (CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
- return (one + two);
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwning Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->orb_->shutdown ();
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.h
deleted file mode 100644
index f31756fb10a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors/Dynamic
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Nanbor Wang
-//
-// ============================================================================
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-class Visual_i : public POA_Test_Interceptors::Visual
-{
- // = DESCRIPTION
- // Implements the Visual interface in test.idl
-
-public:
- Visual_i (CORBA::ORB_ptr orb);
- // ctor
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::Long calculate (
- CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB pointer (for shutdown.)
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp b/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp
index 9f716e09ada..086c11dab54 100644
--- a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp
@@ -2,14 +2,17 @@
#include "Client_ORBInitializer.h"
#include "tao/ORBInitializer_Registry.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Recursive_ORBInitializer,
client,
"$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Client_ORBInitializer* initializer1 = 0;
Client_ORBInitializer* initializer2 = 0;
@@ -34,11 +37,11 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::ORB_var orb2 =
- CORBA::ORB_init (argc, argv, "SecondORB" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "SecondORB" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl b/TAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl
index 30bc0d981cf..f40037e01d2 100755
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl
+++ b/TAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl
@@ -16,7 +16,7 @@ else {
}
print STDERR "\n==== Running Register_Initial_References test ====\n";
-$server = $SV->SpawnWaitKill (30);
+$server = $SV->SpawnWaitKill (5);
if ($server != 0) {
print STDERR "ERROR: server returned $server\n";
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp b/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp
index efac5ba2c36..dc86ff0da19 100644
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp
@@ -3,6 +3,7 @@
#include "Server_ORBInitializer.h"
#include "tao/ORBInitializer_Registry.h"
#include "test_i.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Recursive_ORBInitializer,
server,
@@ -107,8 +108,10 @@ int test_orb (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Server_ORBInitializer *initializer = 0;
int retval = 0;
@@ -122,7 +125,7 @@ main (int argc, char *argv[])
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
retval = test_orb (orb.in () ACE_ENV_ARG_PARAMETER);
@@ -133,7 +136,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var second_orb =
- CORBA::ORB_init (argc, argv, "SecondORB" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "SecondORB" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc
index ee81ede8553..15ecab48119 100644
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc
+++ b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc
@@ -12,7 +12,6 @@ project(*Server): taoserver, pi_server, interceptors {
}
project(*Client): taoclient, pi, interceptors {
- after += *Server
Source_Files {
testC.cpp
Client_ORBInitializer.cpp
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp
index 52caf89e452..fc04648f4d0 100644
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "Client_ORBInitializer.h"
@@ -21,7 +22,7 @@ parse_args (int argc, char *argv[])
"Wrong number of arguments.\n"),
-1);
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -154,8 +155,10 @@ server_test (Test_ptr server ACE_ENV_ARG_DECL)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -172,13 +175,13 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"Client ORB"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (::parse_args (argc, argv) != 0)
+ if (::parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
CORBA::Object_var object =
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp
index 6e4fa0d21d3..96db670ab05 100644
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "Server_ORBInitializer.h"
@@ -21,7 +22,7 @@ parse_args (int argc, char *argv[])
"Wrong number of arguments.\n"),
-1);
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -44,8 +45,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
@@ -61,7 +64,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "Server ORB" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "Server ORB" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -81,7 +84,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (::parse_args (argc, argv) != 0)
+ if (::parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
test_i servant (orb.in ());
@@ -101,7 +104,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Write IOR to a file.
- FILE *output_file= ACE_OS::fopen (ior_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file <%s> for writing "
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl
index 036fe0dd66e..b536954c01f 100644
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl
+++ b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl
@@ -12,7 +12,7 @@
*/
//=============================================================================
-#include "tao/ULongSeq.pidl"
+#include <ULongSeq.pidl>
interface Test
{
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc
index 2e992878fcb..1a864c9e26f 100644
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc
+++ b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc
@@ -11,7 +11,6 @@ project(*Server): taoserver, pi_server, interceptors {
}
project(*Client): taoclient, pi, interceptors {
- after += *Server
Source_Files {
testC.cpp
Client_ORBInitializer.cpp
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp
index 80c6cfad678..aa55664e5fe 100644
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "Client_ORBInitializer.h"
@@ -13,7 +14,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "ef:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "ef:");
int c;
while ((c = get_opts ()) != -1)
@@ -77,8 +78,10 @@ run_test (Test_Interceptors::Visual_ptr server
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
PortableInterceptor::ORBInitializer_ptr temp_initializer;
@@ -94,10 +97,10 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp
index bb361528705..e425cd68c56 100644
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
#include "Server_ORBInitializer.h"
@@ -16,7 +17,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -39,8 +40,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
PortableInterceptor::ORBInitializer_ptr temp_initializer;
@@ -57,7 +60,7 @@ main (int argc, char *argv[])
// Now we can create the ORB
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Visual_i server_impl (orb.in ());
@@ -111,7 +114,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Portable_Interceptors/Slot/PI_Slot.mpc b/TAO/tests/Portable_Interceptors/Slot/PI_Slot.mpc
deleted file mode 100644
index 2ae15155c7b..00000000000
--- a/TAO/tests/Portable_Interceptors/Slot/PI_Slot.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-project(*driver): orbsvcsexe, pi_server, interceptors {
- Source_Files {
- driver.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Slot/driver.cpp b/TAO/tests/Portable_Interceptors/Slot/driver.cpp
deleted file mode 100644
index b7d2b320500..00000000000
--- a/TAO/tests/Portable_Interceptors/Slot/driver.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// file : Slot/driver.cpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// cvs-id : $Id$
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-#include "tao/ORBInitializer_Registry.h"
-
-PortableInterceptor::SlotId slot_id;
-
-class ORB_Initializer : public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual void
- pre_init (PortableInterceptor::ORBInitInfo_ptr) throw (CORBA::SystemException)
- {
- }
-
- virtual void
- post_init (PortableInterceptor::ORBInitInfo_ptr info) throw (CORBA::SystemException)
- {
- slot_id = info->allocate_slot_id ();
- ACE_DEBUG ((LM_DEBUG, "Allocated slot with id %d.\n", slot_id));
- }
-};
-
-int
-main (int argc, char *argv[])
-{
-
- try
- {
- PortableInterceptor::ORBInitializer_var orb_initializer = new ORB_Initializer ();
- PortableInterceptor::register_orb_initializer (orb_initializer.in ());
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var pic_obj = orb->resolve_initial_references ("PICurrent");
- PortableInterceptor::Current_var pic (
- PortableInterceptor::Current::_narrow (pic_obj.in ()));
-
- CORBA::Any in;
- in <<= CORBA::ULong (1);
- pic->set_slot (slot_id, in);
-
- CORBA::ULong v (0);
- CORBA::Any_var out = pic->get_slot (slot_id);
- out >>= v;
-
- if (v != 1)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Slot value was not preserved.\n"));
- return 1;
- }
- }
- catch (PortableInterceptor::InvalidSlot const&)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Caught InvalidSlot exception.\n"));
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Slot/run_test.pl b/TAO/tests/Portable_Interceptors/Slot/run_test.pl
deleted file mode 100755
index f6cd92fdcf5..00000000000
--- a/TAO/tests/Portable_Interceptors/Slot/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("driver");
-}
-else {
- $CL = new PerlACE::Process ("driver");
-}
-print STDERR "\n==== Running Slot test ====\n";
-
-$client = $CL->SpawnWaitKill (5);
-
-if ($client != 0) {
- print STDERR "ERROR: driver returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/QtTests/QtTests.mpc b/TAO/tests/QtTests/QtTests.mpc
index 95dad19f581..ff027308cb8 100644
--- a/TAO/tests/QtTests/QtTests.mpc
+++ b/TAO/tests/QtTests/QtTests.mpc
@@ -14,8 +14,7 @@ project(*server): taoserver, tao_qtresource {
}
}
-project(*client): taoclient, anytypecode, tao_qtresource {
- after += *server
+project(*client): taoclient, tao_qtresource {
MOC_Files {
client.h
diff --git a/TAO/tests/QtTests/client.cpp b/TAO/tests/QtTests/client.cpp
index 165651a0181..607144fa3d4 100755
--- a/TAO/tests/QtTests/client.cpp
+++ b/TAO/tests/QtTests/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/QtResource_Loader.h"
ACE_RCSID(QtTests, client, "$Id$")
@@ -9,8 +10,10 @@ ACE_RCSID(QtTests, client, "$Id$")
#include "client.h"
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
QApplication app (argc, argv);
TAO::QtResource_Loader qt_resources (&app);
@@ -19,12 +22,12 @@ main (int argc, char *argv[])
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Client client (orb.in (), app);
- client.parse_args (argc, argv ACE_ENV_ARG_PARAMETER);
+ client.parse_args (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Creates the Qt widgets
@@ -69,7 +72,7 @@ Client::parse_args (int argc,
{
const char *ior = "file://test.ior";
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/QtTests/client.h b/TAO/tests/QtTests/client.h
index e4b50c40a70..7982dc17fff 100755
--- a/TAO/tests/QtTests/client.h
+++ b/TAO/tests/QtTests/client.h
@@ -40,7 +40,7 @@ public:
void show (void);
- void parse_args (int argc, char *argv[]
+ void parse_args (int argc, ACE_TCHAR *argv[]
ACE_ENV_ARG_DECL);
QVBox box_;
diff --git a/TAO/tests/QtTests/server.cpp b/TAO/tests/QtTests/server.cpp
index 718c1947c7c..5aa794dd458 100755
--- a/TAO/tests/QtTests/server.cpp
+++ b/TAO/tests/QtTests/server.cpp
@@ -2,6 +2,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (QtTests, server, "$Id$")
@@ -21,7 +22,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -47,10 +48,12 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
// We do the command line parsing first
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Qt specific stuff for running with TAO...
@@ -61,7 +64,7 @@ main (int argc, char *argv[])
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -117,7 +120,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp b/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp
index 077d93b4596..7f1b44056fc 100644
--- a/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp
+++ b/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp
@@ -16,6 +16,7 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_time.h"
#include "ace/OS_NS_stdlib.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (tests,
Queued_Message_Test,
@@ -33,8 +34,7 @@ create_new_message (void)
ACE_Message_Block mb (block_size);
mb.wr_ptr (block_size);
- return new TAO_Asynch_Queued_Message (&mb, TAO_ORB_Core_instance (),
- 0, 1);
+ return new TAO_Asynch_Queued_Message (&mb, TAO_ORB_Core_instance ());
}
/// Add a new message at the tail of the queue.
@@ -88,9 +88,8 @@ static void del_message (TAO_Queued_Message *&head,
}
int
-main (int, char *[])
+ACE_TMAIN (int, ACE_TCHAR *[])
{
-
// Initialize a random seed to get better coverage.
// @@ The random seed and default values should be configurable
// using command line options.
diff --git a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp b/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp
index 8dd1103b673..5e4f933adbb 100644
--- a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp
+++ b/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp
@@ -21,7 +21,7 @@ public:
};
-int main(int, char**)
+int ACE_TMAIN(int, ACE_TCHAR**)
{
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
diff --git a/TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc b/TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc
index b62ff14a3d9..78e08a31786 100644
--- a/TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc
+++ b/TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc
@@ -8,7 +8,6 @@ project(*Server): rt_server {
}
project(*Client): rt_client {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Banded_Connections/client.cpp b/TAO/tests/RTCORBA/Banded_Connections/client.cpp
index 248fb4b0f2e..db79df757f8 100644
--- a/TAO/tests/RTCORBA/Banded_Connections/client.cpp
+++ b/TAO/tests/RTCORBA/Banded_Connections/client.cpp
@@ -3,6 +3,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/ORB_Core.h"
#include "../check_supported_priorities.cpp"
@@ -14,7 +15,7 @@ const char *ior2 = "file://test2.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "n:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "n:o:");
int c;
while ((c = get_opts ()) != -1)
@@ -314,22 +315,23 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
int result =
- parse_args (argc,
- argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Banded_Connections/run_test.pl b/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
index 20bd0533f96..ab526f9b9d9 100755
--- a/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
+++ b/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
@@ -50,7 +50,7 @@ else {
$CL = new PerlACE::Process ("client", "-n file://$iorfile1 -o file://$iorfile2");
$SV->Spawn();
-if (PerlACE::waitforfile_timed ($iorfile2, $PerlACE::wait_interval_for_process_creation) == -1)
+if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1)
{
$server = $SV->TimedWait (1);
if ($server == 2)
diff --git a/TAO/tests/RTCORBA/Banded_Connections/server.cpp b/TAO/tests/RTCORBA/Banded_Connections/server.cpp
index b45fef9cba9..deac22c02b8 100644
--- a/TAO/tests/RTCORBA/Banded_Connections/server.cpp
+++ b/TAO/tests/RTCORBA/Banded_Connections/server.cpp
@@ -3,6 +3,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/RTPortableServer/RTPortableServer.h"
#include "../check_supported_priorities.cpp"
@@ -134,7 +135,7 @@ const char *ior_output_file2 = "test2.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "b:o:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "b:o:n:");
int c;
while ((c = get_opts ()) != -1)
@@ -174,7 +175,7 @@ get_priority_bands (RTCORBA::PriorityBands &bands)
// Read bands from a file.
//
FILE* file =
- ACE_OS::fopen (bands_file, "r");
+ ACE_OS::fopen (bands_file, ACE_TEXT("r"));
if (file == 0)
return -1;
@@ -257,7 +258,7 @@ create_object (PortableServer::POA_ptr poa,
if (filename != 0)
{
FILE *output_file =
- ACE_OS::fopen (filename, "w");
+ ACE_OS::fopen (filename, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -344,24 +345,25 @@ poa_creation_exception_test (PortableServer::POA_ptr root_poa,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
CORBA::ORB_var orb;
ACE_TRY_NEW_ENV
{
// Initialize ORB.
orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
int result =
- parse_args (argc,
- argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc b/TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc
index 9f0ce92c6ea..23d288d93b3 100644
--- a/TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc
+++ b/TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc
@@ -8,7 +8,6 @@ project(*Server): rt_server {
}
project(*Client): rt_client, interceptors {
- after += *Server
Source_Files {
testC.cpp
interceptors.cpp
diff --git a/TAO/tests/RTCORBA/Client_Propagated/client.cpp b/TAO/tests/RTCORBA/Client_Propagated/client.cpp
index dc1fe8657cd..26baadf06fb 100644
--- a/TAO/tests/RTCORBA/Client_Propagated/client.cpp
+++ b/TAO/tests/RTCORBA/Client_Propagated/client.cpp
@@ -8,6 +8,7 @@
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/RTCORBA/Priority_Mapping_Manager.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "../check_supported_priorities.cpp"
const char *ior = "file://test.ior";
@@ -15,7 +16,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -188,8 +189,10 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Register the interceptors to check for the RTCORBA
@@ -208,10 +211,10 @@ main (int argc, char *argv[])
// Initialize and obtain reference to the Test object.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// Make sure we can support multiple priorities that are required
diff --git a/TAO/tests/RTCORBA/Client_Propagated/server.cpp b/TAO/tests/RTCORBA/Client_Propagated/server.cpp
index 463429c1312..c2e235e93b3 100644
--- a/TAO/tests/RTCORBA/Client_Propagated/server.cpp
+++ b/TAO/tests/RTCORBA/Client_Propagated/server.cpp
@@ -3,6 +3,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/RTPortableServer/RTPortableServer.h"
@@ -85,7 +86,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -200,7 +201,7 @@ Task::svc (void)
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -253,18 +254,20 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Standard initialization:
// parse arguments and get all the references (ORB,
// RootPOA, RTORB, RTCurrent, POAManager).
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// Make sure we can support multiple priorities that are required
diff --git a/TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc b/TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc
index e51a077e7fe..596601d6e07 100644
--- a/TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc
+++ b/TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc
@@ -8,7 +8,6 @@ project(*Server): strategies, rt_server {
}
project(*Client): strategies, rt_client {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Client_Protocol/client.cpp b/TAO/tests/RTCORBA/Client_Protocol/client.cpp
index 2ef31055c8f..f72f52a5388 100644
--- a/TAO/tests/RTCORBA/Client_Protocol/client.cpp
+++ b/TAO/tests/RTCORBA/Client_Protocol/client.cpp
@@ -3,6 +3,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/Strategies/advanced_resource.h"
@@ -14,7 +15,7 @@ CORBA::ULong protocol_type = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "s:c:p:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "s:c:p:");
int c, result;
while ((c = get_opts ()) != -1)
@@ -87,19 +88,21 @@ exception_test (Test_ptr server,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize the ORB, resolve references and parse arguments.
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// RTORB.
diff --git a/TAO/tests/RTCORBA/Client_Protocol/run_test.pl b/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
index 9b548f0ff8b..353569681aa 100755
--- a/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
+++ b/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
@@ -48,7 +48,7 @@ $CL = new PerlACE::Process ("client", $client_args);
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile2, $PerlACE::wait_interval_for_process_creation) == -1) {
+if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1) {
print STDERR "ERROR: cannot find file <$iorfile2>\n";
$SV->Kill ();
exit 1;
diff --git a/TAO/tests/RTCORBA/Client_Protocol/server.cpp b/TAO/tests/RTCORBA/Client_Protocol/server.cpp
index 6b4cc59125f..d8d8a93df56 100644
--- a/TAO/tests/RTCORBA/Client_Protocol/server.cpp
+++ b/TAO/tests/RTCORBA/Client_Protocol/server.cpp
@@ -2,6 +2,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/RTCORBA/RT_Policy_i.h"
#include "tao/RTPortableServer/RTPortableServer.h"
@@ -59,7 +60,7 @@ CORBA::ULong protocol_type = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "s:c:p:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "s:c:p:");
int c, result;
while ((c = get_opts ()) != -1)
@@ -137,7 +138,7 @@ create_object (PortableServer::POA_ptr poa,
// Print ior to the file.
if (filename != 0)
{
- FILE *output_file= ACE_OS::fopen (filename, "w");
+ FILE *output_file= ACE_OS::fopen (filename, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -151,17 +152,19 @@ create_object (PortableServer::POA_ptr poa,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// RTORB.
diff --git a/TAO/tests/RTCORBA/Collocation/Collocation.cpp b/TAO/tests/RTCORBA/Collocation/Collocation.cpp
index fa40bd0ca34..4d0803b8e08 100644
--- a/TAO/tests/RTCORBA/Collocation/Collocation.cpp
+++ b/TAO/tests/RTCORBA/Collocation/Collocation.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "ace/Array_Base.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "tao/RTCORBA/Thread_Pool.h"
#include "testS.h"
@@ -916,13 +917,15 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp b/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp
index ed68835f061..3f5810bc95b 100644
--- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp
+++ b/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB.h"
#include "tao/RTCORBA/RTCORBA.h"
@@ -19,7 +20,7 @@ static int iterations = 5;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:");
int c;
while ((c = get_opts ()) != -1)
@@ -89,13 +90,15 @@ create_threadpool_with_lanes (RTCORBA::RTORB_ptr rt_orb
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -125,7 +128,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc b/TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc
index 85cadf3219a..7138aa20720 100644
--- a/TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc
+++ b/TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc
@@ -9,7 +9,6 @@ project(*client) : taoexe, portableserver, rtcorba, minimum_corba {
}
project(*server) : taoexe, rtportableserver, rtcorba, minimum_corba {
- after += *client
source_files {
server.cpp
Custom_Network_Priority_Mapping.cpp
diff --git a/TAO/tests/RTCORBA/Diffserv/client.cpp b/TAO/tests/RTCORBA/Diffserv/client.cpp
index 1956eb1e5ac..a7c39a1d357 100644
--- a/TAO/tests/RTCORBA/Diffserv/client.cpp
+++ b/TAO/tests/RTCORBA/Diffserv/client.cpp
@@ -6,6 +6,7 @@
#include "tao/RTCORBA/Network_Priority_Mapping.h"
#include "Custom_Network_Priority_Mapping.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/Policy_Manager.h"
static const char *ior = "file://simple_servant.ior";
@@ -130,7 +131,7 @@ change_network_priority (int enable_network_priority,
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:n:p:x:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:n:p:x:");
int c;
while ((c = get_opts ()) != -1)
@@ -183,15 +184,17 @@ toggle (int &i)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// Initialize and obtain reference to the Test object.
diff --git a/TAO/tests/RTCORBA/Diffserv/server.cpp b/TAO/tests/RTCORBA/Diffserv/server.cpp
index cee01e1b4f7..6acc390f714 100644
--- a/TAO/tests/RTCORBA/Diffserv/server.cpp
+++ b/TAO/tests/RTCORBA/Diffserv/server.cpp
@@ -3,6 +3,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/RTPortableServer/RTPortableServer.h"
#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
@@ -52,7 +53,7 @@ static RTCORBA::Priority corba_priority = RTCORBA::minPriority;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "p:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "p:");
int c;
while ((c = get_opts ()) != -1)
@@ -97,26 +98,28 @@ create_object (PortableServer::POA_ptr poa,
orb->object_to_string (object.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- FILE *output_file= ACE_OS::fopen (filename, "w");
+ FILE *output_file= ACE_OS::fopen (filename, ACE_TEXT("w"));
ACE_OS::fprintf (output_file, "%s", ior.in ());
ACE_OS::fclose (output_file);
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::Object_var object;
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), ""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// RootPOA.
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/README b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/README
deleted file mode 100644
index 95b07c46c2c..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/README
+++ /dev/null
@@ -1,10 +0,0 @@
-$Id$
-
-Description:
-This is a simple test for a RT thread-pool server. It creates a
-server process with multiple thread pools, POAs, and servants. The
-test also spawns multiple clients for each servant. The servants with
-multiple threads in their thread-pool respond faster than the servants
-with a single thread thread-pool.
-
-See run_test.pl to see how to run this test. \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/RT_Dynamic_Thread_Pool.mpc b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/RT_Dynamic_Thread_Pool.mpc
deleted file mode 100644
index ebf79370785..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/RT_Dynamic_Thread_Pool.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server, minimum_corba {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/client.cpp b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/client.cpp
deleted file mode 100644
index abe1dd456ec..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/client.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_unistd.h"
- #include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Thread_Pool, client, "$Id$")
-
-const char *ior = "file://ior_1";
-int iterations = 6;
-int shutdown_server = 0;
-bool decreased = false;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- shutdown_server = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <iterations> "
- "-x [shutdown server] "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- pid_t pid =
- ACE_OS::getpid ();
-
- CORBA::Long tc = 0;
-
- for (int i = 0; i != iterations; ++i)
- {
- CORBA::Long mtc = 0;
- CORBA::Long r =
- test->method (pid,
- i,
- mtc
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Each 2 iterations sleep 5 seconds
- if (i % 2 == 0)
- ACE_OS::sleep (5);
-
- ACE_ASSERT (r == i);
- // Assert disappears on with optimizations on.
- ACE_UNUSED_ARG (r);
-
- if (mtc > tc)
- {
- // Number of threads increased, so store this.
- ACE_DEBUG ((LM_DEBUG, "Thread count increased to %d\n", mtc));
- tc = mtc;
- }
- else if (mtc < tc)
- {
- // Number of threads decreased!
- ACE_DEBUG ((LM_DEBUG, "Thread count decreased to %d\n", mtc));
- decreased = true;
- tc = mtc;
- }
- }
-
- ACE_OS::sleep (10);
-
- CORBA::Long end = 0;
- CORBA::Long re =
- test->method (pid,
- 0,
- end
- ACE_ENV_ARG_PARAMETER);
-
- ACE_ASSERT (re == 0);
- // Assert disappears on with optimizations on.
- ACE_UNUSED_ARG (re);
-
- if (end != 0)
- {
- ACE_ERROR ((LM_ERROR, "Dynamic thread count should be 0, not %d\n", end));
- }
-
- if (shutdown_server)
- {
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
-
- if (decreased == false)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "ERROR: Number of threads didn't decrease\n"), -1);
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf
deleted file mode 100644
index 41c1919a08a..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Option for platforms where direct mapping doesn't work
-static RT_ORB_Loader "-ORBPriorityMapping continuous -RTORBDynamicThreadIdleTimeout 1000000"
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf.xml b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf.xml
deleted file mode 100644
index bbb864e64b0..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from continuous.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Option for platforms where direct mapping doesn't work -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous -RTORBDynamicThreadIdleTimeout 1000000"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/run_test.pl b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/run_test.pl
deleted file mode 100644
index 2059c01b04f..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/run_test.pl
+++ /dev/null
@@ -1,117 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$number_of_clients = 1;
-$status = 0;
-$continuous = ($^O eq 'hpux');
-
-@configurations =
- (
- {
- file => "ior_3",
- description => "Invoking methods on servant in second RT thread pool (with lanes)",
- },
- );
-
-for $test (@configurations)
-{
- unlink $test->{file};
-}
-
-sub run_clients
-{
- my @parms = @_;
- $arg = $parms[0];
- $clients = $parms[1];
-
- for ($i = 0; $i < $clients; $i++)
- {
- $CL[$i] = new PerlACE::Process ("client", $arg);
- $CL[$i]->Spawn ();
- }
-
- for ($i = 0; $i < $clients; $i++)
- {
- $client = $CL[$i]->WaitKill (120);
- if ($client != 0)
- {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- goto kill_server;
- }
- }
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-if ($continuous) {
- $SV->Arguments ("-ORBSvcConf continuous$PerlACE::svcconf_ext");
-}
- $SV->Arguments ("-ORBDebugLevel 10 -ORBLogFile server.log");
-
-$SV->Spawn ();
-
-for $test (@configurations)
-{
- if (PerlACE::waitforfile_timed ($test->{file}, 10) == -1)
- {
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find ior file: $test->{file}\n";
- $status = 1;
- goto kill_server;
- }
- }
- }
-
-for $test (@configurations)
- {
- print STDERR "\n*************************************************************\n";
- print STDERR "$test->{description}\n";
- print STDERR "*************************************************************\n\n";
-
- run_clients ("-k file://".PerlACE::LocalFile($test->{file}), $number_of_clients);
- }
-
-print STDERR "\n************************\n";
-print STDERR "Shutting down the server\n";
-print STDERR "************************\n\n";
-
-run_clients ("-k file://".PerlACE::LocalFile($configurations[0]->{file})." -i 0 -x", 1);
-
-kill_server:
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0)
- {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
-for $test (@configurations)
- {
- unlink $test->{file};
- }
-
-exit $status
-
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/server.cpp b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/server.cpp
deleted file mode 100644
index ea5dc6db558..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/server.cpp
+++ /dev/null
@@ -1,397 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Thread_Pool, server, "$Id$")
-
-const char *ior_output_file = "ior";
-int ior_count = 1;
-CORBA::ULong static_threads = 1;
-CORBA::ULong dynamic_threads = 25;
-long nap_time = 1000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:s:d:t:h");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 's':
- static_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'd':
- dynamic_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 't':
- nap_time = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'h':
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-s <static_threads> "
- "-d <dynamic_threads> "
- "-t <nap_time> "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-write_ior_to_file (CORBA::ORB_ptr orb,
- test_ptr test
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var ior =
- orb->object_to_string (test
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- char filename[BUFSIZ];
- ACE_OS::sprintf (filename,
- "%s_%d",
- ior_output_file,
- ior_count++);
-
- FILE *output_file =
- ACE_OS::fopen (filename,
- "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
-
- ACE_OS::fclose (output_file);
-
- return 0;
-}
-
-int
-create_POA_and_register_servant (CORBA::Policy_ptr threadpool_policy,
- const char *poa_name,
- PortableServer::POAManager_ptr poa_manager,
- PortableServer::POA_ptr root_poa,
- CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb
- ACE_ENV_ARG_DECL)
-{
- // Policies for the firstPOA to be created.
- CORBA::PolicyList policies (3); policies.length (3);
-
- // Implicit_activation policy.
- policies[0] =
- root_poa->create_implicit_activation_policy
- (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Thread pool policy.
- policies[1] =
- CORBA::Policy::_duplicate (threadpool_policy);
-
- // Priority Model policy.
- policies[2] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the POA under the RootPOA.
- PortableServer::POA_var poa =
- root_poa->create_POA (poa_name,
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Creation of POAs is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
-
- test_i *servant =
- new test_i (orb,
- poa.in (),
- nap_time);
-
- PortableServer::ServantBase_var safe_servant (servant);
- ACE_UNUSED_ARG (safe_servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int result =
- write_ior_to_file (orb,
- test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return result;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Priority default_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i servant (this->orb_.in (),
- root_poa.in (),
- nap_time);
- test_var test =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- write_ior_to_file (this->orb_.in (),
- test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (result != 0)
- return result;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong stacksize = 0;
- CORBA::Boolean allow_request_buffering = 0;
- CORBA::ULong max_buffered_requests = 0;
- CORBA::ULong max_request_buffer_size = 0;
-
- RTCORBA::ThreadpoolId threadpool_id_1 =
- rt_orb->create_threadpool (stacksize,
- static_threads,
- dynamic_threads,
- default_thread_priority,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Policy_var threadpool_policy_1 =
- rt_orb->create_threadpool_policy (threadpool_id_1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Boolean allow_borrowing = 0;
- RTCORBA::ThreadpoolLanes lanes (1);
- lanes.length (1);
-
- lanes[0].lane_priority = default_thread_priority;
- lanes[0].static_threads = static_threads;
- lanes[0].dynamic_threads = dynamic_threads;
-
- RTCORBA::ThreadpoolId threadpool_id_2 =
- rt_orb->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Policy_var threadpool_policy_2 =
- rt_orb->create_threadpool_policy (threadpool_id_2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- result =
- create_POA_and_register_servant (threadpool_policy_1.in (),
- "first_poa",
- poa_manager.in (),
- root_poa.in (),
- this->orb_.in (),
- rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- result =
- create_POA_and_register_servant (threadpool_policy_2.in (),
- "second_poa",
- poa_manager.in (),
- root_poa.in (),
- this->orb_.in (),
- rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf
deleted file mode 100644
index c288d674567..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-static RT_ORB_Loader "-RTORBDynamicThreadIdleTimeout 1000000"
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf.xml b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf.xml
deleted file mode 100644
index 0908328040b..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <static RT_ORB_Loader "-RTORBDynamicThreadIdleTimeout 1000000">
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test.idl b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test.idl
deleted file mode 100644
index 3bc8f9af25c..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
- long method (in long client_id,
- in long iteration,
- out long thread_count);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.cpp b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.cpp
deleted file mode 100644
index 6fbd244dd26..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/Thread_Pool.h"
-
-ACE_RCSID(Thread_Pools, test_i, "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- long msec_sleep)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa)),
- nap_time_ ()
-{
- this->nap_time_.msec (msec_sleep);
-}
-
-CORBA::Long
-test_i::method (CORBA::Long client_id,
- CORBA::Long iteration,
- CORBA::Long_out thread_count
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the ORB_Core's TSS resources.
- TAO_ORB_Core_TSS_Resources *tss =
- this->orb_->orb_core ()->get_tss_resources ();
-
- /// Get the lane attribute in TSS.
- TAO_Thread_Lane *lane =
- static_cast <TAO_Thread_Lane *> (tss->lane_);
-
- if (lane)
- ACE_DEBUG ((LM_DEBUG,
- "Request in thread %t (pool id = %d; lane id = %d) for client %d iteration %d\n",
- lane->pool ().id (),
- lane->id (),
- client_id,
- iteration));
- else
- ACE_DEBUG ((LM_DEBUG,
- "Request in thread %t (default thread pool) for client %d iteration %d\n",
- client_id,
- iteration));
-
- ACE_OS::sleep (this->nap_time_);
-
- if (lane)
- thread_count = lane->current_threads ();
- else
- thread_count = 0;
-
- return iteration;
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.h b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.h
deleted file mode 100644
index 7951ca0854c..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Irfan Pyarali
- */
-// ===================================================================
-
-#include "testS.h"
-
-class test_i :
- public POA_test
-{
-public:
- /// Constructor.
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- long msec_sleep);
-
- /// Test method.
- CORBA::Long method (CORBA::Long client_id,
- CORBA::Long iteration,
- CORBA::Long_out thread_count
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Shutdown the server.
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Our POA.
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// ORB.
- CORBA::ORB_var orb_;
-
- /// Our POA.
- PortableServer::POA_var poa_;
-
- /// Time spent in executing the upcall.
- ACE_Time_Value nap_time_;
-};
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc b/TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc
index a77351b5090..10ba9a8a48f 100644
--- a/TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc
+++ b/TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc
@@ -8,7 +8,6 @@ project(*Server): strategies, rt_server, minimum_corba {
}
project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/client.cpp b/TAO/tests/RTCORBA/Explicit_Binding/client.cpp
index 25e0135f39b..108318bbe63 100644
--- a/TAO/tests/RTCORBA/Explicit_Binding/client.cpp
+++ b/TAO/tests/RTCORBA/Explicit_Binding/client.cpp
@@ -3,6 +3,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/Strategies/advanced_resource.h"
#include "tao/RTCORBA/RTCORBA.h"
@@ -11,7 +12,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -46,19 +47,21 @@ check_for_nil (CORBA::Object_ptr obj, const char *msg)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize the ORB, parse arguments, and resolve references.
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// RTORB.
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl b/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
index 288bd3ddc2e..9317cc84307 100755
--- a/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
+++ b/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
@@ -21,7 +21,7 @@ $CL = new PerlACE::Process ("client", "-o file://$iorfile -ORBdebuglevel 1");
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill ();
exit 1;
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/server.cpp b/TAO/tests/RTCORBA/Explicit_Binding/server.cpp
index 7c434d0c2e5..0a02b151a7f 100644
--- a/TAO/tests/RTCORBA/Explicit_Binding/server.cpp
+++ b/TAO/tests/RTCORBA/Explicit_Binding/server.cpp
@@ -2,6 +2,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/Strategies/advanced_resource.h"
#include "tao/RTCORBA/RTCORBA.h"
@@ -56,7 +57,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -119,7 +120,7 @@ create_object (PortableServer::POA_ptr poa,
// Print ior to the file.
if (filename != 0)
{
- FILE *output_file= ACE_OS::fopen (filename, "w");
+ FILE *output_file= ACE_OS::fopen (filename, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -133,17 +134,19 @@ create_object (PortableServer::POA_ptr poa,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// RootPOA.
diff --git a/TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc b/TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc
index 87178218057..0f82a323a72 100644
--- a/TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc
+++ b/TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc
@@ -8,7 +8,6 @@ project(*Server): rt_server, minimum_corba {
}
project(*Client): rt_client, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Linear_Priority/client.cpp b/TAO/tests/RTCORBA/Linear_Priority/client.cpp
index 6588b34f7a4..b2fd947d35c 100644
--- a/TAO/tests/RTCORBA/Linear_Priority/client.cpp
+++ b/TAO/tests/RTCORBA/Linear_Priority/client.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/ORB_Core.h"
@@ -20,7 +21,7 @@ static const char *bands_file = "empty_file";
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "b:d:p:k:i:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "b:d:p:k:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -320,19 +321,21 @@ Task::svc (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Linear_Priority/server.cpp b/TAO/tests/RTCORBA/Linear_Priority/server.cpp
index 9129c0f3ee9..9b43e744902 100644
--- a/TAO/tests/RTCORBA/Linear_Priority/server.cpp
+++ b/TAO/tests/RTCORBA/Linear_Priority/server.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "testS.h"
#include "tao/RTPortableServer/RTPortableServer.h"
@@ -79,7 +80,7 @@ static const char *lanes_file = "lanes";
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "b:d:l:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "b:d:l:");
int c;
while ((c = get_opts ()) != -1)
@@ -119,7 +120,7 @@ write_iors_to_file (CORBA::Object_ptr object,
ACE_ENV_ARG_DECL)
{
FILE *file =
- ACE_OS::fopen (filename, "w");
+ ACE_OS::fopen (filename, ACE_TEXT("w"));
ACE_ASSERT (file != 0);
CORBA::String_var ior =
@@ -285,19 +286,21 @@ Task::svc (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc
index a77351b5090..10ba9a8a48f 100644
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc
+++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc
@@ -8,7 +8,6 @@ project(*Server): strategies, rt_server, minimum_corba {
}
project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp
index de8d374edf7..a57ced26bb6 100644
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp
+++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp
@@ -6,6 +6,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
#include "ace/Barrier.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "../check_supported_priorities.cpp"
#include "tao/Strategies/advanced_resource.h"
@@ -56,7 +57,7 @@ CORBA::ULong protocol2 = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:a:b:e:f:n:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:a:b:e:f:n:");
int c, result;
while ((c = get_opts ()) != -1)
@@ -291,19 +292,21 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize the ORB, resolve references and parse arguments.
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// Make sure we can support multiple priorities that are required
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp
index 893dbddf688..9886dd12c91 100644
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp
+++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp
@@ -3,6 +3,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/RTPortableServer/RTPortableServer.h"
@@ -56,7 +57,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -178,7 +179,7 @@ Task::svc (void)
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -210,17 +211,19 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// Make sure we can support multiple priorities that are required
diff --git a/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp b/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp
index 9277febd56e..3bd37675c75 100644
--- a/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp
+++ b/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp
@@ -4,6 +4,7 @@
#include "tao/ORB.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
int
test_multiple_orbs (const char *test_name,
@@ -77,16 +78,17 @@ test_multiple_orbs (const char *test_name,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int iterations = 5;
int rt_orb = 0;
int destroy = 0;
int result =
test_multiple_orbs ("non-RT ORBs, disable destroy",
- argc,
- argv,
+ convert.get_argc(), convert.get_ASCII_argv(),
iterations,
rt_orb,
destroy);
@@ -97,8 +99,7 @@ main (int argc, char *argv[])
result =
test_multiple_orbs ("non-RT ORBs, enable destroy",
- argc,
- argv,
+ convert.get_argc(), convert.get_ASCII_argv(),
iterations,
rt_orb,
destroy);
@@ -109,8 +110,7 @@ main (int argc, char *argv[])
result =
test_multiple_orbs ("RT ORBs, disable destroy",
- argc,
- argv,
+ convert.get_argc(), convert.get_ASCII_argv(),
iterations,
rt_orb,
destroy);
@@ -121,8 +121,7 @@ main (int argc, char *argv[])
result =
test_multiple_orbs ("RT ORBs, enable destroy",
- argc,
- argv,
+ convert.get_argc(), convert.get_ASCII_argv(),
iterations,
rt_orb,
destroy);
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc b/TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc
index 87178218057..0f82a323a72 100644
--- a/TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc
+++ b/TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc
@@ -8,7 +8,6 @@ project(*Server): rt_server, minimum_corba {
}
project(*Client): rt_client, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/client.cpp b/TAO/tests/RTCORBA/Persistent_IOR/client.cpp
index 6e9b26cbec7..60696914f2b 100644
--- a/TAO/tests/RTCORBA/Persistent_IOR/client.cpp
+++ b/TAO/tests/RTCORBA/Persistent_IOR/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
static int iterations = 5;
@@ -11,7 +12,7 @@ static const char *ior = 0;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -50,19 +51,21 @@ parse_args (int argc, char **argv)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/server.cpp b/TAO/tests/RTCORBA/Persistent_IOR/server.cpp
index d75fb4a6afd..36b3636782e 100644
--- a/TAO/tests/RTCORBA/Persistent_IOR/server.cpp
+++ b/TAO/tests/RTCORBA/Persistent_IOR/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testS.h"
#include "tao/RTPortableServer/RTPortableServer.h"
#include "ace/OS_NS_stdio.h"
@@ -76,7 +77,7 @@ static CORBA::ULong max_request_buffer_size = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "a:p:t:d:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "a:p:t:d:");
int c;
while ((c = get_opts ()) != -1)
@@ -122,7 +123,7 @@ write_iors_to_file (CORBA::Object_ptr object,
ACE_ENV_ARG_DECL)
{
FILE *file =
- ACE_OS::fopen (filename, "w");
+ ACE_OS::fopen (filename, ACE_TEXT("w"));
ACE_ASSERT (file != 0);
CORBA::String_var ior =
@@ -341,19 +342,21 @@ create_poa_with_tp_and_persistent_policy (CORBA::ORB_ptr orb,
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Policies/Policies.cpp b/TAO/tests/RTCORBA/Policies/Policies.cpp
index 63d97ab4717..8f7fb12eda8 100644
--- a/TAO/tests/RTCORBA/Policies/Policies.cpp
+++ b/TAO/tests/RTCORBA/Policies/Policies.cpp
@@ -23,18 +23,21 @@
#include "tao/AnyTypeCode/Any.h"
#include "ace/Log_Msg.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB first.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc b/TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc
index c7a5f0c3229..49d690018fd 100644
--- a/TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc
+++ b/TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc
@@ -8,7 +8,6 @@ project(*Server): rt_server, minimum_corba {
}
project(*Client): rt_client {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/client.cpp b/TAO/tests/RTCORBA/Policy_Combinations/client.cpp
index 56f29a399f9..a09d06cec4d 100644
--- a/TAO/tests/RTCORBA/Policy_Combinations/client.cpp
+++ b/TAO/tests/RTCORBA/Policy_Combinations/client.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "tao/ORB_Core.h"
#include "tao/RTCORBA/RTCORBA.h"
@@ -15,7 +16,7 @@ static RTCORBA::Priority default_thread_priority;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:x");
int c;
while ((c = get_opts ()) != -1)
@@ -140,19 +141,21 @@ Task::svc (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/run_test.pl b/TAO/tests/RTCORBA/Policy_Combinations/run_test.pl
index 0c424ce42f1..1f0077fcdd8 100755
--- a/TAO/tests/RTCORBA/Policy_Combinations/run_test.pl
+++ b/TAO/tests/RTCORBA/Policy_Combinations/run_test.pl
@@ -60,7 +60,7 @@ $SV->Spawn ();
for $file (@iorfiles)
{
$file = PerlACE::LocalFile($file);
- if (PerlACE::waitforfile_timed ($file, $PerlACE::wait_interval_for_process_creation) == -1)
+ if (PerlACE::waitforfile_timed ($file, 10) == -1)
{
$server = $SV->TimedWait (1);
if ($server == 2)
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/server.cpp b/TAO/tests/RTCORBA/Policy_Combinations/server.cpp
index db378d994bd..38c44df730a 100644
--- a/TAO/tests/RTCORBA/Policy_Combinations/server.cpp
+++ b/TAO/tests/RTCORBA/Policy_Combinations/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testS.h"
#include "tao/ORB_Core.h"
#include "ace/Task.h"
@@ -115,7 +116,7 @@ static CORBA::Boolean allow_borrowing = 0;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "s:c:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "s:c:");
int c;
while ((c = get_opts ()) != -1)
@@ -150,7 +151,7 @@ write_iors_to_file (CORBA::Object_ptr object,
ACE_ENV_ARG_DECL)
{
FILE *file =
- ACE_OS::fopen (filename, "w");
+ ACE_OS::fopen (filename, ACE_TEXT("w"));
ACE_ASSERT (file != 0);
CORBA::String_var ior =
@@ -906,19 +907,21 @@ Task::svc (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc
index ebf79370785..4cb4bcb6c23 100644
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc
+++ b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc
@@ -9,7 +9,6 @@ project(*Server): strategies, rt_server, minimum_corba {
}
project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp
index d33a71f3f25..e4e15b61b13 100644
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp
+++ b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/ORB_Core.h"
@@ -17,7 +18,7 @@ static int make_banded_invocations = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "b:k:i:w:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "b:k:i:w:");
int c;
while ((c = get_opts ()) != -1)
@@ -193,16 +194,18 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl
index 1afb4f6f967..158192e3461 100755
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl
+++ b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl
@@ -63,7 +63,7 @@ sub run_test
for $test (@configurations)
{
- if (PerlACE::waitforfile_timed (PerlACE::LocalFile($test->{file}),$PerlACE::wait_interval_for_process_creation ) == -1)
+ if (PerlACE::waitforfile_timed (PerlACE::LocalFile($test->{file}), 10) == -1)
{
$server = $SV->TimedWait (1);
if ($server == 2)
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp
index e8259069e76..f20c8f967db 100644
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp
+++ b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp
@@ -2,6 +2,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "ace/Task.h"
#include "tao/RTPortableServer/RTPortableServer.h"
@@ -19,7 +20,7 @@ static RTCORBA::Priority high_priority;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:s:d:t:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:s:d:t:");
int c;
while ((c = get_opts ()) != -1)
@@ -74,7 +75,7 @@ write_ior_to_file (CORBA::ORB_ptr orb,
FILE *output_file =
ACE_OS::fopen (filename,
- "w");
+ ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -320,19 +321,20 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc b/TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc
index 87178218057..0f82a323a72 100644
--- a/TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc
+++ b/TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc
@@ -8,7 +8,6 @@ project(*Server): rt_server, minimum_corba {
}
project(*Client): rt_client, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Private_Connection/client.cpp b/TAO/tests/RTCORBA/Private_Connection/client.cpp
index a1b7369b55d..7d06914f2cb 100644
--- a/TAO/tests/RTCORBA/Private_Connection/client.cpp
+++ b/TAO/tests/RTCORBA/Private_Connection/client.cpp
@@ -3,6 +3,7 @@
#include "testC.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior1 = "file://test1.ior";
const char *ior2 = "file://test2.ior";
@@ -10,7 +11,7 @@ const char *ior2 = "file://test2.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:p:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:p:");
int c;
while ((c = get_opts ()) != -1)
@@ -49,19 +50,21 @@ check_for_nil (CORBA::Object_ptr obj, const char *msg)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize the ORB, resolve references and parse arguments.
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// RTORB.
diff --git a/TAO/tests/RTCORBA/Private_Connection/server.cpp b/TAO/tests/RTCORBA/Private_Connection/server.cpp
index 07a844b3abb..b6b1b2a6b3d 100644
--- a/TAO/tests/RTCORBA/Private_Connection/server.cpp
+++ b/TAO/tests/RTCORBA/Private_Connection/server.cpp
@@ -5,6 +5,7 @@
#include "tao/RTPortableServer/RTPortableServer.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
class Test_i : public POA_Test
{
@@ -56,7 +57,7 @@ const char *ior_output_file2 = "test2.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:p:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:p:");
int c;
while ((c = get_opts ()) != -1)
@@ -124,7 +125,7 @@ create_object (PortableServer::POA_ptr poa,
// Print ior to the file.
if (filename != 0)
{
- FILE *output_file= ACE_OS::fopen (filename, "w");
+ FILE *output_file= ACE_OS::fopen (filename, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -138,17 +139,19 @@ create_object (PortableServer::POA_ptr poa,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// RootPOA.
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc
index 4d9a96b12f0..81a533380b3 100644
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc
+++ b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc
@@ -6,7 +6,6 @@ project(*Server): rt_server, strategies, portableserver, minimum_corba {
}
project(*Client): rt_client, strategies, portableserver, minimum_corba {
- after += *Server
Source_Files {
client.cpp
}
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp
index 61acf71eab9..854d6424214 100644
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp
+++ b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp
@@ -16,6 +16,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/Strategies/advanced_resource.h"
@@ -36,7 +37,7 @@ static const char *bands_file = "empty_file";
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "b:d:i:k:p:t:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "b:d:i:k:p:t:x");
int c;
while ((c = get_opts ()) != -1)
@@ -559,21 +560,23 @@ Task::svc (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int parse_args_result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (parse_args_result != 0)
return parse_args_result;
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl
index a58c5f6427c..bfc0b0ebaef 100755
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl
+++ b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl
@@ -98,7 +98,7 @@ sub run_server
$SV = new PerlACE::Process ("server", "$server_args");
$SV->Spawn ();
- if (PerlACE::waitforfile_timed ($iorfile,$PerlACE::wait_interval_for_process_creation ) == -1)
+ if (PerlACE::waitforfile_timed ($iorfile, 10) == -1)
{
check_supported_priorities ($SV);
print STDERR "ERROR: cannot find ior file: $iorfile\n";
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp
index 234e6d3ef58..45f83161426 100644
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp
+++ b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "tao/RTCORBA/Thread_Pool.h"
#include "tao/RTPortableServer/RTPortableServer.h"
@@ -98,7 +99,7 @@ test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "b:d:l:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "b:d:l:o:");
int c;
while ((c = get_opts ()) != -1)
@@ -151,7 +152,7 @@ write_iors_to_file (CORBA::Object_ptr object,
ior_file_count++;
FILE *file =
- ACE_OS::fopen (filename, "w");
+ ACE_OS::fopen (filename, ACE_TEXT("w"));
ACE_ASSERT (file != 0);
CORBA::String_var ior =
@@ -390,19 +391,21 @@ Task::svc (void)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/RTMutex/server.cpp b/TAO/tests/RTCORBA/RTMutex/server.cpp
index 425db1603fb..ea53f988992 100644
--- a/TAO/tests/RTCORBA/RTMutex/server.cpp
+++ b/TAO/tests/RTCORBA/RTMutex/server.cpp
@@ -6,6 +6,7 @@
#include "ace/High_Res_Timer.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
static int test_try_lock_flag =
#if defined (ACE_HAS_MUTEX_TIMEOUTS) && !defined (ACE_HAS_WTHREADS)
@@ -23,7 +24,7 @@ static int test_try_lock_flag =
static int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "t");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "t");
int c;
while ((c = get_opts ()) != -1)
@@ -498,16 +499,18 @@ test_mutex_try_lock (RTCORBA::RTORB_ptr rt_orb)
#endif /* ACE_HAS_THREADS */
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// RTORB.
diff --git a/TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc b/TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc
index b62ff14a3d9..78e08a31786 100644
--- a/TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc
+++ b/TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc
@@ -8,7 +8,6 @@ project(*Server): rt_server {
}
project(*Client): rt_client {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Server_Declared/client.cpp b/TAO/tests/RTCORBA/Server_Declared/client.cpp
index 9ac3ce834d6..e8d5090c754 100644
--- a/TAO/tests/RTCORBA/Server_Declared/client.cpp
+++ b/TAO/tests/RTCORBA/Server_Declared/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTCORBA/RTCORBA.h"
const char *ior1 = "file://test1.ior";
@@ -10,7 +11,7 @@ const char *ior2 = "file://test2.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "p:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "p:o:");
int c;
while ((c = get_opts ()) != -1)
@@ -77,19 +78,21 @@ check_policy (Test_ptr server
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize the ORB, resolve references and parse arguments.
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// Test object 1.
diff --git a/TAO/tests/RTCORBA/Server_Declared/server.cpp b/TAO/tests/RTCORBA/Server_Declared/server.cpp
index 6594427f846..adb805bb7df 100644
--- a/TAO/tests/RTCORBA/Server_Declared/server.cpp
+++ b/TAO/tests/RTCORBA/Server_Declared/server.cpp
@@ -4,6 +4,7 @@
#include "ace/Get_Opt.h"
#include "tao/ORB_Core.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/RTPortableServer/RTPortableServer.h"
#include "../check_supported_priorities.cpp"
@@ -87,7 +88,7 @@ CORBA::Short object_priority = -1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "p:o:a:b:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "p:o:a:b:");
int c, result;
while ((c = get_opts ()) != -1)
@@ -191,7 +192,7 @@ create_object (RTPortableServer::POA_ptr poa,
// Print ior to the file.
if (filename != 0)
{
- FILE *output_file= ACE_OS::fopen (filename, "w");
+ FILE *output_file= ACE_OS::fopen (filename, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -325,17 +326,19 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
// Make sure we can support multiple priorities that are required
diff --git a/TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc b/TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc
index a77351b5090..10ba9a8a48f 100644
--- a/TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc
+++ b/TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc
@@ -8,7 +8,6 @@ project(*Server): strategies, rt_server, minimum_corba {
}
project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Server_Protocol/client.cpp b/TAO/tests/RTCORBA/Server_Protocol/client.cpp
index 7dd24cdb9b5..71c63370691 100644
--- a/TAO/tests/RTCORBA/Server_Protocol/client.cpp
+++ b/TAO/tests/RTCORBA/Server_Protocol/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTCORBA/RTCORBA.h"
#include "tao/Strategies/advanced_resource.h"
@@ -10,7 +11,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -33,16 +34,18 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize and obtain reference to the Test object.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
CORBA::Object_var object =
diff --git a/TAO/tests/RTCORBA/Server_Protocol/run_test.pl b/TAO/tests/RTCORBA/Server_Protocol/run_test.pl
index 8921a85c6ec..6e1cafa833b 100755
--- a/TAO/tests/RTCORBA/Server_Protocol/run_test.pl
+++ b/TAO/tests/RTCORBA/Server_Protocol/run_test.pl
@@ -79,7 +79,7 @@ foreach $o (@server_opts) {
$SV->Spawn ();
- if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+ if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
exit 1;
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server.cpp b/TAO/tests/RTCORBA/Server_Protocol/server.cpp
index 5ca5342d11e..459bb286b5a 100644
--- a/TAO/tests/RTCORBA/Server_Protocol/server.cpp
+++ b/TAO/tests/RTCORBA/Server_Protocol/server.cpp
@@ -7,6 +7,7 @@
#include "tao/ORB_Core.h"
#include "tao/Policy_Set.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/PortableServer/Root_POA.h"
class Test_i : public POA_Test
@@ -50,7 +51,7 @@ CORBA::ULong protocol_type = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:p:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:p:");
int c, result;
while ((c = get_opts ()) != -1)
@@ -240,15 +241,17 @@ check_server_protocol_at_root_poa (CORBA::ORB_ptr /*orb*/,
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
CORBA::Object_var object =
@@ -340,7 +343,7 @@ main (int argc, char *argv[])
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc b/TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc
index ebf79370785..4cb4bcb6c23 100644
--- a/TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc
+++ b/TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc
@@ -9,7 +9,6 @@ project(*Server): strategies, rt_server, minimum_corba {
}
project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/RTCORBA/Thread_Pool/client.cpp b/TAO/tests/RTCORBA/Thread_Pool/client.cpp
index 727015a2353..5797909b3e5 100644
--- a/TAO/tests/RTCORBA/Thread_Pool/client.cpp
+++ b/TAO/tests/RTCORBA/Thread_Pool/client.cpp
@@ -6,6 +6,7 @@
#include "tao/ORB_Core.h"
#include "ace/Task.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
#include "../check_supported_priorities.cpp"
ACE_RCSID(Thread_Pool, client, "$Id$")
@@ -17,7 +18,7 @@ int shutdown_server = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "xk:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -118,16 +119,18 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/Thread_Pool/run_test.pl b/TAO/tests/RTCORBA/Thread_Pool/run_test.pl
index 2dcbc7246bf..df32e821eef 100755
--- a/TAO/tests/RTCORBA/Thread_Pool/run_test.pl
+++ b/TAO/tests/RTCORBA/Thread_Pool/run_test.pl
@@ -72,7 +72,7 @@ $SV->Spawn ();
for $test (@configurations)
{
- if (PerlACE::waitforfile_timed ($test->{file}, $PerlACE::wait_interval_for_process_creation) == -1)
+ if (PerlACE::waitforfile_timed ($test->{file}, 10) == -1)
{
$server = $SV->TimedWait (1);
if ($server == 2)
diff --git a/TAO/tests/RTCORBA/Thread_Pool/server.cpp b/TAO/tests/RTCORBA/Thread_Pool/server.cpp
index 5dd811de9bd..f652cb7c279 100644
--- a/TAO/tests/RTCORBA/Thread_Pool/server.cpp
+++ b/TAO/tests/RTCORBA/Thread_Pool/server.cpp
@@ -5,6 +5,7 @@
#include "ace/OS_NS_unistd.h"
#include "tao/ORB_Core.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTPortableServer/RTPortableServer.h"
#include "../check_supported_priorities.cpp"
@@ -19,7 +20,7 @@ long nap_time = 1000;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:s:d:t:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:s:d:t:");
int c;
while ((c = get_opts ()) != -1)
@@ -76,7 +77,7 @@ write_ior_to_file (CORBA::ORB_ptr orb,
FILE *output_file =
ACE_OS::fopen (filename,
- "w");
+ ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -329,19 +330,21 @@ Task::svc (void)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/RTCORBA/common_args.cpp b/TAO/tests/RTCORBA/common_args.cpp
index 3085aa72bcb..73d51851c4e 100644
--- a/TAO/tests/RTCORBA/common_args.cpp
+++ b/TAO/tests/RTCORBA/common_args.cpp
@@ -20,7 +20,7 @@ get_priority_bands (const char *test_type,
// Read bands from a file.
//
FILE* file =
- ACE_OS::fopen (bands_file, "r");
+ ACE_OS::fopen (bands_file, ACE_TEXT("r"));
if (file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -119,7 +119,7 @@ get_values (const char *test_type,
// Read lanes from a file.
//
FILE* file =
- ACE_OS::fopen (file_name, "r");
+ ACE_OS::fopen (file_name, ACE_TEXT("r"));
if (file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/RTScheduling/Current/Thread_Task.cpp b/TAO/tests/RTScheduling/Current/Thread_Task.cpp
index a12629ada7b..ecbe671a9b8 100644
--- a/TAO/tests/RTScheduling/Current/Thread_Task.cpp
+++ b/TAO/tests/RTScheduling/Current/Thread_Task.cpp
@@ -4,13 +4,9 @@
#include "ace/OS_NS_errno.h"
#include "ace/OS_NS_unistd.h"
-Thread_Task::Thread_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
int
-Thread_Task::activate_task (int thr_count)
+Thread_Task::activate_task (CORBA::ORB_ptr orb,
+ int thr_count)
{
ACE_TRY_NEW_ENV
@@ -25,11 +21,13 @@ Thread_Task::activate_task (int thr_count)
active_thread_count_ = thr_count;
- CORBA::Object_var current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current"
+ this->orb_ = CORBA::ORB::_duplicate (orb);
+
+ CORBA::Object_ptr current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- this->current_ = RTScheduling::Current::_narrow (current_obj.in ()
+ this->current_ = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -138,7 +136,7 @@ Thread_Task::svc (void)
ACE_TRY_CHECK;
- RTScheduling::Current::NameList_var segment_name_list =
+ RTScheduling::Current::NameList* segment_name_list =
this->current_->current_scheduling_segment_names (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/RTScheduling/Current/Thread_Task.h b/TAO/tests/RTScheduling/Current/Thread_Task.h
index a6ae16092a1..56d29e51ca0 100644
--- a/TAO/tests/RTScheduling/Current/Thread_Task.h
+++ b/TAO/tests/RTScheduling/Current/Thread_Task.h
@@ -10,9 +10,9 @@
class Thread_Task : public ACE_Task <ACE_SYNCH>
{
public:
- Thread_Task (CORBA::ORB_ptr orb);
- int activate_task (int thr_count);
+ int activate_task (CORBA::ORB_ptr orb,
+ int thr_count);
~Thread_Task (void);
diff --git a/TAO/tests/RTScheduling/Current/run_test.pl b/TAO/tests/RTScheduling/Current/run_test.pl
index 0b4a6b57f9d..b8673381da4 100755
--- a/TAO/tests/RTScheduling/Current/run_test.pl
+++ b/TAO/tests/RTScheduling/Current/run_test.pl
@@ -19,7 +19,7 @@ else {
print STDERR "Starting Current Test\n";
-$test = $CL->SpawnWaitKill ($PerlACE::wait_interval_for_process_creation);
+$test = $CL->SpawnWaitKill (10);
if ($test != 0) {
print STDERR "ERROR: test returned $test\n";
diff --git a/TAO/tests/RTScheduling/Current/test.cpp b/TAO/tests/RTScheduling/Current/test.cpp
index ffcf6dbf8a3..cbc7a8592ac 100644
--- a/TAO/tests/RTScheduling/Current/test.cpp
+++ b/TAO/tests/RTScheduling/Current/test.cpp
@@ -3,24 +3,27 @@
#include "Thread_Task.h"
#include "../Scheduler.h"
#include "tao/RTScheduling/RTScheduler_Manager.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char* argv [])
+ACE_TMAIN (int argc, ACE_TCHAR* argv [])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
+ CORBA::Object_ptr manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
+ TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -28,9 +31,10 @@ main (int argc, char* argv [])
manager->rtscheduler (&scheduler);
- Thread_Task task (orb.in ());
+ Thread_Task task;
- task.activate_task (4);
+ task.activate_task (orb.in (),
+ 4);
orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h b/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
index 556e23bd2f9..137bcc7126a 100644
--- a/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
+++ b/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
@@ -5,12 +5,11 @@
#include "tao/RTScheduling/RTScheduler.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
-#include "ace/SString.h"
class Data
{
public:
- ACE_CString data;
+ char* data;
RTScheduling::Current_var current;
};
@@ -41,7 +40,7 @@ Test_Thread_Action::_cxx_do (CORBA::VoidData data
Data* tmp = (Data*) data;
ACE_DEBUG ((LM_DEBUG,
"Test_Thread_Action::do %s\n",
- tmp->data.c_str ()));
+ tmp->data));
size_t count = 0;
ACE_OS::memcpy (&count,
@@ -52,7 +51,7 @@ Test_Thread_Action::_cxx_do (CORBA::VoidData data
"The spawned DT Guid is %d\n",
count));
- RTScheduling::Current::NameList_var segment_name_list =
+ RTScheduling::Current::NameList* segment_name_list =
tmp->current->current_scheduling_segment_names (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
@@ -64,6 +63,6 @@ Test_Thread_Action::_cxx_do (CORBA::VoidData data
{
ACE_DEBUG ((LM_DEBUG,
"%s\n",
- (*segment_name_list) [i].in ()));
+ CORBA::string_dup ((*segment_name_list) [i])));
}
}
diff --git a/TAO/tests/RTScheduling/DT_Spawn/run_test.pl b/TAO/tests/RTScheduling/DT_Spawn/run_test.pl
index bd859750add..6d0b579fe3b 100755
--- a/TAO/tests/RTScheduling/DT_Spawn/run_test.pl
+++ b/TAO/tests/RTScheduling/DT_Spawn/run_test.pl
@@ -19,7 +19,7 @@ else {
print STDERR "Starting Current Test\n";
-$test = $CL->SpawnWaitKill ($PerlACE::wait_interval_for_process_creation);
+$test = $CL->SpawnWaitKill (10);
if ($test != 0) {
print STDERR "ERROR: test returned $test\n";
diff --git a/TAO/tests/RTScheduling/DT_Spawn/test.cpp b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
index fab57bcd8ce..2f73288cd1a 100644
--- a/TAO/tests/RTScheduling/DT_Spawn/test.cpp
+++ b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
@@ -5,10 +5,13 @@
#include "Thread_Action.h"
#include "ace/Thread_Manager.h"
#include "ace/SString.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char* argv [])
+ACE_TMAIN (int argc, ACE_TCHAR* argv [])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
CORBA::ORB_var orb;
RTScheduling::Current_var current;
@@ -20,17 +23,17 @@ main (int argc, char* argv [])
ACE_TRY_NEW_ENV
{
- orb = CORBA::ORB_init (argc,
- argv,
+ orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
+ CORBA::Object_ptr manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
+ TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -38,15 +41,14 @@ main (int argc, char* argv [])
ACE_NEW_RETURN (scheduler,
TAO_Scheduler (orb.in ()),
-1);
- RTScheduling::Scheduler_var safe_scheduler = scheduler;
-
+
manager->rtscheduler (scheduler);
- CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"
+ CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- current = RTScheduling::Current::_narrow (current_obj.in ()
+ current = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -99,12 +101,11 @@ main (int argc, char* argv [])
//Initialize data to be passed to the Thread_Action::do method
Data spawn_data;
- spawn_data.data = "Harry Potter";
+ spawn_data.data = CORBA::string_dup ("Harry Potter");
spawn_data.current = RTScheduling::Current::_duplicate (current.in ());
ACE_DEBUG ((LM_DEBUG,
"Spawning a new DT...\n"));
- RTScheduling::DistributableThread_var dt =
current->spawn (&thread_action,
&spawn_data,
"Chamber of Secrets",
diff --git a/TAO/tests/RTScheduling/Scheduler.cpp b/TAO/tests/RTScheduling/Scheduler.cpp
index 885e7ba2fd7..31e4d368509 100644
--- a/TAO/tests/RTScheduling/Scheduler.cpp
+++ b/TAO/tests/RTScheduling/Scheduler.cpp
@@ -3,16 +3,17 @@
#include "Scheduler.h"
#include "tao/ORB.h"
#include "ace/Atomic_Op.h"
+#include "ace/Argv_Type_Converter.h"
#include "tao/RTScheduling/Request_Interceptor.h"
TAO_Scheduler::TAO_Scheduler (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
{
- CORBA::Object_var current_obj =
+ CORBA::Object_ptr current_obj =
orb->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- current_ = RTScheduling::Current::_narrow (current_obj.in ()
+ current_ = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
@@ -145,14 +146,23 @@ TAO_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr reque
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
- IOP::ServiceContext_var serv_cxt;
+ IOP::ServiceContext* serv_cxt = 0;
ACE_TRY
{
serv_cxt = request_info->get_request_service_context (Server_Interceptor::SchedulingInfo
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Invalid Service Context\n"));
+ }
+ ACE_ENDTRY;
+ if (serv_cxt != 0)
+ {
size_t gu_id;
ACE_OS::memcpy (&gu_id,
serv_cxt->context_data.get_buffer (),
@@ -173,12 +183,6 @@ TAO_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr reque
guid_out.ptr () = guid;
}
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG,
- "Invalid Service Context\n"));
- }
- ACE_ENDTRY;
}
void
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc b/TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc
index a9fce2cd532..08e00e4c333 100644
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc
+++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc
@@ -9,7 +9,6 @@ project(*Server): rtscheduling_server {
}
project(*Client) : rtscheduling_client {
- after += *Server
Source_Files {
../Scheduler.cpp
testC.cpp
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl b/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl
index 2e3bec9cb61..2f3e20805c6 100755
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl
+++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl
@@ -28,7 +28,7 @@ print STDERR "Starting Server\n";
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill ();
exit 1;
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
index 14c947939fb..81c167219a1 100644
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
+++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
@@ -3,16 +3,17 @@
#include "tao/RTScheduling/RTScheduler_Manager.h"
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "ace/SString.h"
ACE_CString ior = "file://test.ior";
int
parse_args (int argc,
- ACE_TCHAR* argv [])
+ char* argv [])
{
// Parse command line arguments
- ACE_Get_Opt opts (argc, argv, "f:");
+ ACE_Get_Arg_Opt<char> opts (argc, argv, "f:");
int c;
while ((c= opts ()) != -1)
@@ -21,7 +22,7 @@ parse_args (int argc,
{
case 'f':
ior = "file://";
- ior += opts.opt_arg ();
+ ior += ACE_TEXT_TO_CHAR_IN(opts.opt_arg ());
break;
default:
ACE_DEBUG ((LM_DEBUG, "Unknown Option\n"));
@@ -31,44 +32,40 @@ parse_args (int argc,
return 0;
}
-#if defined (THREAD_CANCELLED)
+#if defined (ACE_HAS_PREDEFINED_THREAD_CANCELLED_MACRO)
#undef THREAD_CANCELLED
-#endif /* THREAD_CANCELLED */
+#endif /* ACE_HAS_PREDEFINED_THREAD_CANCELLED_MACRO */
int
-main (int argc, char* argv [])
+ACE_TMAIN (int argc, ACE_TCHAR* argv [])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
CORBA::ORB_var orb;
test_var server;
- RTScheduling::Scheduler_var safe_scheduler;
-
ACE_TRY_NEW_ENV
{
- orb = CORBA::ORB_init (argc,
- argv,
+ orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) == -1)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return (-1);
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
+ CORBA::Object_ptr manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
+ TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- TAO_Scheduler* scheduler;
- ACE_NEW_RETURN (scheduler,
- TAO_Scheduler (orb.in ()),
- -1);
- safe_scheduler = scheduler;
+ TAO_Scheduler scheduler (orb.in ());
- manager->rtscheduler (scheduler);
+ manager->rtscheduler (&scheduler);
CORBA::Object_var object =
@@ -88,11 +85,11 @@ main (int argc, char* argv [])
1);
}
- CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"
+ CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj.in ()
+ RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
index 73e333552ca..34a8a5f485e 100644
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
+++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
@@ -4,7 +4,9 @@
#include "tao/RTScheduling/RTScheduler_Manager.h"
#include "testS.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
const char* filename = "test.ior";
@@ -60,10 +62,10 @@ private:
int
parse_args (int argc,
- ACE_TCHAR* argv [])
+ char* argv [])
{
// Parse command line arguments
- ACE_Get_Opt opts (argc, argv, "f:");
+ ACE_Get_Arg_Opt<char> opts (argc, argv, "f:");
int c;
while ((c= opts ()) != -1)
@@ -82,18 +84,20 @@ parse_args (int argc,
}
int
-main (int argc, char* argv[])
+ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
CORBA::Object_var object =
orb->resolve_initial_references ("RootPOA"
@@ -112,11 +116,11 @@ main (int argc, char* argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"
+ CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj.in ()
+ RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -155,11 +159,11 @@ main (int argc, char* argv[])
"IOR = %s\n",
ior.in ()));
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
+ CORBA::Object_ptr manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
+ TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -169,7 +173,7 @@ main (int argc, char* argv[])
// Print ior to the file.
if (filename != 0)
{
- FILE* output_file = ACE_OS::fopen (filename, "w");
+ FILE* output_file = ACE_OS::fopen (filename, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
index 9ad3f1430d0..97b36cd3e73 100644
--- a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
+++ b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
@@ -29,11 +29,11 @@ Thread_Task::activate_task (CORBA::ORB_ptr orb)
this->orb_ = CORBA::ORB::_duplicate (orb);
- CORBA::Object_var current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current"
+ CORBA::Object_ptr current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- this->current_ = RTScheduling::Current::_narrow (current_obj.in ()
+ this->current_ = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
@@ -58,9 +58,9 @@ Thread_Task::activate_task (CORBA::ORB_ptr orb)
return 0;
}
-#if defined (THREAD_CANCELLED)
+#if defined (ACE_HAS_PREDEFINED_THREAD_CANCELLED_MACRO)
#undef THREAD_CANCELLED
-#endif /* THREAD_CANCELLED */
+#endif /* ACE_HAS_PREDEFINED_THREAD_CANCELLED_MACRO */
int
Thread_Task::svc (void)
@@ -102,7 +102,7 @@ Thread_Task::svc (void)
{
ACE_GUARD_RETURN (ACE_Lock, ace_mon, *shutdown_lock_,-1);
- RTScheduling::Current::NameList_var name_list = this->current_->current_scheduling_segment_names (ACE_ENV_SINGLE_ARG_PARAMETER);
+ RTScheduling::Current::NameList* name_list = this->current_->current_scheduling_segment_names (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
index 42a390c4b01..1accc821d78 100644
--- a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
+++ b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
@@ -5,24 +5,27 @@
#include "../Scheduler.h"
#include "tao/RTScheduling/RTScheduler_Manager.h"
#include "tao/ORB_Core.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char* argv [])
+ACE_TMAIN (int argc, ACE_TCHAR* argv [])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
+ CORBA::Object_ptr manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
+ TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
@@ -44,11 +47,11 @@ main (int argc, char* argv [])
ACE_DEBUG ((LM_DEBUG,
"Cancelling Threads.....\n"));
- CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"
+ CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj.in ()
+ RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/RTScheduling/VoidData/test.h b/TAO/tests/RTScheduling/VoidData/test.h
index ae4181971a9..eebc6831b49 100644
--- a/TAO/tests/RTScheduling/VoidData/test.h
+++ b/TAO/tests/RTScheduling/VoidData/test.h
@@ -11,7 +11,7 @@ class test_impl :public test
{
ACE_DEBUG ((LM_DEBUG,
"Void Data Passed to method %d\n",
- *(int*)something));
+ (int*)something));
}
};
diff --git a/TAO/tests/RTScheduling/VoidData/test_client.cpp b/TAO/tests/RTScheduling/VoidData/test_client.cpp
index 087080ddbba..a23809b233b 100644
--- a/TAO/tests/RTScheduling/VoidData/test_client.cpp
+++ b/TAO/tests/RTScheduling/VoidData/test_client.cpp
@@ -2,22 +2,30 @@
#include "tao/RTScheduling/RTScheduler.h"
#include "testC.h"
#include "test.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char* argv [])
+ACE_TMAIN (int argc, ACE_TCHAR* argv [])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
CORBA::ORB_var orb;
ACE_TRY_NEW_ENV
{
- orb = CORBA::ORB_init (argc,
- argv,
+ orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- test_impl foo_i;
+ test_ptr foo_i;
+
+ ACE_NEW_RETURN (foo_i,
+ test_impl,
+ -1);
+
int something = 28;
- foo_i.bar ((CORBA::VoidData) &something);
+ foo_i->bar ((CORBA::VoidData) &something);
}
ACE_CATCHANY
{
diff --git a/TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc b/TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc
index 2141f3040f5..c7d61fe00e7 100644
--- a/TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc
+++ b/TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc
@@ -10,7 +10,6 @@ project(*Server): taoserver, messaging {
}
project(*Client): messaging, taoexe, portableserver {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Reliable_Oneways/client.cpp b/TAO/tests/Reliable_Oneways/client.cpp
index 259e1be4ea6..409878116e0 100644
--- a/TAO/tests/Reliable_Oneways/client.cpp
+++ b/TAO/tests/Reliable_Oneways/client.cpp
@@ -5,6 +5,7 @@
#include "tao/AnyTypeCode/Any.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_sys_time.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Reliable_Oneways, client, "$Id$")
@@ -26,7 +27,7 @@ int failed_calls = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:ntsr");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:ntsr");
int c;
while ((c = get_opts ()) != -1)
@@ -81,15 +82,17 @@ void run_test_sync_none (Test::Oneway_Receiver_ptr oneway_receiver
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Reliable_Oneways/server.cpp b/TAO/tests/Reliable_Oneways/server.cpp
index a278c9a515b..7b12832e874 100644
--- a/TAO/tests/Reliable_Oneways/server.cpp
+++ b/TAO/tests/Reliable_Oneways/server.cpp
@@ -3,6 +3,7 @@
#include "Oneway_Receiver.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Reliable_Oneways, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Oneway_Receiver *oneway_receiver_impl;
@@ -78,7 +81,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp b/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp
index 031694cff9a..3cc70a8306f 100644
--- a/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp
@@ -18,7 +18,7 @@ struct Foo
CORBA::ULong const TEST_INT_MAX = 32;
CORBA::ULong const TEST_FOO_MAX = 64;
-int main(int,char*[])
+int ACE_TMAIN(int,ACE_TCHAR*[])
{
typedef TAO::bounded_value_sequence<int,TEST_INT_MAX> int_sequence;
diff --git a/TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp b/TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp
index 856bdf4798d..97288ba1bfb 100644
--- a/TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp
@@ -13,7 +13,7 @@
CORBA::ULong const MAXIMUM = 42;
typedef TAO::bounded_string_sequence<MAXIMUM> s_sequence;
-int main(int,char*[])
+int ACE_TMAIN(int,ACE_TCHAR*[])
{
s_sequence a;
s_sequence b(a);
diff --git a/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc b/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc
index 6ea3c96afaf..293d9655ecd 100644
--- a/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc
+++ b/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc
@@ -1,19 +1,13 @@
// -*- MPC -*-
// $Id$
-project(*UB_Simple_Types) : taoexe {
+project(*Unbounded_Simple_Types) : taoexe {
Source_Files {
Unbounded_Simple_Types.cpp
}
}
-project(*Unbounded_Octet) : taoexe {
- Source_Files {
- Unbounded_Octet.cpp
- }
-}
-
-project(*B_Simple_Types) : taoexe {
+project(*Bounded_Simple_Types) : taoexe {
Source_Files {
Bounded_Simple_Types.cpp
}
@@ -31,7 +25,7 @@ project(*Bounded_String) : taoexe {
}
}
-project(*Obj_Ref_Seq_Elem): taoexe, boost_unit_test_framework {
+project(*Object_Reference_Sequence_Element): taoexe, boost_unit_test_framework {
exename = object_reference_sequence_element_ut
Source_Files {
mock_reference.cpp
@@ -39,7 +33,7 @@ project(*Obj_Ref_Seq_Elem): taoexe, boost_unit_test_framework {
}
}
-project(*UB_Obj_Ref_Seq): taoexe, boost_unit_test_framework {
+project(*Unbounded_Object_Reference_Sequence): taoexe, boost_unit_test_framework {
exename = unbounded_object_reference_sequence_ut
Source_Files {
mock_reference.cpp
@@ -47,49 +41,7 @@ project(*UB_Obj_Ref_Seq): taoexe, boost_unit_test_framework {
}
}
-project(*UB_Sequence_CDR): taoexe, boost_unit_test_framework {
- exename = unbounded_sequence_cdr_ut
- Source_Files {
- mock_reference.cpp
- mock_stream.cpp
- unbounded_sequence_cdr_ut.cpp
- }
-}
-
-project(*B_Sequence_CDR): taoexe, boost_unit_test_framework {
- exename = bounded_sequence_cdr_ut
- Source_Files {
- mock_reference.cpp
- mock_stream.cpp
- bounded_sequence_cdr_ut.cpp
- }
-}
-
-project(*UB_Fwd_Ob_Ref_Seq): taoexe, boost_unit_test_framework {
- exename = unbounded_fwd_object_reference_sequence_ut
- Source_Files {
- fwd_mock_reference.cpp
- unbounded_fwd_object_reference_sequence_ut.cpp
- }
-}
-
-project(*UB_Octet_Sequence): taoexe, boost_unit_test_framework {
- exename = unbounded_octet_sequence_ut
- Source_Files {
- mock_reference.cpp
- unbounded_octet_sequence_ut.cpp
- }
-}
-
-project(*UB_Oct_Seq_No_Cpy): taoexe, boost_unit_test_framework {
- exename = unbounded_octet_sequence_no_copy_ut
- Source_Files {
- mock_reference.cpp
- unbounded_octet_sequence_nocopy_ut.cpp
- }
-}
-
-project(*B_Obj_Ref_Seq): taoexe, boost_unit_test_framework {
+project(*Bounded_Object_Reference_Sequence): taoexe, boost_unit_test_framework {
exename = bounded_object_reference_sequence_ut
Source_Files {
mock_reference.cpp
@@ -97,42 +49,42 @@ project(*B_Obj_Ref_Seq): taoexe, boost_unit_test_framework {
}
}
-project(*String_Seq_Elem): taoexe, boost_unit_test_framework {
+project(*String_Sequence_Element): taoexe, boost_unit_test_framework {
exename = string_sequence_element_ut
Source_Files {
string_sequence_element_ut.cpp
}
}
-project(*UB_String_Seq): taoexe, boost_unit_test_framework {
+project(*Unbounded_String_Sequence): taoexe, boost_unit_test_framework {
exename = unbounded_string_sequence_ut
Source_Files {
unbounded_string_sequence_ut.cpp
}
}
-project(*B_String_Seq): taoexe, boost_unit_test_framework {
+project(*Bounded_String_Sequence): taoexe, boost_unit_test_framework {
exename = bounded_string_sequence_ut
Source_Files {
bounded_string_sequence_ut.cpp
}
}
-project(*Test_Alloc_Traits): taoexe, boost_unit_test_framework {
+project(*Testing_Allocation_Traits): taoexe, boost_unit_test_framework {
exename = testing_allocation_traits_ut
Source_Files {
testing_allocation_traits_ut.cpp
}
}
-project(*UB_Value_Sequence): taoexe, boost_unit_test_framework {
+project(*Unbounded_Value_Sequence): taoexe, boost_unit_test_framework {
exename = unbounded_value_sequence_ut
Source_Files {
unbounded_value_sequence_ut.cpp
}
}
-project(*B_Value_Sequence): taoexe, boost_unit_test_framework {
+project(*Bounded_Value_Sequence): taoexe, boost_unit_test_framework {
exename = bounded_value_sequence_ut
Source_Files {
bounded_value_sequence_ut.cpp
diff --git a/TAO/tests/Sequence_Unit_Tests/Unbounded_Octet.cpp b/TAO/tests/Sequence_Unit_Tests/Unbounded_Octet.cpp
deleted file mode 100644
index a54b22a0dcf..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/Unbounded_Octet.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * @file
- *
- * @brief Smoke test (basically just compile) the unbounded sequences
- * for octets.
- *
- * $Id$
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-#include "tao/Basic_Types.h"
-#include "unbounded_octet_sequence.hpp"
-
-typedef TAO::unbounded_value_sequence <CORBA::Octet> s_sequence;
-
-int main(int,char*[])
-{
- s_sequence a;
- s_sequence b(23);
-
- s_sequence c(32, 0, s_sequence::allocbuf(32), true);
- a = b;
-
- a.length(c.maximum());
- if (a.release())
- {
- b.length(a.length());
- }
- a[0] = 'a';
- b[0] = a[0];
-
- s_sequence const & d = a;
- c[0] = d[0];
-
- b.replace(64, 0, s_sequence::allocbuf(64), true);
-
- CORBA::Octet const * x = d.get_buffer();
- if (x != 0)
- {
- s_sequence::freebuf(a.get_buffer(true));
- }
- x = b.get_buffer();
-
- if (d.length())
- {
- s_sequence::freebuf(s_sequence::allocbuf(64));
- }
-
- s_sequence e(c);
-
- return 0;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp b/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp
index 77e1c588c73..691227f5716 100644
--- a/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp
@@ -15,7 +15,7 @@ struct Foo
int x;
};
-int main(int,char*[])
+int ACE_TMAIN(int,ACE_TCHAR*[])
{
typedef TAO::unbounded_value_sequence<int> int_sequence;
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_basic_string_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_basic_string_sequence.hpp
index 8225e59f89a..08ddd2e618f 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_basic_string_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_basic_string_sequence.hpp
@@ -14,8 +14,6 @@
#include "generic_sequence.hpp"
#include "string_sequence_element.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -101,5 +99,4 @@ private:
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_bounded_basic_string_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence.hpp
index 184b8f7df6a..4e5c4518fe8 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence.hpp
@@ -14,21 +14,18 @@
#include "generic_sequence.hpp"
#include "object_reference_sequence_element.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
-template<typename object_t, typename object_t_var, CORBA::ULong MAX>
+template<typename object_t, CORBA::ULong MAX>
class bounded_object_reference_sequence
{
public:
typedef object_t object_type;
typedef object_type * value_type;
typedef object_type const * const_value_type;
- typedef object_t_var object_type_var;
- typedef details::object_reference_traits<object_type,object_type_var,true> element_traits;
+ typedef details::object_reference_traits<object_type,true> element_traits;
typedef details::bounded_reference_allocation_traits<value_type,element_traits,MAX,true> allocation_traits;
typedef details::object_reference_sequence_element<element_traits> element_type;
@@ -98,5 +95,4 @@ private:
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_bounded_object_reference_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp
index 27618373268..348334a9fd8 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp
@@ -21,13 +21,13 @@
#include <boost/weak_ptr.hpp>
using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
+using namespace TAO;
CORBA::ULong const TMAX = 64;
struct Tester
{
- typedef bounded_object_reference_sequence<mock_reference,mock_reference_var,TMAX> tested_sequence;
+ typedef bounded_object_reference_sequence<mock_reference,TMAX> tested_sequence;
typedef tested_sequence::value_type value_type;
typedef tested_sequence::const_value_type const_value_type;
@@ -396,15 +396,15 @@ private:
boost::weak_ptr<Tester> self_;
};
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("unbounded object reference sequence unit test"));
boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_reference_allocation_traits.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_reference_allocation_traits.hpp
index 193a6657f7a..5805e84a27b 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_reference_allocation_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_reference_allocation_traits.hpp
@@ -13,8 +13,6 @@
#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -60,5 +58,4 @@ struct bounded_reference_allocation_traits
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_bounded_reference_allocation_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr.hpp
deleted file mode 100644
index fba15efe71f..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef guard_bounded_sequence_cdr
-#define guard_bounded_sequence_cdr
-/**
- * @file
- *
- * @brief Extract the sequence
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- * @author Johnny Willemsen
- */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-namespace TAO {
- namespace details {
- template <typename stream, typename sequence>
- bool extract_bounded_sequence(stream & strm, sequence & target) {
- ::CORBA::ULong new_length;
- if (!(strm >> new_length)) {
- return false;
- }
- if (new_length > strm.length()) {
- return false;
- }
- if (new_length > target.maximum ()) {
- return false;
- }
- sequence tmp;
- tmp.length(new_length);
- typename sequence::value_type * buffer = tmp.get_buffer();
- for(CORBA::ULong i = 0; i < new_length; ++i) {
- if (!(strm >> buffer[i])) {
- return false;
- }
- }
- tmp.swap(target);
- return true;
- }
-
- template <typename stream, typename sequence>
- bool insert_bounded_sequence(stream & strm, const sequence & source) {
- const ::CORBA::ULong length = source.length ();
- if (!(strm << length)) {
- return false;
- }
- for(CORBA::ULong i = 0; i < length; ++i) {
- if (!(strm << source[i])) {
- return false;
- }
- }
- return true;
- }
- }
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif /* guard_bounded_sequence_cdr */
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp b/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp
deleted file mode 100644
index a600c585ce8..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for bounded sequences of object references.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_object_reference_traits.hpp"
-#include "object_reference_traits.hpp"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "mock_reference.hpp"
-#include "mock_stream.hpp"
-
-#include "bounded_object_reference_sequence.hpp"
-#include "bounded_sequence_cdr.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-CORBA::ULong const TMAX = 64;
-
-typedef bounded_object_reference_sequence<mock_reference, mock_reference_var,TMAX> tested_sequence;
-
-CORBA::Boolean operator<< (mock_stream &strm, const tested_sequence &sequence)
-{
- return TAO::details::insert_bounded_sequence(strm, sequence);
-}
-
-CORBA::Boolean operator>> (mock_stream &strm, tested_sequence &sequence)
-{
- return TAO::details::extract_bounded_sequence(strm, sequence);
-}
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = mock_reference::allocate(1);
- buf[1] = mock_reference::allocate(4);
- buf[2] = mock_reference::allocate(9);
- buf[3] = mock_reference::allocate(16);
-
- return buf;
- }
-
- void check_values(tested_sequence const & a)
- {
- BOOST_CHECK_EQUAL( 1, a[0]->id());
- BOOST_CHECK_EQUAL( 4, a[1]->id());
- BOOST_CHECK_EQUAL( 9, a[2]->id());
- BOOST_CHECK_EQUAL(16, a[3]->id());
- }
-
- void test_stream()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls s(mock_reference::serialize_calls);
- {
- tested_sequence a;
- a.replace(4, buffer, false);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(64), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
-
- mock_stream stream;
- stream << a;
- BOOST_CHECK_MESSAGE(s.expect(4), s);
- }
- tested_sequence::freebuf(buffer);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_stream,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence.hpp
index c42738744bc..afc33e73fb2 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence.hpp
@@ -12,8 +12,6 @@
#include "bounded_basic_string_sequence.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
@@ -37,5 +35,4 @@ public:
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_bounded_string_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp
index 2007046a08c..b3c14646fd1 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp
@@ -28,7 +28,7 @@
#include <sstream>
using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
+using namespace TAO;
CORBA::ULong const MAXIMUM = 32;
@@ -89,30 +89,6 @@ struct Tester
BOOST_CHECK(helper::compare(16, a[3]));
}
- void test_regression_2201()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- a.length (3);
- BOOST_CHECK_EQUAL(CORBA::ULong(3), a.length());
- a.length (4);
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK(helper::compare_empty(a[3]));
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
void test_buffer_constructor_default()
{
value_type * buffer = alloc_and_init_buffer();
@@ -268,7 +244,7 @@ struct Tester
{
value_type * buffer = alloc_and_init_buffer();
tested_sequence a(4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
+ BOOST_CHECK_EQUAL(static_cast<value_type*>(0), a.get_buffer(true));
tested_sequence::freebuf(buffer);
}
@@ -286,7 +262,6 @@ struct Tester
BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), b.maximum());
BOOST_CHECK_EQUAL(CORBA::ULong(0), b.length());
BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
BOOST_CHECK_MESSAGE(c.expect(0), c);
@@ -317,10 +292,6 @@ struct Tester
shared_this));
ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_regression_2201,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
&Tester::test_buffer_constructor_default,
shared_this));
ts->add(BOOST_CLASS_TEST_CASE(
@@ -367,25 +338,25 @@ private:
boost::weak_ptr<Tester> self_;
};
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("bounded string sequence unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("bounded string sequence unit test"));
{
typedef TAO::bounded_string_sequence<MAXIMUM> s_sequence;
typedef Tester<s_sequence> nTester;
boost::shared_ptr<nTester> tester(nTester::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
{
typedef TAO::bounded_wstring_sequence<MAXIMUM> w_sequence;
typedef Tester<w_sequence> wTester;
boost::shared_ptr<wTester> tester(wTester::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_value_allocation_traits.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_value_allocation_traits.hpp
index e7727f449de..00beac8a06b 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_value_allocation_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_value_allocation_traits.hpp
@@ -13,8 +13,6 @@
#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -55,5 +53,4 @@ struct bounded_value_allocation_traits
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_bounded_value_allocation_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence.hpp
index 994122e22ce..8f02e5df604 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence.hpp
@@ -1,5 +1,5 @@
-#ifndef guard_bounded_value_sequence_hpp
-#define guard_bounded_value_sequence_hpp
+#ifndef guard_unbounded_value_sequence_hpp
+#define guard_unbounded_value_sequence_hpp
/**
* @file
*
@@ -15,8 +15,6 @@
#include "value_traits.hpp"
#include "generic_sequence.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
@@ -24,8 +22,9 @@ template<class T, CORBA::ULong MAX>
class bounded_value_sequence
{
public:
+ // static CORBA::ULong const MAXIMUM = MAX;
+
typedef T value_type;
- typedef T element_type;
typedef T const const_value_type;
typedef details::bounded_value_allocation_traits<value_type,MAX,true> allocation_traits;
@@ -93,6 +92,4 @@ private:
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif // guard_bounded_string_sequence_hpp
+#endif // guard_unbounded_string_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp
index 87ccb341040..4cfa00aa292 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp
@@ -20,7 +20,7 @@
#include <boost/weak_ptr.hpp>
using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
+using namespace TAO;
CORBA::ULong const MAXIMUM = 32;
@@ -64,35 +64,6 @@ struct Tester
return buf;
}
- void test_regression_2201 ()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(32, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- a.length (3);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(3), a.length());
- a.length (4);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(int( 0), a[3]);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
void test_buffer_constructor_default()
{
value_type * buffer = alloc_and_init_buffer();
@@ -251,7 +222,7 @@ struct Tester
{
value_type * buffer = alloc_and_init_buffer();
tested_sequence a(4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
+ BOOST_CHECK_EQUAL(static_cast<int*>(0), a.get_buffer(true));
tested_sequence::freebuf(buffer);
}
@@ -268,7 +239,6 @@ struct Tester
BOOST_CHECK_EQUAL(MAXIMUM, b.maximum());
BOOST_CHECK_EQUAL(0UL, b.length());
BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
BOOST_CHECK_MESSAGE(c.expect(1), c);
@@ -291,10 +261,6 @@ struct Tester
shared_this));
ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_regression_2201,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
&Tester::test_buffer_constructor_default,
shared_this));
ts->add(BOOST_CLASS_TEST_CASE(
@@ -338,23 +304,23 @@ private:
boost::weak_ptr<Tester> self_;
};
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded value sequence unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("unbounded value sequence unit test"));
{
boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
{
typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common;
boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_wstring_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_wstring_sequence.hpp
index 8fff36ae5ea..f83938ce0d3 100644
--- a/TAO/tests/Sequence_Unit_Tests/bounded_wstring_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/bounded_wstring_sequence.hpp
@@ -10,11 +10,8 @@
* @author Carlos O'Ryan
*/
-
#include "bounded_basic_string_sequence.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
@@ -38,5 +35,4 @@ public:
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_bounded_wstring_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.cpp b/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.cpp
deleted file mode 100644
index 0dfe597f7a1..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * @file
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#include "fwd_mock_reference.hpp"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-fwd_mock_reference *
-TAO::Objref_Traits<fwd_mock_reference>::duplicate (
- fwd_mock_reference_ptr
- )
-{
- return 0;
-}
-
-void
-TAO::Objref_Traits<fwd_mock_reference>::release (
- fwd_mock_reference_ptr
- )
-{
-}
-
-fwd_mock_reference_ptr
-TAO::Objref_Traits<fwd_mock_reference>::nil (void)
-{
- return 0;
-}
-
-CORBA::Boolean
-TAO::Objref_Traits<fwd_mock_reference>::marshal (
- fwd_mock_reference_ptr,
- TAO_OutputCDR &
- )
-{
- return true;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.hpp b/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.hpp
deleted file mode 100644
index a808d674fc4..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef guard_fwd_mock_reference_hpp
-#define guard_fwd_mock_reference_hpp
-/**
- * @file
- *
- * @brief Mock an forward declared object reference so we can test the sequences
- * in isolation.
- *
- * $Id$
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-#include "ace/config-all.h"
-
-#include "testing_counters.hpp"
-
-#include "tao/Objref_VarOut_T.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class fwd_mock_reference;
-typedef fwd_mock_reference * fwd_mock_reference_ptr;
-typedef TAO_Objref_Var_T<fwd_mock_reference> fwd_mock_reference_var;
-typedef TAO_Objref_Out_T<fwd_mock_reference> fwd_mock_reference_out;
-
-namespace TAO
-{
-template<>
-struct Objref_Traits< fwd_mock_reference>
-{
- static fwd_mock_reference_ptr duplicate (fwd_mock_reference_ptr);
- static void release (fwd_mock_reference_ptr);
- static fwd_mock_reference_ptr nil (void);
- static CORBA::Boolean marshal (const fwd_mock_reference_ptr p, TAO_OutputCDR & cdr);
-};
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif // guard_fwd_mock_reference_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/generic_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/generic_sequence.hpp
index a5b933f9855..ecf6a102d06 100644
--- a/TAO/tests/Sequence_Unit_Tests/generic_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/generic_sequence.hpp
@@ -22,7 +22,7 @@
*
* Oh, and let us not forget the type that the sequences encapsulates.
*
- * The intent is not for sequences to simply derive or instantiate this
+ * The intent is not for sequences to simply derive or intantiate this
* type. Instead, different each sequence type is written using
* composition. They instantiate a generic sequence with the correct
* traits, and implement the adapt the generic sequence interface to
@@ -60,8 +60,6 @@
#include <algorithm>
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -259,5 +257,4 @@ private:
} // namespace details
} // namespace CORBA
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_generic_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/mock_reference.cpp b/TAO/tests/Sequence_Unit_Tests/mock_reference.cpp
index 47343eb366f..4c72a54f449 100644
--- a/TAO/tests/Sequence_Unit_Tests/mock_reference.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/mock_reference.cpp
@@ -7,12 +7,8 @@
*/
#include "mock_reference.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
call_counter mock_reference::duplicate_calls;
call_counter mock_reference::release_calls;
-call_counter mock_reference::serialize_calls;
-call_counter mock_reference::deserialize_calls;
mock_reference::
~mock_reference()
@@ -53,46 +49,3 @@ void CORBA::release(mock_reference * r)
{
mock_reference::_tao_release(r);
}
-
-mock_reference *
-TAO::Objref_Traits<mock_reference>::duplicate (
- mock_reference_ptr p
- )
-{
- return mock_reference::_duplicate (p);
-}
-
-void
-TAO::Objref_Traits<mock_reference>::release (
- mock_reference_ptr p
- )
-{
- CORBA::release (p);
-}
-
-mock_reference_ptr
-TAO::Objref_Traits<mock_reference>::nil (void)
-{
- return mock_reference::_nil ();
-}
-
-CORBA::Boolean
-TAO::Objref_Traits<mock_reference>::marshal (
- mock_reference_ptr,
- TAO_OutputCDR &
- )
-{
- return true;
-}
-
-CORBA::Boolean operator<< (mock_stream &, const mock_reference *)
-{
- mock_reference::serialize_calls ();
- return true;
-}
-CORBA::Boolean operator>> (mock_stream &, mock_reference *&)
-{
- mock_reference::deserialize_calls ();
- return true;
-}
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tests/Sequence_Unit_Tests/mock_reference.hpp b/TAO/tests/Sequence_Unit_Tests/mock_reference.hpp
index 7be04979980..d0583ca6843 100644
--- a/TAO/tests/Sequence_Unit_Tests/mock_reference.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/mock_reference.hpp
@@ -14,9 +14,6 @@
#include "testing_counters.hpp"
-#include "tao/Basic_Types.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Forward declare the class a CORBA::release function for it. That
// avoids having to introduce CORBA::Object into the tests.
// Ideally the T_var and T_out types should accept mock objects
@@ -27,20 +24,11 @@ namespace CORBA
void release(mock_reference*);
}
-class mock_stream;
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include "tao/Objref_VarOut_T.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+#include "tao/Pseudo_VarOut_T.h"
-typedef mock_reference *mock_reference_ptr;
-typedef TAO_Objref_Var_T<mock_reference> mock_reference_var;
-typedef TAO_Objref_Out_T<mock_reference> mock_reference_out;
/**
- * @class mock_reference
+ * @class
*
* @brief Implement a concrete class with the right interface for an
* object reference.
@@ -50,8 +38,8 @@ class mock_reference
public:
virtual ~mock_reference();
- typedef mock_reference_var _var_type;
- typedef mock_reference_out _out_type;
+ typedef TAO_Pseudo_Var_T<mock_reference> _var_type;
+ typedef TAO_Pseudo_Out_T<mock_reference,_var_type> _out_type;
static mock_reference * allocate(int id);
static mock_reference * _nil();
@@ -60,8 +48,6 @@ public:
static mock_reference * _duplicate(mock_reference * rhs);
static call_counter release_calls;
static void _tao_release(mock_reference * rhs);
- static call_counter serialize_calls;
- static call_counter deserialize_calls;
inline bool operator==(mock_reference const & rhs) const
{
@@ -79,8 +65,6 @@ public:
}
private:
- mock_reference ();
-
inline mock_reference(int id)
: id_(id)
{}
@@ -89,19 +73,8 @@ private:
int id_;
};
-CORBA::Boolean operator<< (mock_stream &, const mock_reference *);
-CORBA::Boolean operator>> (mock_stream &, mock_reference *&);
+typedef mock_reference * mock_reference_ptr;
+typedef mock_reference::_var_type mock_reference_var;
+typedef mock_reference::_out_type mock_reference_out;
-namespace TAO
-{
- template<>
- struct Objref_Traits< mock_reference>
- {
- static mock_reference_ptr duplicate (mock_reference_ptr);
- static void release (mock_reference_ptr);
- static mock_reference_ptr nil (void);
- static CORBA::Boolean marshal (mock_reference_ptr p, TAO_OutputCDR & cdr);
- };
-}
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_mock_reference_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/mock_stream.cpp b/TAO/tests/Sequence_Unit_Tests/mock_stream.cpp
deleted file mode 100644
index e5437a1a51e..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/mock_stream.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * @file
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#include "mock_stream.hpp"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-call_counter mock_stream::serialize_calls;
-call_counter mock_stream::deserialize_calls;
-
-mock_stream::
-~mock_stream()
-{
-}
-
-CORBA::ULong
-mock_stream::length () const
-{
- return 100;
-}
-
-CORBA::Boolean operator<< (mock_stream &, const CORBA::ULong)
-{
- return true;
-}
-CORBA::Boolean operator>> (mock_stream &, CORBA::ULong &)
-{
- return true;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tests/Sequence_Unit_Tests/mock_stream.hpp b/TAO/tests/Sequence_Unit_Tests/mock_stream.hpp
deleted file mode 100644
index 8bd2ef1a5d1..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/mock_stream.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef guard_mock_stream_hpp
-#define guard_mock_stream_hpp
-/**
- * @file
- *
- * @brief Mock an stream
- *
- * $Id$
- *
- * @author Johnny Willemsen
- */
-#include "ace/config-all.h"
-
-#include "testing_counters.hpp"
-#include "tao/Basic_Types.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class mock_stream
- *
- * @brief Implement a concrete class with the right interface for a stream.
- */
-class mock_stream
-{
-public:
- ~mock_stream();
-
- CORBA::ULong length () const;
-
- static call_counter serialize_calls;
- static call_counter deserialize_calls;
-};
-
-CORBA::Boolean operator<< (mock_stream &, const CORBA::ULong);
-CORBA::Boolean operator>> (mock_stream &, CORBA::ULong &);
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif // guard_mock_stream_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element.hpp b/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element.hpp
index ec6a58ad65e..f99bf34c37d 100644
--- a/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element.hpp
@@ -12,8 +12,6 @@
*/
#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -122,5 +120,4 @@ private:
} // namespace details
} // namespace CORBA
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_object_reference_sequence_element_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp b/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp
index ade2691d8b4..c509972baed 100644
--- a/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp
@@ -20,13 +20,13 @@
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO::details;
+using namespace TAO::details;
using namespace boost::unit_test_framework;
struct Tester
{
- typedef object_reference_traits<mock_reference,mock_reference_var,true> tested_element_traits;
+ typedef object_reference_traits<mock_reference,true> tested_element_traits;
typedef object_reference_sequence_element<tested_element_traits> tested_element;
typedef mock_reference * reference_type;
typedef tested_element_traits::object_type_var reference_var;
@@ -58,7 +58,7 @@ struct Tester
BOOST_CHECK_MESSAGE(r.expect(1), r);
BOOST_CHECK_MESSAGE(mr.expect(1), mr);
}
-
+
BOOST_CHECK_MESSAGE(d.expect(0), d);
BOOST_CHECK_MESSAGE(r.expect(0), r);
BOOST_CHECK_MESSAGE(md.expect(0), md);
@@ -94,7 +94,7 @@ struct Tester
BOOST_CHECK_MESSAGE(r.expect(2), r);
BOOST_CHECK_MESSAGE(mr.expect(2), mr);
}
-
+
BOOST_CHECK_MESSAGE(d.expect(0), d);
BOOST_CHECK_MESSAGE(r.expect(0), r);
BOOST_CHECK_MESSAGE(md.expect(0), md);
@@ -131,7 +131,7 @@ struct Tester
BOOST_CHECK_MESSAGE(r.expect(1), r);
BOOST_CHECK_MESSAGE(mr.expect(1), mr);
}
-
+
BOOST_CHECK_MESSAGE(d.expect(0), d);
BOOST_CHECK_MESSAGE(r.expect(0), r);
BOOST_CHECK_MESSAGE(md.expect(0), md);
@@ -168,7 +168,7 @@ struct Tester
BOOST_CHECK_MESSAGE(r.expect(2), r);
BOOST_CHECK_MESSAGE(mr.expect(2), mr);
}
-
+
BOOST_CHECK_MESSAGE(d.expect(0), d);
BOOST_CHECK_MESSAGE(r.expect(0), r);
BOOST_CHECK_MESSAGE(md.expect(0), md);
@@ -207,7 +207,7 @@ struct Tester
BOOST_CHECK_MESSAGE(r.expect(3), r);
BOOST_CHECK_MESSAGE(mr.expect(3), mr);
}
-
+
BOOST_CHECK_MESSAGE(d.expect(0), d);
BOOST_CHECK_MESSAGE(r.expect(0), r);
BOOST_CHECK_MESSAGE(md.expect(0), md);
@@ -242,7 +242,7 @@ struct Tester
BOOST_CHECK_MESSAGE(r.expect(1), r);
BOOST_CHECK_MESSAGE(mr.expect(1), mr);
}
-
+
BOOST_CHECK_MESSAGE(d.expect(0), d);
BOOST_CHECK_MESSAGE(r.expect(0), r);
BOOST_CHECK_MESSAGE(md.expect(0), md);
@@ -279,7 +279,7 @@ struct Tester
BOOST_CHECK_MESSAGE(r.expect(2), r);
BOOST_CHECK_MESSAGE(mr.expect(2), mr);
}
-
+
BOOST_CHECK_MESSAGE(d.expect(0), d);
BOOST_CHECK_MESSAGE(r.expect(0), r);
BOOST_CHECK_MESSAGE(md.expect(0), md);
@@ -327,16 +327,16 @@ private:
boost::weak_ptr<Tester> self_;
};
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("object reference sequence element unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("object reference sequence element unit test"));
boost::shared_ptr<Tester > mock_reference_tester(
Tester::allocate());
- mock_reference_tester->add_all(ts);
+ mock_reference_tester->add_all(ts.get());
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/object_reference_traits.hpp b/TAO/tests/Sequence_Unit_Tests/object_reference_traits.hpp
index 780a530ea00..0075f4a1ff3 100644
--- a/TAO/tests/Sequence_Unit_Tests/object_reference_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/object_reference_traits.hpp
@@ -4,7 +4,7 @@
* @file
*
* @brief Implement the element manipulation traits for object
- * reference types.
+ * reference types.
*
* $Id$
*
@@ -15,20 +15,19 @@
#include <algorithm>
#include <functional>
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
{
-template<class object_t, class object_t_var, class derived>
+template<class object_t, class derived>
struct object_reference_traits_decorator
{
typedef object_t object_type;
typedef object_type * value_type;
typedef object_type const * const_value_type;
- typedef object_t_var object_type_var;
+
+ typedef typename object_type::_var_type object_type_var;
inline static void zero_range(
object_type ** begin, object_type ** end)
@@ -64,21 +63,14 @@ struct object_reference_traits_decorator
}
};
-template<typename object_t, typename object_t_var, bool dummy>
+template<typename object_t, bool dummy>
struct object_reference_traits
- : public object_reference_traits_base<object_t, object_t_var>
- , public object_reference_traits_decorator<object_t, object_t_var, object_reference_traits<object_t,object_t_var,dummy> >
+ : public object_reference_traits_base<object_t>
+ , public object_reference_traits_decorator<object_t, object_reference_traits<object_t,dummy> >
{
-#if defined __BORLANDC__ && __BORLANDC__ < 0x580
- typedef object_t object_type;
- typedef object_type * value_type;
- typedef object_type const * const_value_type;
- typedef object_t_var object_type_var;
-#endif
};
} // namespace details
} // namespace CORBA
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_object_reference_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/object_reference_traits_base.hpp b/TAO/tests/Sequence_Unit_Tests/object_reference_traits_base.hpp
index b048719abc5..a05b224f327 100644
--- a/TAO/tests/Sequence_Unit_Tests/object_reference_traits_base.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/object_reference_traits_base.hpp
@@ -1,5 +1,5 @@
-#ifndef object_reference_traits_base_hpp
-#define object_reference_traits_base_hpp
+#ifndef guard_string_traits_base_hpp
+#define guard_string_traits_base_hpp
/**
* @file
*
@@ -10,36 +10,33 @@
* @author Carlos O'Ryan
*/
-#include "tao/Objref_VarOut_T.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
{
-template<typename object_t, typename object_t_var>
+template<typename object_t>
struct object_reference_traits_base
{
typedef object_t object_type;
typedef object_type * value_type;
typedef object_type const * const_value_type;
- typedef object_t_var object_type_var;
+
+ typedef typename object_type::_var_type object_type_var;
inline static void release(object_type * object)
{
- TAO::Objref_Traits<object_type>::release(object);
+ object_type::_tao_release(object);
}
inline static object_type * duplicate(object_type * object)
{
- return TAO::Objref_Traits<object_type>::duplicate(object);
+ return object_type::_duplicate(object);
}
inline static object_type * nil()
{
- return TAO::Objref_Traits<object_type>::nil();
+ return object_type::_nil();
}
inline static object_type * default_initializer()
@@ -51,5 +48,4 @@ struct object_reference_traits_base
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif // object_reference_traits_base_hpp
+#endif // guard_string_traits_base_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/range_checking.hpp b/TAO/tests/Sequence_Unit_Tests/range_checking.hpp
index 85a71af0abc..1d73739ea70 100644
--- a/TAO/tests/Sequence_Unit_Tests/range_checking.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/range_checking.hpp
@@ -13,15 +13,13 @@
#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
{
/**
- * @struct range_checking
+ * @struct
*
* @brief Configurable traits to tradeoff safety vs. performance in
* the implementation of TAO sequences.
@@ -91,7 +89,7 @@ namespace details
* };
* </PRE>
*
- *
+ *
*
* @todo There is no control on a per-sequence type basis, only on a
* per-underlying type basis, for example, the following two IDL
@@ -141,7 +139,6 @@ struct range_checking
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#if defined(TAO_USER_DEFINED_SEQUENCE_RANGE_CHECKING_INCLUDE)
# include TAO_USER_DEFINED_SEQUENCE_RANGE_CHECKING_INCLUDE
#endif // TAO_USER_DEFINED_SEQUENCE_RANGE_CHECKING_INCLUDE
diff --git a/TAO/tests/Sequence_Unit_Tests/run_test.pl b/TAO/tests/Sequence_Unit_Tests/run_test.pl
index 9d1e5babf6e..5e408d66ef2 100755
--- a/TAO/tests/Sequence_Unit_Tests/run_test.pl
+++ b/TAO/tests/Sequence_Unit_Tests/run_test.pl
@@ -17,15 +17,9 @@ my @tests = qw(unbounded_value_sequence_ut
unbounded_string_sequence_ut
bounded_string_sequence_ut
testing_allocation_traits_ut
- unbounded_octet_sequence_ut
- unbounded_octet_sequence_no_copy_ut
object_reference_sequence_element_ut
unbounded_object_reference_sequence_ut
- unbounded_fwd_object_reference_sequence_ut
bounded_object_reference_sequence_ut
- bounded_sequence_cdr_ut
- unbounded_sequence_cdr_ut
- Unbounded_Octet
Unbounded_Simple_Types
Bounded_Simple_Types
Unbounded_String
@@ -63,7 +57,7 @@ foreach my $process (@tests) {
$final_result = 1;
next;
}
- $result = $P->WaitKill(10);
+ $result = $P->WaitKill(30);
if ($result != 0) {
print "FAILED\n";
$final_result = 1;
diff --git a/TAO/tests/Sequence_Unit_Tests/string_sequence_element.hpp b/TAO/tests/Sequence_Unit_Tests/string_sequence_element.hpp
index 9ce72bb0ece..5ccac25610c 100644
--- a/TAO/tests/Sequence_Unit_Tests/string_sequence_element.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/string_sequence_element.hpp
@@ -13,8 +13,6 @@
#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -119,5 +117,4 @@ private:
} // namespace details
} // namespace CORBA
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_string_sequence_element_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp b/TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp
index fde7f00ee63..229cdf36d1f 100644
--- a/TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp
@@ -21,7 +21,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO::details;
+using namespace TAO::details;
using namespace boost::unit_test_framework;
@@ -381,20 +381,20 @@ private:
boost::weak_ptr<Tester> self_;
};
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("string sequence element unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("string sequence element unit test"));
boost::shared_ptr<Tester<char> > char_tester(
Tester<char>::allocate());
- char_tester->add_all(ts);
+ char_tester->add_all(ts.get());
boost::shared_ptr<Tester<CORBA::WChar> > wchar_tester(
Tester<CORBA::WChar>::allocate());
- wchar_tester->add_all(ts);
+ wchar_tester->add_all(ts.get());
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/string_traits.hpp b/TAO/tests/Sequence_Unit_Tests/string_traits.hpp
index 71d4f2fb7b6..143b4948d15 100644
--- a/TAO/tests/Sequence_Unit_Tests/string_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/string_traits.hpp
@@ -15,8 +15,6 @@
#include <algorithm>
#include <functional>
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -72,5 +70,4 @@ struct string_traits
} // namespace details
} // namespace CORBA
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_string_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/string_traits_base.hpp b/TAO/tests/Sequence_Unit_Tests/string_traits_base.hpp
index 1dacb6f09be..b6a1e0be936 100644
--- a/TAO/tests/Sequence_Unit_Tests/string_traits_base.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/string_traits_base.hpp
@@ -14,8 +14,6 @@
#include "tao/CORBA_String.h"
#include "tao/Managed_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -58,13 +56,8 @@ struct string_traits_base<CORBA::WChar>
inline static char_type * default_initializer()
{
-#if defined(ACE_HAS_WCHAR) || defined(ACE_HAS_XPG4_MULTIBYTE_CHAR)
- return CORBA::wstring_dup(L"");
-#else
-#warning "platform not configured with native wchar_t support"
- CORBA::WChar empty[] = { 0 };
+ static CORBA::WChar empty[] = { 0 };
return CORBA::wstring_dup(empty);
-#endif /* 0 */
}
inline static char_type * duplicate(char_type const * s)
@@ -81,5 +74,4 @@ struct string_traits_base<CORBA::WChar>
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_string_traits_base_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp b/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp
index ba578e0f756..2c771853502 100644
--- a/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp
@@ -54,7 +54,6 @@ testing_allocation_traits<T,base>::freebuf_calls;
template<typename T, class base> call_counter
testing_allocation_traits<T,base>::default_buffer_allocation_calls;
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO
{
namespace details
@@ -86,6 +85,5 @@ struct bounded_reference_allocation_traits<T,reference_traits,MAX,true>
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_testing_allocation_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp b/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp
index de4426c4f16..f74c9b81809 100644
--- a/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp
@@ -17,7 +17,7 @@
try { statement; } catch(...) { \
BOOST_ERROR("unexpected exception raised"); }
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO::details;
+using namespace TAO::details;
using namespace boost::unit_test_framework;
@@ -172,30 +172,30 @@ private:
struct Foo { int y; };
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("testing allocation traits unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("testing allocation traits unit test"));
{
boost::shared_ptr<Tester<int> > tester(
Tester<int>::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
{
boost::shared_ptr<Tester<Foo> > tester(
Tester<Foo>::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
{
boost::shared_ptr<Tester<char*> > tester(
Tester<char*>::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp b/TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp
index c13d4f5371f..6abe33f9dc0 100644
--- a/TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp
@@ -4,7 +4,7 @@
* @file
*
* @brief Specialize the object reference traits so they can be used
- * in testing.
+ * in testing.
*
* $Id$
*
@@ -15,18 +15,18 @@
#include "testing_counters.hpp"
#include "object_reference_traits.hpp"
-template<typename object_t, typename object_t_var>
+template<typename object_t>
struct testing_object_reference_traits
- : public TAO::details::object_reference_traits_base<object_t, object_t_var>
- , public TAO::details::object_reference_traits_decorator<object_t, object_t_var, testing_object_reference_traits<object_t, object_t_var> >
+ : public TAO::details::object_reference_traits_base<object_t>
+ , public TAO::details::object_reference_traits_decorator<object_t, testing_object_reference_traits<object_t> >
{
static call_counter default_initializer_calls;
static call_counter duplicate_calls;
static call_counter release_calls;
typedef object_t object_type;
- typedef object_t_var object_type_var;
- typedef TAO::details::object_reference_traits<object_t,object_t_var,false> real_traits;
+ typedef typename object_type::_var_type object_type_var;
+ typedef TAO::details::object_reference_traits<object_t,false> real_traits;
static object_type * default_initializer()
{
@@ -47,29 +47,27 @@ struct testing_object_reference_traits
}
};
-template<typename object_t,typename object_t_var> call_counter
-testing_object_reference_traits<object_t,object_t_var>::default_initializer_calls;
+template<typename object_t> call_counter
+testing_object_reference_traits<object_t>::default_initializer_calls;
-template<typename object_t,typename object_t_var> call_counter
-testing_object_reference_traits<object_t,object_t_var>::duplicate_calls;
+template<typename object_t> call_counter
+testing_object_reference_traits<object_t>::duplicate_calls;
-template<typename object_t,typename object_t_var> call_counter
-testing_object_reference_traits<object_t,object_t_var>::release_calls;
+template<typename object_t> call_counter
+testing_object_reference_traits<object_t>::release_calls;
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO
{
namespace details
{
-template<typename object_t, typename object_t_var>
-struct object_reference_traits<object_t,object_t_var,true>
- : public testing_object_reference_traits<object_t,object_t_var>
+template<typename object_t>
+struct object_reference_traits<object_t,true>
+ : public testing_object_reference_traits<object_t>
{
};
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_testing_object_reference_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp b/TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp
index b60024b914a..3588260dafe 100644
--- a/TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp
@@ -53,7 +53,6 @@ struct testing_range_checking
}
};
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO
{
namespace details
@@ -68,5 +67,4 @@ struct range_checking<T,true>
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_testing_range_checking_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp b/TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp
index 861bdbc07bf..ec9a1222218 100644
--- a/TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp
@@ -76,7 +76,6 @@ testing_string_traits<charT>::not_released_from_const_calls;
template<typename charT> call_counter
testing_string_traits<charT>::not_released_from_managed_calls;
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO
{
namespace details
@@ -96,6 +95,5 @@ struct string_traits<CORBA::WChar,true>
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_testing_string_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_basic_string_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_basic_string_sequence.hpp
index b8e2191d860..4caf7ce4f39 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_basic_string_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_basic_string_sequence.hpp
@@ -14,8 +14,6 @@
#include "generic_sequence.hpp"
#include "string_sequence_element.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -104,5 +102,4 @@ private:
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_unbounded_basic_string_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_fwd_object_reference_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_fwd_object_reference_sequence_ut.cpp
deleted file mode 100644
index e9eae26609c..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_fwd_object_reference_sequence_ut.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of forward declared object
- * references.
- *
- * $Id$
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-#include "testing_object_reference_traits.hpp"
-//#include "object_reference_traits.hpp"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "fwd_mock_reference.hpp"
-
-#include "unbounded_object_reference_sequence.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-struct Tester
-{
- typedef unbounded_object_reference_sequence<fwd_mock_reference, fwd_mock_reference_var> tested_sequence;
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- void test_default_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
-
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_default_constructor,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence.hpp
index 4d095a7b9e8..23ebd2c28b1 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence.hpp
@@ -14,12 +14,10 @@
#include "generic_sequence.hpp"
#include "object_reference_sequence_element.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
-template<typename object_t, typename object_t_var>
+template<typename object_t>
class unbounded_object_reference_sequence
{
public:
@@ -27,7 +25,7 @@ public:
typedef object_type * value_type;
typedef object_type const * const_value_type;
- typedef details::object_reference_traits<object_type,object_t_var,true> element_traits;
+ typedef details::object_reference_traits<object_type,true> element_traits;
typedef details::unbounded_reference_allocation_traits<value_type,element_traits,true> allocation_traits;
typedef details::object_reference_sequence_element<element_traits> element_type;
@@ -101,5 +99,4 @@ private:
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_unbounded_object_reference_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp
index 4854282e479..9ed96956648 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp
@@ -21,11 +21,11 @@
#include <boost/weak_ptr.hpp>
using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
+using namespace TAO;
struct Tester
{
- typedef unbounded_object_reference_sequence<mock_reference, mock_reference_var> tested_sequence;
+ typedef unbounded_object_reference_sequence<mock_reference> tested_sequence;
typedef tested_sequence::value_type value_type;
typedef tested_sequence::const_value_type const_value_type;
@@ -505,15 +505,15 @@ private:
boost::weak_ptr<Tester> self_;
};
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("unbounded object reference sequence unit test"));
boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence.hpp
deleted file mode 100644
index 043f24add9a..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence.hpp
+++ /dev/null
@@ -1,284 +0,0 @@
-#ifndef guard_unbounded_octet_sequence_hpp
-#define guard_unbounded_octet_sequence_hpp
-/**
- * @file
- *
- * @brief Implement octet sequences
- *
- * $Id$
- *
- * @author Johnny Willemsen
- */
-#include "tao/orbconf.h"
-
-#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
-
-#include "unbounded_value_allocation_traits.hpp"
-#include "value_traits.hpp"
-#include "unbounded_value_sequence.hpp"
-#include "range_checking.hpp"
-
-#include "tao/Basic_Types.h"
-#include "ace/Message_Block.h"
-#include "ace/OS_Memory.h"
-#include "ace/OS_NS_string.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-namespace TAO
-{
-template<>
-class unbounded_value_sequence<CORBA::Octet>
-{
-public:
- typedef CORBA::Octet value_type;
- typedef CORBA::Octet element_type;
- typedef CORBA::Octet const const_value_type;
-
- typedef details::unbounded_value_allocation_traits<value_type,true> allocation_traits;
- typedef details::value_traits<value_type,true> element_traits;
- typedef details::generic_sequence<value_type, allocation_traits, element_traits> implementation_type;
- typedef details::range_checking<value_type,true> range;
-
- inline unbounded_value_sequence<CORBA::Octet>()
- : maximum_ (allocation_traits::default_maximum())
- , length_ (0)
- , buffer_ (allocation_traits::default_buffer_allocation())
- , release_ (true)
- , mb_ (0)
- {}
- inline explicit unbounded_value_sequence<CORBA::Octet>(CORBA::ULong maximum)
- : maximum_(maximum)
- , length_(0)
- , buffer_(allocbuf(maximum_))
- , release_(true)
- , mb_ (0)
- {}
- inline unbounded_value_sequence<CORBA::Octet>(
- CORBA::ULong maximum,
- CORBA::ULong length,
- value_type * data,
- CORBA::Boolean release = false)
- : maximum_ (maximum),
- length_ (length),
- buffer_ (data),
- release_ (release),
- mb_ (0)
- {}
- inline ~unbounded_value_sequence<CORBA::Octet>() {
- if (mb_)
- ACE_Message_Block::release (mb_);
- if (release_)
- freebuf(buffer_);
- }
- /// Create a sequence of octets from a single message block (i.e. it
- /// ignores any chaining in the meesage block).
- inline unbounded_value_sequence<CORBA::Octet> (CORBA::ULong length,
- const ACE_Message_Block* mb)
- : maximum_ (length)
- , length_ (length)
- , buffer_ (reinterpret_cast <CORBA::Octet *>(mb->rd_ptr ()))
- , release_ (false)
- , mb_(0) {
- // Get the message block flags.
- ACE_Message_Block::Message_Flags flg = mb->self_flags ();
-
- // If the DONT_DELETE flag is disabled just a duplicate would
- // help. If the DONT_DELETE flag is enabled a deep copy is needed as
- // the contents would be on stack. Just incrementing the ref count
- // on the stack based data block would only crash the program when
- // the stack unwinds
- if (ACE_BIT_DISABLED (flg,
- ACE_Message_Block::DONT_DELETE))
- {
- this->mb_ = ACE_Message_Block::duplicate (mb);
- }
- else
- {
- // As we are in CORBA mode, all the data blocks would be aligned
- // on an 8 byte boundary
- ACE_Message_Block msgb (*mb,
- ACE_CDR::MAX_ALIGNMENT);
-
- // Get the base pointer of the incoming message block
- char *start = ACE_ptr_align_binary (mb->base (),
- ACE_CDR::MAX_ALIGNMENT);
-
- // Get the read and write displacements in the incoming stream
- size_t rd_pos = mb->rd_ptr () - start;
- size_t wr_pos = mb->wr_ptr () - start;
-
- this->mb_ = ACE_Message_Block::duplicate (&msgb);
-
- this->mb_->rd_ptr (rd_pos);
- this->mb_->wr_ptr (wr_pos);
- }
- }
- inline CORBA::ULong maximum() const {
- return maximum_;
- }
- inline CORBA::Boolean release() const {
- return release_;
- }
- inline CORBA::ULong length() const {
- return length_;
- }
- inline void length(CORBA::ULong length) {
- if (length <= maximum_ || length <= length_)
- {
- if (length_ < length)
- {
- // TODO This code does not provide the strong-exception
- // guarantee, but it does provide the weak-exception
- // guarantee. The problem would appear when
- // initialize_range() raises an exception after several
- // elements have been modified. One could argue that
- // this problem is irrelevant, as the elements already
- // modified are unreachable to conforming applications.
- element_traits::initialize_range(
- buffer_ + length_, buffer_ + length);
- }
- length_ = length;
- return;
- }
-
- unbounded_value_sequence<CORBA::Octet> tmp(length);
- tmp.length_ = length;
- element_traits::copy_range(
- buffer_, buffer_ + length_, tmp.buffer_);
- element_traits::initialize_range(
- tmp.buffer_ + length_, tmp.buffer_ + length);
- swap(tmp);
- }
- inline value_type const & operator[](CORBA::ULong i) const {
- range::check(i, length_, maximum_, "operator[]() const");
- return buffer_[i];
- }
- inline value_type & operator[](CORBA::ULong i) {
- range::check(i, length_, maximum_, "operator[]() non-const");
- return buffer_[i];
- }
- inline void replace(
- CORBA::ULong maximum,
- CORBA::ULong length,
- value_type * data,
- CORBA::Boolean release = false) {
- unbounded_value_sequence<CORBA::Octet> tmp(maximum, length, data, release);
- swap(tmp);
- }
- inline value_type const * get_buffer() const {
- if (buffer_ == 0)
- {
- buffer_ = allocbuf(maximum_);
- }
- return buffer_;
- }
- inline value_type * get_buffer(CORBA::Boolean orphan = false) {
- if (orphan && !release_)
- {
- return 0;
- }
- if (buffer_ == 0)
- {
- buffer_ = allocbuf(maximum_);
- }
- if (!orphan)
- {
- return buffer_;
- }
-
- unbounded_value_sequence<CORBA::Octet> tmp;
- swap(tmp);
- tmp.release_ = false;
-
- return tmp.buffer_;
- }
- inline void swap(unbounded_value_sequence & rhs) throw() {
- std::swap (mb_, rhs.mb_);
- std::swap (maximum_, rhs.maximum_);
- std::swap (length_, rhs.length_);
- std::swap (buffer_, rhs.buffer_);
- std::swap (release_, rhs.release_);
- }
- static value_type * allocbuf(CORBA::ULong maximum) {
- return allocation_traits::allocbuf(maximum);
- }
- static void freebuf(value_type * buffer) {
- allocation_traits::freebuf(buffer);
- }
-
- /// Returns the underlying message block, the caller must *not*
- /// release the copy.
- inline ACE_Message_Block* mb (void) const {
- return mb_;
- }
-
- /// Replaces the current buffer with <mb>, using only <length> bytes.
- /// It takes a duplicate of <mb> so the user still owns it.
- inline void replace (CORBA::ULong length, const ACE_Message_Block* mb) {
- unbounded_value_sequence<CORBA::Octet> s (length, mb);
- swap (s);
- }
-
- unbounded_value_sequence<CORBA::Octet> (
- const unbounded_value_sequence<CORBA::Octet> &rhs)
- : maximum_ (0)
- , length_ (0)
- , buffer_(0)
- , release_(false)
- , mb_ (0)
- {
- unbounded_value_sequence<CORBA::Octet> tmp(rhs.maximum_);
- tmp.length_ = rhs.length_;
- if (rhs.mb_ == 0)
- {
- ACE_OS::memcpy (tmp.buffer_,
- rhs.buffer_,
- rhs.length_);
- }
- else
- {
- size_t offset = 0;
- for (const ACE_Message_Block *i = rhs.mb_; i != 0; i = i->cont ())
- {
- ACE_OS::memcpy (tmp.buffer_ + offset,
- i->rd_ptr (),
- i->length ());
-
- offset += i->length ();
- }
- }
- swap(tmp);
- }
-
- unbounded_value_sequence<CORBA::Octet> &
- operator= (const unbounded_value_sequence<CORBA::Octet> & rhs)
- {
- unbounded_value_sequence<CORBA::Octet> tmp(rhs);
- swap(tmp);
- return * this;
- }
-
-private:
- /// The maximum number of elements the buffer can contain.
- CORBA::ULong maximum_;
-
- /// The current number of elements in the buffer.
- CORBA::ULong length_;
-
- /// The buffer with all the elements, casting must be done in derived
- /// classes.
- mutable value_type * buffer_;
-
- /// If true then the sequence should release the buffer when it is
- /// destroyed.
- CORBA::Boolean release_;
- ACE_Message_Block* mb_;
-};
-
-} // namespace TAO
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif
-
-#endif // guard_unbounded_octet_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp
deleted file mode 100644
index b8f36f065cc..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp
+++ /dev/null
@@ -1,487 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of octet types using the TAO
- * specific no copy specialization
- *
- * $Id$
- *
- * @author Johnny Willemsen
- */
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "unbounded_octet_sequence.hpp"
-
-#include "value_sequence_tester.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-#include "tao/Basic_Types.h"
-#include "tao/CDR.h"
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-typedef unbounded_value_sequence<CORBA::Octet> tested_sequence;
-typedef tested_sequence::element_traits tested_element_traits;
-typedef tested_sequence::allocation_traits tested_allocation_traits;
-typedef details::range_checking<CORBA::Octet,true> range;
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
-
- void test_copy_constructor_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- x.length(8);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_assignment_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- x.length(8);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- y = x;
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence x(16), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- }
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- x.length(8);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(32);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_set_length()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(x.length(8), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = 1; buf[1] = 4; buf[2] = 9; buf[3] = 16;
-
- return buf;
- }
-
- ACE_Message_Block * alloc_and_init_mb()
- {
- char buf[8];
- sprintf (buf, "%s", "testing ");
- size_t n = (strlen (buf) + 1) * sizeof (char);
- ACE_Message_Block * mb = new ACE_Message_Block (n);
- mb->copy ((char *) buf, n);
-
- return mb;
- }
-
- void test_buffer_constructor_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_replace_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, true);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_get_buffer_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_true_with_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
- tested_sequence::freebuf(buffer);
- }
-
- void test_get_buffer_true_with_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(buffer, a.get_buffer(true));
-
- tested_sequence const & b = a;
- BOOST_CHECK_EQUAL(0UL, b.maximum());
- BOOST_CHECK_EQUAL(0UL, b.length());
- BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
-
- BOOST_CHECK_MESSAGE(c.expect(1), c);
-
- BOOST_CHECK(buffer != b.get_buffer());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_no_copy_octet()
- {
-#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
- ACE_Message_Block * mb = alloc_and_init_mb();
- tested_sequence a (8, mb);
- BOOST_CHECK_EQUAL(CORBA::Octet( 't'), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 'g'), a[6]);
-
- char upperbuf[256];
- sprintf (upperbuf, "%s", "THIS IS A TEST");
- size_t n = (strlen (upperbuf) + 1) * sizeof (char);
- ACE_Message_Block * upper_mb = 0;
- ACE_NEW (upper_mb,
- ACE_Message_Block (n));
- // Copy buf into the Message_Block and update the wr_ptr ().
- upper_mb->copy ((char *) upperbuf, n);
- a.replace (n, upper_mb);
- BOOST_CHECK_EQUAL(CORBA::Octet( 'T'), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 'S'), a[6]);
-#endif
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_no_copy_octet,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_set_length,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_true,
- shared_this));
-
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded no copy octet sequence unit test");
-
- {
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
- }
-
- {
- typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common;
- boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp
deleted file mode 100644
index 39a358d53fc..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp
+++ /dev/null
@@ -1,450 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of octet types
- *
- * $Id$
- *
- * @author Johnny Willemsen
- */
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "unbounded_value_sequence.hpp"
-
-#include "value_sequence_tester.hpp"
-
-#include "tao/Basic_Types.h"
-#include "tao/CDR.h"
-
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-using namespace boost::unit_test_framework;
-
-typedef unbounded_value_sequence<CORBA::Octet> tested_sequence;
-typedef tested_sequence::element_traits tested_element_traits;
-typedef tested_sequence::allocation_traits tested_allocation_traits;
-typedef details::range_checking<CORBA::Octet,true> range;
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
-
- void test_copy_constructor_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- x.length(8);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_assignment_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- x.length(8);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- y = x;
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence x(16), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- }
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- x.length(8);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(32);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_set_length()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(x.length(8), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = 1; buf[1] = 4; buf[2] = 9; buf[3] = 16;
-
- return buf;
- }
-
- void test_buffer_constructor_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_replace_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, true);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_get_buffer_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_true_with_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
- tested_sequence::freebuf(buffer);
- }
-
- void test_get_buffer_true_with_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(buffer, a.get_buffer(true));
-
- tested_sequence const & b = a;
- BOOST_CHECK_EQUAL(0UL, b.maximum());
- BOOST_CHECK_EQUAL(0UL, b.length());
- BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
-
- BOOST_CHECK_MESSAGE(c.expect(1), c);
-
- BOOST_CHECK(buffer != b.get_buffer());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- tested_sequence::freebuf(buffer);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_set_length,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_true,
- shared_this));
-
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-using namespace boost::unit_test_framework;
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded octet sequence unit test");
-
- {
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
- }
-
- {
- typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common;
- boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_reference_allocation_traits.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_reference_allocation_traits.hpp
index 2c5a2da2da2..0d3406acc11 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_reference_allocation_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_reference_allocation_traits.hpp
@@ -13,8 +13,6 @@
#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -64,5 +62,4 @@ struct unbounded_reference_allocation_traits
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_unbounded_reference_allocation_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr.hpp
deleted file mode 100644
index fd1e9aac05b..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef guard_unbounded_sequence_cdr
-#define guard_unbounded_sequence_cdr
-/**
- * @file
- *
- * @brief Extract the sequence
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- * @author Johnny Willemsen
- */
-
-#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-namespace TAO {
- namespace details {
- template <typename stream, typename sequence>
- bool extract_unbounded_sequence(stream & strm, sequence & target) {
- ::CORBA::ULong new_length;
- if (!(strm >> new_length)) {
- return false;
- }
- if (new_length > strm.length()) {
- return false;
- }
- sequence tmp(new_length);
- tmp.length(new_length);
- typename sequence::value_type * buffer = tmp.get_buffer();
- for(CORBA::ULong i = 0; i < new_length; ++i) {
- if (!(strm >> buffer[i])) {
- return false;
- }
- }
- tmp.swap(target);
- return true;
- }
-
- template <typename stream, typename sequence>
- bool insert_unbounded_sequence(stream & strm, const sequence & source) {
- const CORBA::ULong length = source.length ();
- if (!(strm << length)) {
- return false;
- }
- for(CORBA::ULong i = 0; i < length; ++i) {
- if (!(strm << source[i])) {
- return false;
- }
- }
- return true;
- }
- }
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif /* guard_unbounded_sequence_cdr */
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp
deleted file mode 100644
index 1a8dffbd1e9..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of object references.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_object_reference_traits.hpp"
-#include "object_reference_traits.hpp"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "mock_reference.hpp"
-#include "mock_stream.hpp"
-
-#include "unbounded_object_reference_sequence.hpp"
-#include "unbounded_sequence_cdr.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-typedef unbounded_object_reference_sequence<mock_reference, mock_reference_var> tested_sequence;
-
-CORBA::Boolean operator<< (mock_stream &strm, const tested_sequence &sequence)
-{
- return TAO::details::insert_unbounded_sequence(strm, sequence);
-}
-
-CORBA::Boolean operator>> (mock_stream &strm, tested_sequence &sequence)
-{
- return TAO::details::extract_unbounded_sequence(strm, sequence);
-}
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = mock_reference::allocate(1);
- buf[1] = mock_reference::allocate(4);
- buf[2] = mock_reference::allocate(9);
- buf[3] = mock_reference::allocate(16);
-
- return buf;
- }
-
- void check_values(tested_sequence const & a)
- {
- BOOST_CHECK_EQUAL( 1, a[0]->id());
- BOOST_CHECK_EQUAL( 4, a[1]->id());
- BOOST_CHECK_EQUAL( 9, a[2]->id());
- BOOST_CHECK_EQUAL(16, a[3]->id());
- }
-
- void test_stream()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls s(mock_reference::serialize_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
-
- mock_stream stream;
- stream << a;
- BOOST_CHECK_MESSAGE(s.expect(4), s);
- }
- tested_sequence::freebuf(buffer);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_stream,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence.hpp
index c54a430b494..5da4cb24829 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence.hpp
@@ -11,8 +11,6 @@
*/
#include "unbounded_basic_string_sequence.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
@@ -38,5 +36,4 @@ public:
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_unbounded_string_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp
index 61c93488a50..d6c1df23649 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp
@@ -22,7 +22,7 @@
#include <boost/weak_ptr.hpp>
using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
+using namespace TAO;
template<class tested_sequence>
struct Tester
@@ -382,7 +382,7 @@ struct Tester
{
value_type * buffer = alloc_and_init_buffer();
tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
+ BOOST_CHECK_EQUAL(static_cast<value_type*>(0), a.get_buffer(true));
tested_sequence::freebuf(buffer);
}
@@ -400,7 +400,6 @@ struct Tester
BOOST_CHECK_EQUAL(0UL, b.maximum());
BOOST_CHECK_EQUAL(0UL, b.length());
BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
BOOST_CHECK_MESSAGE(c.expect(1), c);
@@ -412,32 +411,6 @@ struct Tester
BOOST_CHECK_MESSAGE(r.expect(8), r);
}
- void test_regression_2201()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- a.length (3);
- BOOST_CHECK_EQUAL(CORBA::ULong(3), a.length());
- a.length (4);
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK(helper::compare_empty(a[3]));
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
-
void add_all(test_suite * ts)
{
typedef string_sequence_tester<tested_sequence> common;
@@ -500,9 +473,6 @@ struct Tester
ts->add(BOOST_CLASS_TEST_CASE(
&Tester::test_get_buffer_true_with_release_true,
shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_regression_2201,
- shared_this));
}
static boost::shared_ptr<Tester> allocate()
@@ -519,24 +489,24 @@ private:
boost::weak_ptr<Tester> self_;
};
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded string sequence unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("unbounded string sequence unit test"));
{
typedef Tester<unbounded_string_sequence> nTester;
boost::shared_ptr<nTester> tester(nTester::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
{
typedef Tester<unbounded_wstring_sequence> wTester;
boost::shared_ptr<wTester> tester(wTester::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_value_allocation_traits.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_value_allocation_traits.hpp
index 7b6b3598bf7..f61e9271d1a 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_value_allocation_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_value_allocation_traits.hpp
@@ -13,8 +13,6 @@
#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -49,5 +47,4 @@ struct unbounded_value_allocation_traits
} // namespace details
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_unbounded_value_allocation_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence.hpp
index 4702561423a..409db4dd883 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence.hpp
@@ -15,8 +15,6 @@
#include "value_traits.hpp"
#include "generic_sequence.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
@@ -25,7 +23,6 @@ class unbounded_value_sequence
{
public:
typedef T value_type;
- typedef T element_type;
typedef T const const_value_type;
typedef details::unbounded_value_allocation_traits<value_type,true> allocation_traits;
@@ -35,7 +32,7 @@ public:
inline unbounded_value_sequence()
: impl_()
{}
- inline explicit unbounded_value_sequence(CORBA::ULong maximum)
+ inline /* explicit */ unbounded_value_sequence(CORBA::ULong maximum)
: impl_(maximum)
{}
inline unbounded_value_sequence(
@@ -93,6 +90,5 @@ private:
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_unbounded_string_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp
index 3a2fb4bb193..6607e0f16c0 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp
@@ -20,7 +20,7 @@
#include <boost/weak_ptr.hpp>
using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
+using namespace TAO;
typedef unbounded_value_sequence<int> tested_sequence;
typedef tested_sequence::element_traits tested_element_traits;
@@ -162,33 +162,6 @@ struct Tester
return buf;
}
- void test_regression_2201 ()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- a.length (3);
- BOOST_CHECK_EQUAL(CORBA::ULong(3), a.length());
- a.length (4);
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(int(0), a[3]);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
void test_buffer_constructor_default()
{
value_type * buffer = alloc_and_init_buffer();
@@ -347,7 +320,7 @@ struct Tester
{
value_type * buffer = alloc_and_init_buffer();
tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
+ BOOST_CHECK_EQUAL(static_cast<int*>(0), a.get_buffer(true));
tested_sequence::freebuf(buffer);
}
@@ -364,7 +337,6 @@ struct Tester
BOOST_CHECK_EQUAL(0UL, b.maximum());
BOOST_CHECK_EQUAL(0UL, b.length());
BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
BOOST_CHECK_MESSAGE(c.expect(1), c);
@@ -408,10 +380,6 @@ struct Tester
shared_this));
ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_regression_2201 ,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
&Tester::test_buffer_constructor_default,
shared_this));
ts->add(BOOST_CLASS_TEST_CASE(
@@ -455,23 +423,23 @@ private:
boost::weak_ptr<Tester> self_;
};
-ACE_Proper_Export_Flag test_suite *
+test_suite *
init_unit_test_suite(int, char*[])
{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded value sequence unit test");
+ std::auto_ptr<test_suite> ts(
+ BOOST_TEST_SUITE("unbounded value sequence unit test"));
{
boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
{
typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common;
boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
+ tester->add_all(ts.get());
}
- return ts;
+ return ts.release();
}
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_wstring_sequence.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_wstring_sequence.hpp
index 50a503e62b3..27b8e611167 100644
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_wstring_sequence.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/unbounded_wstring_sequence.hpp
@@ -11,8 +11,6 @@
*/
#include "unbounded_basic_string_sequence.hpp"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
@@ -38,5 +36,4 @@ public:
} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_unbounded_wstring_sequence_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp b/TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp
index 02e88aad88e..2d936090ff6 100644
--- a/TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp
@@ -9,20 +9,16 @@
*
* @author Carlos O'Ryan
*/
-#include "tao/Basic_Types.h"
#include <boost/test/unit_test.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
template<class tested_sequence,
class tested_allocation_traits>
struct value_sequence_tester
{
typedef typename tested_sequence::value_type value_type;
- typedef typename tested_sequence::const_value_type const_value_type;
void test_default_constructor()
{
@@ -70,7 +66,7 @@ struct value_sequence_tester
x.length(8);
tested_sequence const & y = x;
- const_value_type & z = y[4];
+ int const & z = y[4];
BOOST_CHECK_EQUAL(z, y[4]);
}
@@ -80,7 +76,7 @@ struct value_sequence_tester
x.length(8);
tested_sequence const & y = x;
- const_value_type & z = y[4];
+ int const & z = y[4];
x[4] = 4;
BOOST_CHECK_EQUAL(4, x[4]);
BOOST_CHECK_EQUAL(4, y[4]);
@@ -265,5 +261,4 @@ private:
boost::weak_ptr<value_sequence_tester> self_;
};
-TAO_END_VERSIONED_NAMESPACE_DECL
#endif // guard_value_sequence_tester_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/value_traits.hpp b/TAO/tests/Sequence_Unit_Tests/value_traits.hpp
index 91bb20e8696..b491b8bdabd 100644
--- a/TAO/tests/Sequence_Unit_Tests/value_traits.hpp
+++ b/TAO/tests/Sequence_Unit_Tests/value_traits.hpp
@@ -10,12 +10,9 @@
*
* @author Carlos O'Ryan
*/
-#include "tao/Basic_Types.h"
#include <algorithm>
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
namespace TAO
{
namespace details
@@ -28,16 +25,12 @@ struct value_traits
typedef T const const_value_type;
inline static void zero_range(
- value_type * begin , value_type * end)
- {
- std::fill(begin, end, value_type ());
- }
+ value_type * /* begin */, value_type * /* end */)
+ {}
inline static void initialize_range(
- value_type * begin, value_type * end)
- {
- std::fill(begin, end, value_type ());
- }
+ value_type * /* begin */, value_type * /* end */)
+ {}
inline static void copy_range(
value_type * begin, value_type * end, value_type *dst)
@@ -49,6 +42,4 @@ struct value_traits
} // namespace details
} // namespace CORBA
-TAO_END_VERSIONED_NAMESPACE_DECL
-
#endif // guard_value_traits_hpp
diff --git a/TAO/tests/Servant_To_Reference_Test/server.cpp b/TAO/tests/Servant_To_Reference_Test/server.cpp
index 65139d0cd63..fa92caadb7f 100644
--- a/TAO/tests/Servant_To_Reference_Test/server.cpp
+++ b/TAO/tests/Servant_To_Reference_Test/server.cpp
@@ -4,6 +4,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Hello,
server,
@@ -75,7 +76,7 @@ MT_Task::svc (void)
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -99,12 +100,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -124,7 +127,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
One_Impl *one_impl;
diff --git a/TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc b/TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc
index a50eda03b14..99546099606 100644
--- a/TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc
+++ b/TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Server_Connection_Purging/client.cpp b/TAO/tests/Server_Connection_Purging/client.cpp
index 80d03ad751b..f6307a02c90 100644
--- a/TAO/tests/Server_Connection_Purging/client.cpp
+++ b/TAO/tests/Server_Connection_Purging/client.cpp
@@ -4,6 +4,7 @@
#include "ace/SOCK_Connector.h"
#include "ace/TP_Reactor.h"
#include "ace/Reactor.h"
+#include "ace/Argv_Type_Converter.h"
const char *host = "localhost";
static int port = 10008;
@@ -13,7 +14,7 @@ int purged_handles = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "h:p:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "h:p:");
int c;
while ((c = get_opts ()) != -1)
@@ -70,9 +71,11 @@ Purging_Handler::handle_close (ACE_HANDLE h,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
- if (parse_args (argc, argv) == -1)
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
return -1;
ACE_Select_Reactor sr;
diff --git a/TAO/tests/Server_Connection_Purging/server.cpp b/TAO/tests/Server_Connection_Purging/server.cpp
index 52c7b5e6395..431410e2ee5 100644
--- a/TAO/tests/Server_Connection_Purging/server.cpp
+++ b/TAO/tests/Server_Connection_Purging/server.cpp
@@ -3,13 +3,14 @@
#include "Test_i.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
const char *ior_output_file = "server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "");
int c;
while ((c = get_opts ()) != -1)
@@ -28,14 +29,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -55,7 +58,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
test_i *test_impl;
@@ -73,7 +76,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Server_Leaks/Server_Leaks.mpc b/TAO/tests/Server_Leaks/Server_Leaks.mpc
index 4517bde0f91..6e565915472 100644
--- a/TAO/tests/Server_Leaks/Server_Leaks.mpc
+++ b/TAO/tests/Server_Leaks/Server_Leaks.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Server_Leaks/client.cpp b/TAO/tests/Server_Leaks/client.cpp
index c8263903192..aee5f7f75b7 100644
--- a/TAO/tests/Server_Leaks/client.cpp
+++ b/TAO/tests/Server_Leaks/client.cpp
@@ -2,6 +2,7 @@
#include "TestC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Server_Leaks, client, "$Id$")
@@ -11,7 +12,7 @@ int do_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:x");
int c;
while ((c = get_opts ()) != -1)
@@ -40,15 +41,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Server_Leaks/server.cpp b/TAO/tests/Server_Leaks/server.cpp
index 0a037cdb95d..dd1e9ca6d17 100644
--- a/TAO/tests/Server_Leaks/server.cpp
+++ b/TAO/tests/Server_Leaks/server.cpp
@@ -3,6 +3,7 @@
#include "Ping_Service.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Server_Leaks, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Ping_Service *ping_service_impl;
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Server_Port_Zero/server.cpp b/TAO/tests/Server_Port_Zero/server.cpp
index 4375a5c4b06..4b151115b64 100644
--- a/TAO/tests/Server_Port_Zero/server.cpp
+++ b/TAO/tests/Server_Port_Zero/server.cpp
@@ -3,6 +3,7 @@
#include "Hello.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Server_Port_Zero,
server,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -37,12 +38,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -62,7 +65,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Hello *hello_impl;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Single_Read/Single_Read.mpc b/TAO/tests/Single_Read/Single_Read.mpc
index bfb96e8b536..4c15c26f959 100644
--- a/TAO/tests/Single_Read/Single_Read.mpc
+++ b/TAO/tests/Single_Read/Single_Read.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Single_Read/client.cpp b/TAO/tests/Single_Read/client.cpp
index 7e69d9350cf..7e50c036384 100644
--- a/TAO/tests/Single_Read/client.cpp
+++ b/TAO/tests/Single_Read/client.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
ACE_RCSID(Timed_Buffered_Oneways, client, "$Id$")
@@ -23,7 +24,7 @@ static int shutdown_server = 0;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "k:i:d:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:i:d:x");
int c;
while ((c = get_opts ()) != -1)
@@ -69,22 +70,24 @@ parse_args (int argc, char **argv)
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
+ int parse_args_result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (parse_args_result != 0)
return parse_args_result;
diff --git a/TAO/tests/Single_Read/server.cpp b/TAO/tests/Single_Read/server.cpp
index 20af40930ea..7726dbc073a 100644
--- a/TAO/tests/Single_Read/server.cpp
+++ b/TAO/tests/Single_Read/server.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Timed_Buffered_Oneways, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,13 +36,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
test_i servant (orb.in ());
@@ -76,7 +79,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Smart_Proxies/Benchmark/client.cpp b/TAO/tests/Smart_Proxies/Benchmark/client.cpp
index 44b0573c343..6867bd8560d 100644
--- a/TAO/tests/Smart_Proxies/Benchmark/client.cpp
+++ b/TAO/tests/Smart_Proxies/Benchmark/client.cpp
@@ -25,6 +25,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_errno.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Benchmark,
client,
@@ -47,7 +48,7 @@ class Marker
ACE_UINT32 gsf)
{
// Print stats
- this->throughput_.dump_results (msg, gsf);
+ this->throughput_.dump_results (ACE_TEXT_TO_TCHAR_IN(msg), gsf);
}
void sample (ACE_hrtime_t throughput_diff,
ACE_hrtime_t latency_diff)
@@ -66,7 +67,7 @@ class Marker
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:n:r:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:n:r:");
int c;
while ((c = get_opts ()) != -1)
@@ -95,8 +96,10 @@ parse_args (int argc, char *argv[])
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int priority =
(ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
+ ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
@@ -120,13 +123,13 @@ main (int argc, char *argv[])
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Smart_Proxies/Benchmark/server.cpp b/TAO/tests/Smart_Proxies/Benchmark/server.cpp
index ca2acbcbec2..53416a8fc49 100644
--- a/TAO/tests/Smart_Proxies/Benchmark/server.cpp
+++ b/TAO/tests/Smart_Proxies/Benchmark/server.cpp
@@ -19,6 +19,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Benchmark, server, "$Id$")
@@ -76,7 +77,7 @@ static const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -99,17 +100,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -145,7 +148,7 @@ main (int argc, char *argv[])
if (ior_output_file != 0)
{
FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
+ ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/Smart_Proxies/Collocation/main.cpp b/TAO/tests/Smart_Proxies/Collocation/main.cpp
index dff11cb451f..d0b32c908a6 100644
--- a/TAO/tests/Smart_Proxies/Collocation/main.cpp
+++ b/TAO/tests/Smart_Proxies/Collocation/main.cpp
@@ -2,16 +2,19 @@
#include "Coll_Tester.h"
#include "tao/Strategies/advanced_resource.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Collocation, main, "$Id$")
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
Collocation_Test coll_test;
ACE_TRY_NEW_ENV
{
- coll_test.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ coll_test.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
coll_test.run (ACE_ENV_SINGLE_ARG_PARAMETER);
diff --git a/TAO/tests/Smart_Proxies/On_Demand/client.cpp b/TAO/tests/Smart_Proxies/On_Demand/client.cpp
index 2ba4e74ca80..953737c9b28 100644
--- a/TAO/tests/Smart_Proxies/On_Demand/client.cpp
+++ b/TAO/tests/Smart_Proxies/On_Demand/client.cpp
@@ -20,6 +20,7 @@
#include "ace/Get_Opt.h"
#include "testC.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Smart_Proxy, client, "$Id$")
@@ -28,7 +29,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:");
int c;
while ((c = get_opts ()) != -1)
@@ -51,18 +52,20 @@ parse_args (int argc, char *argv[])
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Smart_Proxies/On_Demand/server.cpp b/TAO/tests/Smart_Proxies/On_Demand/server.cpp
index 5f0ebde1ffa..ba4cf4591d8 100644
--- a/TAO/tests/Smart_Proxies/On_Demand/server.cpp
+++ b/TAO/tests/Smart_Proxies/On_Demand/server.cpp
@@ -19,6 +19,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Smart_Proxy, server, "$Id$")
@@ -74,7 +75,7 @@ static const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -97,17 +98,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -143,7 +146,7 @@ main (int argc, char *argv[])
if (ior_output_file != 0)
{
FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
+ ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/Smart_Proxies/Policy/client.cpp b/TAO/tests/Smart_Proxies/Policy/client.cpp
index 6a0bb7ee459..e8853ed58ea 100644
--- a/TAO/tests/Smart_Proxies/Policy/client.cpp
+++ b/TAO/tests/Smart_Proxies/Policy/client.cpp
@@ -20,6 +20,7 @@
#include "ace/OS_NS_string.h"
#include "testC.h"
#include "Smart_Proxy_Impl.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Smart_Proxy, client, "$Id$")
@@ -30,7 +31,7 @@ int one_shot_factory = 1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:j:f:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:j:f:");
int c;
while ((c = get_opts ()) != -1)
@@ -105,18 +106,20 @@ return 0;
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// To use the smart proxy it is necessary to allocate the
diff --git a/TAO/tests/Smart_Proxies/Policy/server.cpp b/TAO/tests/Smart_Proxies/Policy/server.cpp
index 7e000c323d3..aa32dd1a5b3 100644
--- a/TAO/tests/Smart_Proxies/Policy/server.cpp
+++ b/TAO/tests/Smart_Proxies/Policy/server.cpp
@@ -19,6 +19,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Smart_Proxy, server, "$Id$")
@@ -74,7 +75,7 @@ static const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -97,17 +98,19 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -143,7 +146,7 @@ main (int argc, char *argv[])
if (ior_output_file != 0)
{
FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
+ ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/Smart_Proxies/Smart_Proxies.mpc b/TAO/tests/Smart_Proxies/Smart_Proxies.mpc
index 473bc9b4087..d9d43ad9a29 100644
--- a/TAO/tests/Smart_Proxies/Smart_Proxies.mpc
+++ b/TAO/tests/Smart_Proxies/Smart_Proxies.mpc
@@ -8,7 +8,6 @@ project(*Server): taoserver, smart_proxies {
}
project(*Client): taoclient, portableserver, smart_proxies {
- after += *Server
Source_Files {
testC.cpp
Smart_Proxy_Impl.cpp
diff --git a/TAO/tests/Smart_Proxies/client.cpp b/TAO/tests/Smart_Proxies/client.cpp
index 158621d0a73..94dd6b472c0 100644
--- a/TAO/tests/Smart_Proxies/client.cpp
+++ b/TAO/tests/Smart_Proxies/client.cpp
@@ -21,6 +21,7 @@
#include "Smart_Proxy_Impl.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Smart_Proxy, client, "$Id$")
@@ -29,7 +30,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:");
int c;
while ((c = get_opts ()) != -1)
@@ -52,18 +53,20 @@ parse_args (int argc, char *argv[])
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Smart_Proxies/dtor/client.cpp b/TAO/tests/Smart_Proxies/dtor/client.cpp
index 5091bce84b5..9429a29675d 100644
--- a/TAO/tests/Smart_Proxies/dtor/client.cpp
+++ b/TAO/tests/Smart_Proxies/dtor/client.cpp
@@ -3,6 +3,7 @@
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_unistd.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
#include "Smart_Proxy_Impl.h"
@@ -12,7 +13,7 @@ bool dtor_called;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:");
int c;
while ((c = get_opts ()) != -1)
@@ -33,17 +34,19 @@ parse_args (int argc, char *argv[])
return 0;
}
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var obj = orb->string_to_object (ior
diff --git a/TAO/tests/Smart_Proxies/dtor/run_test.pl b/TAO/tests/Smart_Proxies/dtor/run_test.pl
index c6e2ba1ddbf..1c38e185287 100755
--- a/TAO/tests/Smart_Proxies/dtor/run_test.pl
+++ b/TAO/tests/Smart_Proxies/dtor/run_test.pl
@@ -13,22 +13,12 @@ $iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
+$SV = new PerlACE::Process ("server", "-o $iorfile");
$CL = new PerlACE::Process ("client", "-i file://$iorfile");
print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-$svr = $SV->Spawn ();
-
-if ($svr != 0) {
- print STDERR "ERROR: server returned $svr\n";
- exit 1;
-}
+$SV->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile,
$PerlACE::wait_interval_for_process_creation) == -1) {
diff --git a/TAO/tests/Smart_Proxies/dtor/server.cpp b/TAO/tests/Smart_Proxies/dtor/server.cpp
index fa9eadf988b..d37451d330e 100644
--- a/TAO/tests/Smart_Proxies/dtor/server.cpp
+++ b/TAO/tests/Smart_Proxies/dtor/server.cpp
@@ -3,6 +3,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
class Test_i: public virtual POA_Test
{
@@ -45,7 +46,7 @@ static const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -67,19 +68,21 @@ parse_args (int argc, char *argv[])
return 0;
}
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Obtain RootPOA.
@@ -120,7 +123,7 @@ int main (int argc, char* argv[])
if (ior_output_file != 0)
{
FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
+ ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/Smart_Proxies/server.cpp b/TAO/tests/Smart_Proxies/server.cpp
index 0fc44b24f0f..1e8efa70908 100644
--- a/TAO/tests/Smart_Proxies/server.cpp
+++ b/TAO/tests/Smart_Proxies/server.cpp
@@ -19,6 +19,7 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Smart_Proxy, server, "$Id$")
@@ -74,7 +75,7 @@ static const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -97,19 +98,21 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Test_i servant (orb.in ());
@@ -143,7 +146,7 @@ main (int argc, char *argv[])
if (ior_output_file != 0)
{
FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
+ ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/Stack_Recursion/Stack_Recursion.mpc b/TAO/tests/Stack_Recursion/Stack_Recursion.mpc
index ce10971c433..253a61435dc 100644
--- a/TAO/tests/Stack_Recursion/Stack_Recursion.mpc
+++ b/TAO/tests/Stack_Recursion/Stack_Recursion.mpc
@@ -12,7 +12,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
TestC.cpp
client.cpp
diff --git a/TAO/tests/Stack_Recursion/client.cpp b/TAO/tests/Stack_Recursion/client.cpp
index b9db252871c..d5525d9bae9 100644
--- a/TAO/tests/Stack_Recursion/client.cpp
+++ b/TAO/tests/Stack_Recursion/client.cpp
@@ -2,6 +2,7 @@
#include "Client_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Stack_Recursion,
client,
@@ -12,7 +13,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,15 +36,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Stack_Recursion/server.cpp b/TAO/tests/Stack_Recursion/server.cpp
index 03dc154d085..0295980af7c 100644
--- a/TAO/tests/Stack_Recursion/server.cpp
+++ b/TAO/tests/Stack_Recursion/server.cpp
@@ -3,6 +3,7 @@
#include "Sender.h"
#include "Server_Task.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Stack_Recursion,
server,
@@ -13,7 +14,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,12 +37,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -61,7 +64,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Sender *sender_impl;
@@ -80,7 +83,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Strategies/Strategies.mpc b/TAO/tests/Strategies/Strategies.mpc
index 32f5969e832..94da5a64615 100644
--- a/TAO/tests/Strategies/Strategies.mpc
+++ b/TAO/tests/Strategies/Strategies.mpc
@@ -9,7 +9,6 @@ project(*Server): strategies, messaging, taoexe, portableserver {
}
project(*Client): strategies, messaging, taoexe, portableserver {
- after += *Server
Source_Files {
simple_testC.cpp
client.cpp
diff --git a/TAO/tests/Strategies/client.cpp b/TAO/tests/Strategies/client.cpp
index a554f94fea5..5cf2094c1a7 100644
--- a/TAO/tests/Strategies/client.cpp
+++ b/TAO/tests/Strategies/client.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "simple_testC.h"
ACE_RCSID(tests, client, "$Id$")
@@ -12,7 +13,7 @@ int server_shutdown = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:x");
int c;
while ((c = get_opts ()) != -1)
@@ -62,15 +63,17 @@ Client::Client ()
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Strategies/server.cpp b/TAO/tests/Strategies/server.cpp
index 9e1de742de4..06c4a905ae0 100644
--- a/TAO/tests/Strategies/server.cpp
+++ b/TAO/tests/Strategies/server.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
#include "simple_test_i.h"
ACE_RCSID(tests, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
Simple_Server_i server_impl (orb.in ());
@@ -77,7 +80,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc b/TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc
index 1bd7978c70a..cabea05ca6b 100644
--- a/TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc
+++ b/TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc
@@ -9,7 +9,6 @@ project(*Server): messaging, taoexe, portableserver {
}
project(*Client): messaging, taoexe, portableserver {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Timed_Buffered_Oneways/client.cpp b/TAO/tests/Timed_Buffered_Oneways/client.cpp
index 9878f57d8b8..f4720bbfd22 100644
--- a/TAO/tests/Timed_Buffered_Oneways/client.cpp
+++ b/TAO/tests/Timed_Buffered_Oneways/client.cpp
@@ -23,6 +23,7 @@
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Timed_Buffered_Oneways, client, "$Id$")
@@ -54,7 +55,7 @@ static int shutdown_server = 0;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "ek:i:d:t:w:z:x");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "ek:i:d:t:w:z:x");
int c;
while ((c = get_opts ()) != -1)
@@ -237,22 +238,24 @@ setup_buffering_constraints (CORBA::ORB_ptr orb
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
+ int parse_args_result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (parse_args_result != 0)
return parse_args_result;
diff --git a/TAO/tests/Timed_Buffered_Oneways/server.cpp b/TAO/tests/Timed_Buffered_Oneways/server.cpp
index 20af40930ea..7726dbc073a 100644
--- a/TAO/tests/Timed_Buffered_Oneways/server.cpp
+++ b/TAO/tests/Timed_Buffered_Oneways/server.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Timed_Buffered_Oneways, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,13 +36,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
test_i servant (orb.in ());
@@ -76,7 +79,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Timeout/Timeout.mpc b/TAO/tests/Timeout/Timeout.mpc
index 5826c607d6e..926002380e8 100644
--- a/TAO/tests/Timeout/Timeout.mpc
+++ b/TAO/tests/Timeout/Timeout.mpc
@@ -9,7 +9,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, messaging {
- after += *Server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Timeout/client.cpp b/TAO/tests/Timeout/client.cpp
index 7d0ff876ea7..f07ee0b618a 100644
--- a/TAO/tests/Timeout/client.cpp
+++ b/TAO/tests/Timeout/client.cpp
@@ -5,6 +5,7 @@
#include "tao/Messaging/Messaging.h"
#include "tao/AnyTypeCode/Any.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Timeout, client, "$Id$")
@@ -15,7 +16,7 @@ int max_timeout = 20;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:l:h:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:l:h:");
int c;
while ((c = get_opts ()) != -1)
@@ -86,15 +87,17 @@ send_echo (CORBA::ORB_ptr orb,
}
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/tests/Timeout/server.cpp b/TAO/tests/Timeout/server.cpp
index 3fd05a6c9db..2c5a8ebf7d6 100644
--- a/TAO/tests/Timeout/server.cpp
+++ b/TAO/tests/Timeout/server.cpp
@@ -3,6 +3,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Timeout, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -36,15 +37,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var poa_object =
@@ -79,7 +82,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Two_Objects/First_i.cpp b/TAO/tests/Two_Objects/First_i.cpp
index b275e55e0be..6e0c6e2c465 100644
--- a/TAO/tests/Two_Objects/First_i.cpp
+++ b/TAO/tests/Two_Objects/First_i.cpp
@@ -7,9 +7,8 @@
#include "tao/debug.h"
#include "tao/Transport_Cache_Manager.h"
#include "ace/Synch.h"
-#include "ace/Auto_Event.h"
-ACE_RCSID(Test, First_i, "$Id$")
+ACE_RCSID(Test, Test, "$Id$")
First_i::First_i (CORBA::ORB_ptr orb, ACE_Auto_Event &two_way_done)
: orb_ (CORBA::ORB::_duplicate (orb)),
diff --git a/TAO/tests/Two_Objects/First_i.h b/TAO/tests/Two_Objects/First_i.h
index 6fa70f53749..9273bf283cb 100644
--- a/TAO/tests/Two_Objects/First_i.h
+++ b/TAO/tests/Two_Objects/First_i.h
@@ -1,16 +1,13 @@
-// -*- C++ -*-
//
// $Id$
+//
#ifndef TAO_TWO_OBJECTS_FIRST_I_H
#define TAO_TWO_OBJECTS_FIRST_I_H
#include "Two_ObjectsS.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Auto_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
+#include "ace/Auto_Event.h"
/// Implement the Two_Objects_Test::First interface
class First_i
diff --git a/TAO/tests/Two_Objects/Object_Factory_i.h b/TAO/tests/Two_Objects/Object_Factory_i.h
index fbfd2ef094c..2eab1c9966f 100644
--- a/TAO/tests/Two_Objects/Object_Factory_i.h
+++ b/TAO/tests/Two_Objects/Object_Factory_i.h
@@ -1,6 +1,6 @@
-// -*- C++ -*-
//
// $Id$
+//
#ifndef OBJECT_FACTORY_I_H
#define OBJECT_FACTORY_I_H
@@ -9,8 +9,7 @@
#include "First_i.h"
#include "Second_i.h"
-#include "ace/Auto_Event.h"
-
+class ACE_Event;
/// Implement the MTServer::Test interface
class Object_Factory_i
diff --git a/TAO/tests/Two_Objects/Second_i.h b/TAO/tests/Two_Objects/Second_i.h
index aa0375c9b2f..30a6f0d2e09 100644
--- a/TAO/tests/Two_Objects/Second_i.h
+++ b/TAO/tests/Two_Objects/Second_i.h
@@ -1,15 +1,13 @@
-// -*- C++ -*-
//
// $Id$
+//
#ifndef TAO_TWO_OBJECTS_SECOND_I_H
#define TAO_TWO_OBEJCTS_SECOND_I_H
#include "Two_ObjectsS.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Auto_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
/// Implement the POA_Two_Objects_Test::Second interface
class Second_i
diff --git a/TAO/tests/Two_Objects/Two_Objects.mpc b/TAO/tests/Two_Objects/Two_Objects.mpc
index 1dbe304222f..de36db49c6a 100644
--- a/TAO/tests/Two_Objects/Two_Objects.mpc
+++ b/TAO/tests/Two_Objects/Two_Objects.mpc
@@ -12,7 +12,6 @@ project(*Server): taoserver {
}
project(*Client): taoclient, anytypecode {
- after += *Server
Source_Files {
Two_ObjectsC.cpp
client.cpp
diff --git a/TAO/tests/Two_Objects/client.cpp b/TAO/tests/Two_Objects/client.cpp
index d93a387409a..2a0d3b7a888 100644
--- a/TAO/tests/Two_Objects/client.cpp
+++ b/TAO/tests/Two_Objects/client.cpp
@@ -2,6 +2,7 @@
#include "Two_ObjectsC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Test, client, "$Id$")
@@ -10,7 +11,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "r:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "r:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,8 +35,10 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
// Used to declare the CORBA::Environment variable
ACE_DECLARE_NEW_CORBA_ENV;
@@ -43,11 +46,11 @@ main (int argc, char *argv[])
{
// Initialize the ORB
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse the arguments
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
// Convert the ior string to an object reference.
diff --git a/TAO/tests/Two_Objects/server.cpp b/TAO/tests/Two_Objects/server.cpp
index 639cb344ab8..b05eaea3dca 100644
--- a/TAO/tests/Two_Objects/server.cpp
+++ b/TAO/tests/Two_Objects/server.cpp
@@ -4,6 +4,7 @@
#include "Object_Factory_i.h"
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Test, server, "$Id$")
@@ -16,7 +17,7 @@ int timeout = 30; //default timeout for ORB is 30 sec
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:n:l:t:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:n:l:t:");
int c;
while ((c = get_opts ()) != -1)
@@ -55,13 +56,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize the ORB
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Get initial reference to the Root POA
@@ -85,7 +88,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// Parse the arguments
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
ACE_DEBUG(( LM_DEBUG, "ior file = %s\t#threads = %d\t"
@@ -111,7 +114,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tests/Typedef_String_Array/client.cpp b/TAO/tests/Typedef_String_Array/client.cpp
index 4637dc4b943..2579a631234 100644
--- a/TAO/tests/Typedef_String_Array/client.cpp
+++ b/TAO/tests/Typedef_String_Array/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(StringArray, client, "$Id$")
@@ -10,7 +11,7 @@ const char *ior = "file://server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,15 +35,17 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var tmp =
diff --git a/TAO/tests/Typedef_String_Array/server.cpp b/TAO/tests/Typedef_String_Array/server.cpp
index 51f5f7792af..646f695570c 100644
--- a/TAO/tests/Typedef_String_Array/server.cpp
+++ b/TAO/tests/Typedef_String_Array/server.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
#include "testImpl.h"
ACE_RCSID(MT_Client, server, "$Id$")
@@ -11,7 +12,7 @@ const char *ior_output_file = "server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,12 +35,14 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -59,7 +62,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
TestImpl test_impl (orb.in ());
@@ -76,7 +79,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Typedef_String_Array/typedef_string_array.mpc b/TAO/tests/Typedef_String_Array/typedef_string_array.mpc
index a28ade36239..3124c65910a 100644
--- a/TAO/tests/Typedef_String_Array/typedef_string_array.mpc
+++ b/TAO/tests/Typedef_String_Array/typedef_string_array.mpc
@@ -9,7 +9,6 @@ project(*server): taoserver {
}
project(*client): taoclient, anytypecode {
- after += *server
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc b/TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc
index 0fe69a4a621..91fc9d79183 100644
--- a/TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc
+++ b/TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc
@@ -2,13 +2,14 @@
// $Id$
project(*Server): taoserver, exceptions {
+ idlflags = -Ge 0
Source_Files {
server.cpp
}
}
project(*Client): taoclient, anytypecode, exceptions {
- after += *Server
+ idlflags = -Ge 0
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/UNKNOWN_Exception/client.cpp b/TAO/tests/UNKNOWN_Exception/client.cpp
index 548b4b99e94..5735c1278ff 100644
--- a/TAO/tests/UNKNOWN_Exception/client.cpp
+++ b/TAO/tests/UNKNOWN_Exception/client.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
ACE_RCSID (UNKNOWN_Exception, client, "$Id$")
@@ -11,7 +12,7 @@ static int shutdown_server = 1;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "k:x:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:x:");
int c;
while ((c = get_opts ()) != -1)
@@ -42,17 +43,19 @@ parse_args (int argc, char **argv)
}
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0);
int result =
- parse_args (argc, argv);
+ parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;
diff --git a/TAO/tests/UNKNOWN_Exception/server.cpp b/TAO/tests/UNKNOWN_Exception/server.cpp
index 2beb08f85fa..0d5321adee3 100644
--- a/TAO/tests/UNKNOWN_Exception/server.cpp
+++ b/TAO/tests/UNKNOWN_Exception/server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "testS.h"
#include "tao/PortableServer/Root_POA.h"
#include "ace/OS_NS_stdio.h"
@@ -160,7 +161,7 @@ test_factory_i::shutdown (void)
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -184,13 +185,15 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
"");
CORBA::Object_var poa_object =
@@ -202,7 +205,7 @@ main (int argc, char *argv[])
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return -1;
{
@@ -218,7 +221,7 @@ main (int argc, char *argv[])
CORBA::String_var ior =
orb->object_to_string (test_factory.in ());
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/tests/Xt_Stopwatch/Client.h b/TAO/tests/Xt_Stopwatch/Client.h
index 978e0f3c3b1..69f573d0d52 100644
--- a/TAO/tests/Xt_Stopwatch/Client.h
+++ b/TAO/tests/Xt_Stopwatch/Client.h
@@ -47,7 +47,7 @@ public:
void add_callback (Control &);
// Adds the callbacks to the GUI underneath.....
- void parse_args (int argc, char *argv[]
+ void parse_args (int argc, ACE_TCHAR *argv[]
ACE_ENV_ARG_DECL);
private:
diff --git a/TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc b/TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc
index cbfa1580e94..d98e1e04898 100644
--- a/TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc
+++ b/TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc
@@ -11,7 +11,6 @@ project(*Server): taoexe, portableserver, tao_xtresource, ace_motif {
}
project(*Client): taoexe, tao_xtresource, ace_motif {
- after += *Server
Source_Files {
testC.cpp
Control.cpp
diff --git a/TAO/tests/Xt_Stopwatch/client.cpp b/TAO/tests/Xt_Stopwatch/client.cpp
index 713ddb68f84..e1a40aeb2b1 100644
--- a/TAO/tests/Xt_Stopwatch/client.cpp
+++ b/TAO/tests/Xt_Stopwatch/client.cpp
@@ -2,6 +2,7 @@
#include "testC.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Xt_Stopwatch, client, "$Id$")
@@ -10,8 +11,10 @@ ACE_RCSID(Xt_Stopwatch, client, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
XtAppContext app;
Widget toplevel = XtAppInitialize (&app,
"Start & Stop",
@@ -32,12 +35,12 @@ main (int argc, char *argv[])
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Client client (orb.in ());
- client.parse_args (argc, argv ACE_ENV_ARG_PARAMETER);
+ client.parse_args (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
client.add_callback (control);
@@ -72,7 +75,7 @@ Client::parse_args (int argc,
{
const char *ior = "file://test.ior";
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
diff --git a/TAO/tests/Xt_Stopwatch/server.cpp b/TAO/tests/Xt_Stopwatch/server.cpp
index 374dcb368f0..0301e39050d 100644
--- a/TAO/tests/Xt_Stopwatch/server.cpp
+++ b/TAO/tests/Xt_Stopwatch/server.cpp
@@ -3,6 +3,7 @@
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Xt_Stopwatch,
server,
@@ -18,7 +19,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -42,10 +43,12 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
// We do the command line parsing first
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
XtAppContext app;
@@ -68,7 +71,7 @@ main (int argc, char *argv[])
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -108,7 +111,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",