diff options
author | msmit <msmit@remedy.nl> | 2011-09-16 07:34:42 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2011-09-16 07:34:42 +0000 |
commit | 656ddcc9ec689f21a849d634232b414a35562688 (patch) | |
tree | 7a9dfe2fed94c329261e623598efaa29a3ca142b /TAO/tests | |
parent | fd9525d70cf2debbb5d4e0402bcd2b705f7031ed (diff) | |
download | ATCD-656ddcc9ec689f21a849d634232b414a35562688.tar.gz |
Fri Sep 16 07:37:12 UTC 2011 Marcel Smit <msmit@remedy.nl>
* tests/Connect_Strategy_Test/run_test.pl:
* tests/MT_BiDir/run_test.pl:
* tests/MT_Server/run_test.pl:
* tests/No_Server_MT_Connect_Test/run_test.pl:
* tests/RTCORBA/Server_Protocol/run_test.pl:
Copy only those configuration files that are needed by the targets.
We don't want to solve this in the test framework; the script knows
which configuration files should be copied.
Diffstat (limited to 'TAO/tests')
-rwxr-xr-x | TAO/tests/Connect_Strategy_Test/run_test.pl | 18 | ||||
-rwxr-xr-x | TAO/tests/MT_BiDir/run_test.pl | 9 | ||||
-rwxr-xr-x | TAO/tests/MT_Server/run_test.pl | 11 | ||||
-rwxr-xr-x | TAO/tests/No_Server_MT_Connect_Test/run_test.pl | 21 | ||||
-rwxr-xr-x | TAO/tests/RTCORBA/Server_Protocol/run_test.pl | 37 |
5 files changed, 83 insertions, 13 deletions
diff --git a/TAO/tests/Connect_Strategy_Test/run_test.pl b/TAO/tests/Connect_Strategy_Test/run_test.pl index 01ee992887d..ae333b28998 100755 --- a/TAO/tests/Connect_Strategy_Test/run_test.pl +++ b/TAO/tests/Connect_Strategy_Test/run_test.pl @@ -21,15 +21,25 @@ my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 fail my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; my $iorbase = "server.ior"; -my $reactor_conf = "reactor$PerlACE::svcconf_ext"; -my $blocked_conf = "blocked$PerlACE::svcconf_ext"; my $server_iorfile = $server->LocalFile ($iorbase); my $client_iorfile = $client->LocalFile ($iorbase); -my $client_reactor_conf = $client->LocalFile ($reactor_conf); -my $client_blocked_conf = $client->LocalFile ($blocked_conf); $server->DeleteFile($iorbase); $client->DeleteFile($iorbase); +my $reactor_conf = "reactor$PerlACE::svcconf_ext"; +my $client_reactor_conf = $client->LocalFile ($reactor_conf); +if ($client->PutFile ($reactor_conf) == -1) { + print STDERR "ERROR: cannot set file <$client_reactor_conf>\n"; + exit 1; +} + +my $blocked_conf = "blocked$PerlACE::svcconf_ext"; +my $client_blocked_conf = $client->LocalFile ($blocked_conf); +if ($client->PutFile ($blocked_conf) == -1) { + print STDERR "ERROR: cannot set file <$client_blocked_conf>\n"; + exit 1; +} + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); $CL = $client->CreateProcess ("client", "-k file://$client_iorfile"); $server_status = $SV->Spawn (); diff --git a/TAO/tests/MT_BiDir/run_test.pl b/TAO/tests/MT_BiDir/run_test.pl index 1d7ba7e9b5b..4134c5f8e59 100755 --- a/TAO/tests/MT_BiDir/run_test.pl +++ b/TAO/tests/MT_BiDir/run_test.pl @@ -32,7 +32,14 @@ $client1->DeleteFile($iorbase); $client2->DeleteFile($iorbase); $client3->DeleteFile($iorbase); -my $server_conf = $server->LocalFile ("server$PerlACE::svcconf_ext"); +my $server_conf_base = "server$PerlACE::svcconf_ext"; +my $server_conf = $server->LocalFile ($server_conf_base); + +# Copy the configuration file to the target. +if ($server->PutFile ($server_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_conf>\n"; + exit 1; +} $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -ORBSvcConf $server_conf " . diff --git a/TAO/tests/MT_Server/run_test.pl b/TAO/tests/MT_Server/run_test.pl index 3ff7697d0a8..0f00de54ae5 100755 --- a/TAO/tests/MT_Server/run_test.pl +++ b/TAO/tests/MT_Server/run_test.pl @@ -24,9 +24,7 @@ my $client2 = PerlACE::TestTarget::create_target (3) || die "Create target 3 fai my $client3 = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n"; my $iorbase = "server.ior"; -my $svcconf = "server$PerlACE::svcconf_ext"; my $server_iorfile = $server->LocalFile ($iorbase); -my $server_svcfile = $server->LocalFile ($svcconf); my $client1_iorfile = $client1->LocalFile ($iorbase); my $client2_iorfile = $client2->LocalFile ($iorbase); my $client3_iorfile = $client3->LocalFile ($iorbase); @@ -35,6 +33,15 @@ $client1->DeleteFile($iorbase); $client2->DeleteFile($iorbase); $client3->DeleteFile($iorbase); +my $svcconf = "server$PerlACE::svcconf_ext"; +my $server_svcfile = $server->LocalFile ($svcconf); + +# Copy the configuration file to the target. +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcfile>\n"; + exit 1; +} + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level ". "-ORBSvcConf $server_svcfile ". diff --git a/TAO/tests/No_Server_MT_Connect_Test/run_test.pl b/TAO/tests/No_Server_MT_Connect_Test/run_test.pl index afc5b2a0938..f850acc2865 100755 --- a/TAO/tests/No_Server_MT_Connect_Test/run_test.pl +++ b/TAO/tests/No_Server_MT_Connect_Test/run_test.pl @@ -32,12 +32,29 @@ $client1->DeleteFile($iorbase); $client2->DeleteFile($iorbase); $client3->DeleteFile($iorbase); +# Initialize and copy the client configuration files +my $client2_conf_base = "reactor$PerlACE::svcconf_ext"; +my $client2_conf = $client2->LocalFile ($client2_conf_base); + +if ($client2->PutFile ($client2_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client2_conf>\n"; + exit 1; +} + +my $client3_conf_base = "blocked$PerlACE::svcconf_ext"; +my $client3_conf = $client3->LocalFile ($client3_conf_base); + +if ($client3->PutFile ($client3_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client3_conf>\n"; + exit 1; +} + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); $CL1 = $client1->CreateProcess ("client", "-k file://$client1_iorfile -x"); # Use a single thread in this test, because the strategy is only for # single threaded cases -$CL2 = $client2->CreateProcess ("client", "-ORBSvcConf reactor$PerlACE::svcconf_ext -n 1 -k file://$client2_iorfile"); -$CL3 = $client3->CreateProcess ("client", "-ORBSvcConf blocked$PerlACE::svcconf_ext -k file://$client3_iorfile"); +$CL2 = $client2->CreateProcess ("client", "-ORBSvcConf $client2_conf -n 1 -k file://$client2_iorfile"); +$CL3 = $client3->CreateProcess ("client", "-ORBSvcConf $client3_conf -k file://$client3_iorfile"); $server_status = $SV->Spawn (); diff --git a/TAO/tests/RTCORBA/Server_Protocol/run_test.pl b/TAO/tests/RTCORBA/Server_Protocol/run_test.pl index 101b3a7a7d5..747cab71129 100755 --- a/TAO/tests/RTCORBA/Server_Protocol/run_test.pl +++ b/TAO/tests/RTCORBA/Server_Protocol/run_test.pl @@ -19,10 +19,21 @@ $client->DeleteFile($iorbase); $status = 0; -$server_reverse_conf = $server->LocalFile ("server_reverse$PerlACE::svcconf_ext"); -$server_iiop_uiop_conf = $server->LocalFile ("server_iiop_uiop$PerlACE::svcconf_ext"); -$server_iiop_shmiop_conf = $server->LocalFile ("server_iiop_shmiop$PerlACE::svcconf_ext"); -$server_reverse_nt_conf = $server->LocalFile ("server_reverse_nt$PerlACE::svcconf_ext"); +$server_reverse_conf_base = "server_reverse$PerlACE::svcconf_ext"; +$server_reverse_conf = $server->LocalFile ($server_reverse_conf_base); + +$server_iiop_uiop_conf_base = "server_iiop_uiop$PerlACE::svcconf_ext"; +$server_iiop_uiop_conf = $server->LocalFile ($server_iiop_uiop_conf_base); + +# Copy configuration files to the target. +if ($server->PutFile ($server_reverse_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_reverse_conf>\n"; + exit 1; +} +if ($server->PutFile ($server_iiop_uiop_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_iiop_uiop_conf>\n"; + exit 1; +} # Configurations for all tests to be run. @server_opts = @@ -44,8 +55,26 @@ $server_reverse_nt_conf = $server->LocalFile ("server_reverse_nt$PerlACE::svcco "* Overriding ORB Default Server Protocol Policy in the POA\n" ." (POA Server Protocol set to UIOP only): \n"); + + # UIOP only available on Unix. Substitute with alternative tests on Windows. if ($^O eq "MSWin32" || $^O eq "VMS") { + $server_iiop_shmiop_conf_base = "server_iiop_shmiop$PerlACE::svcconf_ext"; + $server_iiop_shmiop_conf = $server->LocalFile ($server_iiop_shmiop_conf_base); + + $server_reverse_nt_conf_base = "server_reverse_nt$PerlACE::svcconf_ext"; + $server_reverse_nt_conf = $server->LocalFile ($server_reverse_nt_conf_base); + + # Copy the configuration files + if ($server->PutFile ($server_iiop_shmiop_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_iiop_shmiop_conf>\n"; + exit 1; + } + if ($server->PutFile ($server_reverse_nt_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_reverse_nt_conf>\n"; + exit 1; + } + @server_opts = ("-ORBSndSock 54321 -ORBendpoint iiop://", |