diff options
author | oci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-07 16:14:16 +0000 |
---|---|---|
committer | oci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-07 16:14:16 +0000 |
commit | 8b98bc57721465442450844d0adfbfe6267b8c13 (patch) | |
tree | bfbf3f1b80f065e82a6ae4dea52ea417a55bc782 /TAO/tests | |
parent | 8ec65224db2698fb833e58bef98ef92ddb0c7039 (diff) | |
download | ATCD-8b98bc57721465442450844d0adfbfe6267b8c13.tar.gz |
Fri Apr 7 11:12:07 2000 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tests')
30 files changed, 532 insertions, 87 deletions
diff --git a/TAO/tests/AMI/run_test.pl b/TAO/tests/AMI/run_test.pl index 30b5778cc58..3fc3f449141 100755 --- a/TAO/tests/AMI/run_test.pl +++ b/TAO/tests/AMI/run_test.pl @@ -7,24 +7,39 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; -$client_conf="muxed.conf"; +$cwd = getcwd(); +$client_conf="$cwd$DIR_SEPARATOR" . "muxed.conf"; $client_process="simple_client"; $debug_level='5'; $threads='2'; $iterations='1'; -foreach $i (@ARGV) { - if ($i eq '-mux') { +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } + elsif ($ARGV[$i] eq '-mux') { $client_conf = "muxed.conf"; - } elsif ($i eq '-debug') { + } + elsif ($ARGV[$i] eq '-debug') { $debug_level = '1'; - } elsif ($i eq '-exclusive') { + } + elsif ($ARGV[$i] eq '-exclusive') { $client_conf = 'exclusive.conf'; } } -$iorfile = "server.ior"; + +$iorfile = "$cwd$DIR_SEPARATOR" . "server.ior"; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", " -ORBdebuglevel $debug_level" . "-d -o $iorfile"); diff --git a/TAO/tests/CDR/run_test.pl b/TAO/tests/CDR/run_test.pl index 1ddc08714c3..45a624f538f 100755 --- a/TAO/tests/CDR/run_test.pl +++ b/TAO/tests/CDR/run_test.pl @@ -7,6 +7,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use lib "../../../bin"; require ACEutils; +use Cwd; $brace="\#\#\#\#\#"; %tests = ("basic_types" => "-n 256 -l 10", @@ -16,9 +17,23 @@ $brace="\#\#\#\#\#"; "allocator" => ""); $test = ""; $args = ""; +$cwd = getcwd(); $| = 1; print STDERR "\n"; +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + sub run_test { #my $test = shift (@tests); @@ -28,7 +43,7 @@ sub run_test $TST = Process::Create ($EXEPREFIX."$test".$EXE_EXT, "$args"); print STDERR "\t$test RUNNING\n"; - $retval = $TST->TimedWait (60); + $retval = $TST->TimedWait (90); if ($retval == -1) { print STDERR "ERROR $brace $test $args TIMEOUT\n"; $TST->Kill (); $TST->TimedWait (5); diff --git a/TAO/tests/Connection_Purging/run_test.pl b/TAO/tests/Connection_Purging/run_test.pl index 289346ecc03..35ba3b40120 100755 --- a/TAO/tests/Connection_Purging/run_test.pl +++ b/TAO/tests/Connection_Purging/run_test.pl @@ -8,8 +8,24 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require Process; require ACEutils; +use Cwd; -$T = Process::Create ($EXEPREFIX."Connection_Purging -ORBCollocation no -d".$EXE_EXT); +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + +$T = Process::Create ($EXEPREFIX."Connection_Purging".$EXE_EXT, + "-ORBCollocation no -d"); $client = $T->TimedWait (60); if ($client == -1) { diff --git a/TAO/tests/DSI_Gateway/run_test.pl b/TAO/tests/DSI_Gateway/run_test.pl index 7823a636e0d..d2000ddfadd 100755 --- a/TAO/tests/DSI_Gateway/run_test.pl +++ b/TAO/tests/DSI_Gateway/run_test.pl @@ -7,26 +7,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; -$svfile = "server.ior"; +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + +$svfile = "$cwd$DIR_SEPARATOR" . "server.ior"; unlink $svfile; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", " -o $svfile"); if (ACE::waitforfile_timed ($svfile, 5) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; + print STDERR "ERROR: cannot find file <$svfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$gwfile = "gateway.ior"; +$gwfile = "$cwd$DIR_SEPARATOR" . "gateway.ior"; unlink $gwfile; $GW = Process::Create ($EXEPREFIX."gateway$EXE_EXT ", " -k file://$svfile" . " -o $gwfile"); if (ACE::waitforfile_timed ($gwfile, 5) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; + print STDERR "ERROR: cannot find file <$gwfile>\n"; $GW->Kill (); $GW->TimedWait (1); exit 1; } diff --git a/TAO/tests/DynAny_Test/run_test.pl b/TAO/tests/DynAny_Test/run_test.pl index a407b04ce1c..1751095d3f0 100755 --- a/TAO/tests/DynAny_Test/run_test.pl +++ b/TAO/tests/DynAny_Test/run_test.pl @@ -8,9 +8,12 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use lib "../../../bin"; require ACEutils; require Process; +use Cwd; +$cwd = getcwd(); $type = ""; + sub run_test { my $type = shift(@_); @@ -35,11 +38,21 @@ for ($i = 0; $i <= $#ARGV; $i++) if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") { print "Run_Test Perl script for TAO DynAny Test\n\n"; - print "run_test [-t type]\n"; + print "run_test [-chorus <target>] [-t type]\n"; print "\n"; print "-t type -- runs only one type of dynany test\n"; exit; } + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } if ($ARGV[$i] eq "-t") { $type = $ARGV[$i + 1]; diff --git a/TAO/tests/Endpoint_Per_Priority/run_test.pl b/TAO/tests/Endpoint_Per_Priority/run_test.pl index 3c0f036ed2d..8d39e46f3df 100755 --- a/TAO/tests/Endpoint_Per_Priority/run_test.pl +++ b/TAO/tests/Endpoint_Per_Priority/run_test.pl @@ -7,34 +7,51 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; -$client_conf="client.conf"; -$server_conf="server.conf"; +$cwd = getcwd(); +$client_conf="$cwd$DIR_SEPARATOR" . "client.conf"; +$server_conf="$cwd$DIR_SEPARATOR" . "server.conf"; $threads='2'; +$hostname = "localhost"; +$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior"; -$iorfile = "test.ior"; +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + $hostname = $ARGV[$i]; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} print STDERR "================ Multi-threaded test\n"; unlink $iorfile; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", - " -ORBSvcConf server.conf" - . " -ORBEndPoint iiop://localhost:0/priority=0 " - . " -ORBEndPoint iiop://localhost:0/priority=1 " - . " -ORBEndPoint iiop://localhost:0/priority=2 " - . " -ORBEndPoint iiop://localhost:0/priority=3 " - . " -ORBEndPoint iiop://localhost:0/priority=4 " + " -ORBDebugLevel 5". + " -ORBSvcConf $server_conf" + . " -ORBEndPoint iiop://$hostname:0/priority=0 " + . " -ORBEndPoint iiop://$hostname:0/priority=1 " + . " -ORBEndPoint iiop://$hostname:0/priority=2 " + . " -ORBEndPoint iiop://$hostname:0/priority=3 " + . " -ORBEndPoint iiop://$hostname:0/priority=4 " . " -o $iorfile -n $threads"); -if (ACE::waitforfile_timed ($iorfile, 5) == -1) { +if (ACE::waitforfile_timed ($iorfile, 10) == -1) { print STDERR "ERROR: cannot find file <$iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } $CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", - " -ORBSvcConf client.conf " + " -ORBSvcConf $client_conf " . " -k file://$iorfile " . " -t 0 -t 1 -i 1000"); diff --git a/TAO/tests/Explicit_Event_Loop/run_test.pl b/TAO/tests/Explicit_Event_Loop/run_test.pl index 96fe0cd598b..3061c93707b 100755 --- a/TAO/tests/Explicit_Event_Loop/run_test.pl +++ b/TAO/tests/Explicit_Event_Loop/run_test.pl @@ -9,9 +9,24 @@ use lib "../../../bin"; require ACEutils; require Process; +use Cwd; + +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} $status = 0; -$iorfile = "chapter_test.ior"; +$iorfile = "$cwd$DIR_SEPARATOR" . "chapter_test.ior"; unlink $iorfile; diff --git a/TAO/tests/Faults/run_test.pl b/TAO/tests/Faults/run_test.pl index 92d491fb9b7..3ad704f706f 100755 --- a/TAO/tests/Faults/run_test.pl +++ b/TAO/tests/Faults/run_test.pl @@ -7,12 +7,27 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; -$iorfile = "test.ior"; -$middlefile = "middle.ior"; -$dum_core = "core"; +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior"; +$middlefile = "$cwd$DIR_SEPARATOR" . "middle.ior"; +$dum_core = "$cwd$DIR_SEPARATOR" . "core"; $status = 0; +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + print STDERR "===== Base test, no crashes\n"; unlink $iorfile; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", diff --git a/TAO/tests/IORManipulation/run_test.pl b/TAO/tests/IORManipulation/run_test.pl index 9d3d2d78ccd..fe8bb4f8dfb 100755 --- a/TAO/tests/IORManipulation/run_test.pl +++ b/TAO/tests/IORManipulation/run_test.pl @@ -8,6 +8,22 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require Process; require ACEutils; +use Cwd; + +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + $T = Process::Create ($EXEPREFIX."IORTest".$EXE_EXT); diff --git a/TAO/tests/InterOp-Naming/run_test.pl b/TAO/tests/InterOp-Naming/run_test.pl index 76af8c44aef..d0d76263225 100755 --- a/TAO/tests/InterOp-Naming/run_test.pl +++ b/TAO/tests/InterOp-Naming/run_test.pl @@ -8,20 +8,35 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require Process; require ACEutils; - -$file="test.ior"; - -$port = ACE::uniqueid () + 10000; +use Cwd; + +$cwd = getcwd(); +$file = "$cwd$DIR_SEPARATOR" . "test.ior"; +$port = ACE::uniqueid () + 10001; # This must be > 10000 for Chorus 4.0 +$hostname = "localhost"; + +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + $hostname = $ARGV[$i]; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} print STDERR "\n\n==== InitRef test\n"; unlink $file; - $SV = Process::Create ($EXEPREFIX."INS_test_server".$EXE_EXT, - "-ORBEndpoint iiop://localhost:$port " + "-ORBEndpoint iiop://$hostname:$port " . " -i object_name -o $file"); -if (ACE::waitforfile_timed ($file, 3) == -1) { +if (ACE::waitforfile_timed ($file, 5) == -1) { print STDERR "ERROR: cannot find file <$file>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; @@ -30,7 +45,7 @@ if (ACE::waitforfile_timed ($file, 3) == -1) { $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT, " random_service " ."-ORBInitRef random_service=" - ."iioploc://localhost:$port/object_name"); + ."iioploc://$hostname:$port/object_name"); $client = $CL->TimedWait (60); if ($client == -1) { @@ -46,7 +61,7 @@ print STDERR "\n\n==== InvalidName test\n"; $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT, " not_a_service " ."-ORBInitRef random_service=" - ."iioploc://localhost:$port/object_name"); + ."iioploc://$hostname:$port/object_name"); $client = $CL->TimedWait (60); if ($client == -1) { @@ -62,7 +77,7 @@ print STDERR "\n\n==== DefaultInitRef test\n"; $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT, " object_name " . "-ORBDefaultInitRef" - ." iioploc://localhost:$port"); + ." iioploc://$hostname:$port"); $client = $CL->TimedWait (60); if ($client == -1) { @@ -82,9 +97,9 @@ $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT, " random_service " . "-ORBInitRef random_service=" ."iioploc://" - ."localhost:$port1," - ."localhost:$port2," - ."localhost:$port" + ."$hostname:$port1," + ."$hostname:$port2," + ."$hostname:$port" ."/object_name"); $client = $CL->TimedWait (60); @@ -107,9 +122,9 @@ $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT, . " -l " . "-ORBInitRef random_service=" . "iioploc://" - . "localhost:$port1," - . "localhost:$port2," - . "localhost:$port" + . "$hostname:$port1," + . "$hostname:$port2," + . "$hostname:$port" . "/object_name"); $client = $CL->TimedWait (60); @@ -127,9 +142,9 @@ $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT, " object_name " . "-ORBDefaultInitRef " ."iioploc://" - ."localhost:$port1," - ."localhost:$port2," - ."localhost:$port"); + ."$hostname:$port1," + ."$hostname:$port2," + ."$hostname:$port"); $client = $CL->TimedWait (60); if ($client == -1) { @@ -146,7 +161,7 @@ $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT, " object_name " . "-ORBDefaultInitRef " ."iioploc://" - ."localhost:$port/"); + ."$hostname:$port/"); $client = $CL->TimedWait (60); if ($client == -1) { diff --git a/TAO/tests/Interceptors/client.cpp b/TAO/tests/Interceptors/client.cpp index 2ac1b788c46..3c5c1447797 100644 --- a/TAO/tests/Interceptors/client.cpp +++ b/TAO/tests/Interceptors/client.cpp @@ -13,7 +13,7 @@ PortableInterceptor::ClientRequestInterceptor_ptr interceptor = 0; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "e"); + ACE_Get_Opt get_opts (argc, argv, "ef:"); int c; while ((c = get_opts ()) != -1) @@ -21,6 +21,9 @@ parse_args (int argc, char *argv[]) { case 'e': break; + case 'f': + ior = get_opts.optarg; + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/tests/Interceptors/run_test.pl b/TAO/tests/Interceptors/run_test.pl index 761e1ea81f5..3f83428fad3 100755 --- a/TAO/tests/Interceptors/run_test.pl +++ b/TAO/tests/Interceptors/run_test.pl @@ -8,10 +8,25 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require Process; require ACEutils; +use Cwd; + +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} print STDERR "\n\n==== Running interceptor test\n"; -$file="test.ior"; +$file = "$cwd$DIR_SEPARATOR" . "test.ior"; unlink $file; @@ -23,7 +38,8 @@ if (ACE::waitforfile_timed ($file, 15) == -1) { exit 1; } -$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT, "-ORBobjrefstyle url"); +$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT, + "-ORBobjrefstyle url -f file://$file"); $client = $CL->TimedWait (60); diff --git a/TAO/tests/Leader_Followers/run_test.pl b/TAO/tests/Leader_Followers/run_test.pl index ee4a5aac17b..95095cc49a7 100755 --- a/TAO/tests/Leader_Followers/run_test.pl +++ b/TAO/tests/Leader_Followers/run_test.pl @@ -7,15 +7,30 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; - -$iorfile = "ior"; +use Cwd; + +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" . "ior"; + +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} sub run_client { my $args = shift; $CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", - $args); + "-k file://$iorfile " . $args); $client = $CL->TimedWait (200); if ($client == -1) { @@ -84,7 +99,7 @@ unlink $iorfile; print STDERR "\n\n*** Single threaded server ***\n\n\n"; -$SV = Process::Create ($EXEPREFIX."server$EXE_EXT"); +$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile"); if (ACE::waitforfile_timed ($iorfile, 5) == -1) { print STDERR "ERROR: cannot find file <$iorfile>\n"; @@ -110,7 +125,9 @@ if ($server != 0 || $client != 0) { print STDERR "\n\n*** Thread-Pool server ***\n\n\n"; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT", - "multi_threaded_event_loop.conf -e 5"); + " -o $iorfile -e 5" . + "$cwd$DIR_SEPARATOR" . + "multi_threaded_event_loop.conf"); if (ACE::waitforfile_timed ($iorfile, 5) == -1) { print STDERR "ERROR: cannot find file <$iorfile>\n"; diff --git a/TAO/tests/MT_Client/run_test.pl b/TAO/tests/MT_Client/run_test.pl index 6d801a7cc9a..705c04c0c58 100755 --- a/TAO/tests/MT_Client/run_test.pl +++ b/TAO/tests/MT_Client/run_test.pl @@ -7,27 +7,40 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; -$client_conf="client.global.conf"; +$cwd = getcwd(); +$client_conf="$cwd$DIR_SEPARATOR" ."client.global.conf"; $client_process="client"; $debug_level='0'; $threads='10'; $status = 0; -foreach $i (@ARGV) { - if ($i eq '-tss') { - $client_conf = "client.tss.conf"; - } elsif ($i eq '-debug') { +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } + elsif ($ARGV[$i] eq '-tss') { + $client_conf = "$cwd$DIR_SEPARATOR" . "client.tss.conf"; + } elsif ($ARGV[$i] eq '-debug') { $debug_level = '1'; - } elsif ($i eq '-creation') { + } elsif ($ARGV[$i] eq '-creation') { $client_process = 'orb_creation'; $threads='2'; } } -$iorfile = "server.ior"; +$iorfile = "$cwd$DIR_SEPARATOR" ."server.ior"; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", - " -ORBsvcconf server.conf -ORBdebuglevel $debug_level" + " -ORBsvcconf " . "$cwd$DIR_SEPARATOR" ."server.conf ". + " -ORBdebuglevel $debug_level" . " -o $iorfile"); if (ACE::waitforfile_timed ($iorfile, 30) == -1) { diff --git a/TAO/tests/MT_Server/run_test.pl b/TAO/tests/MT_Server/run_test.pl index 64a8cf58217..c00ef771592 100755 --- a/TAO/tests/MT_Server/run_test.pl +++ b/TAO/tests/MT_Server/run_test.pl @@ -7,12 +7,27 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; +$cwd = getcwd(); $threads='8'; +$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior"; + +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} -$iorfile = "test.ior"; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", - " -ORBsvcconf server.conf" + " -ORBsvcconf " . "$cwd$DIR_SEPARATOR" . "server.conf" . " -o $iorfile" . " -n $threads"); diff --git a/TAO/tests/Multiple_Inheritance/run_test.pl b/TAO/tests/Multiple_Inheritance/run_test.pl index ca23c064b4e..04e84e018e2 100755 --- a/TAO/tests/Multiple_Inheritance/run_test.pl +++ b/TAO/tests/Multiple_Inheritance/run_test.pl @@ -7,8 +7,24 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; + +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" . "server.ior"; + +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} -$iorfile = "server.ior"; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT", " -f $iorfile"); diff --git a/TAO/tests/Native_Exceptions/run_test.pl b/TAO/tests/Native_Exceptions/run_test.pl index 13d3afa8cf0..dcccc80f7a2 100755 --- a/TAO/tests/Native_Exceptions/run_test.pl +++ b/TAO/tests/Native_Exceptions/run_test.pl @@ -7,11 +7,26 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; -$iorfile = "test.ior"; +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" ."test.ior"; unlink $iorfile; +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", " -o $iorfile"); diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl b/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl index 48e71e1d4db..deb55a9f511 100755 --- a/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl +++ b/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl @@ -8,9 +8,24 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../../bin'; require Process; require ACEutils; +use Cwd; -$ior1file = "server1.ior"; -$ior2file = "server2.ior"; +$cwd = getcwd(); +$ior1file = "$cwd$DIR_SEPARATOR" . "server1.ior"; +$ior2file = "$cwd$DIR_SEPARATOR" . "server2.ior"; + +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} # Make sure the files are gone unlink $ior1file; diff --git a/TAO/tests/NestedUpcall/Simple/run_test.pl b/TAO/tests/NestedUpcall/Simple/run_test.pl index f9c6f05d900..4e59b0248e9 100755 --- a/TAO/tests/NestedUpcall/Simple/run_test.pl +++ b/TAO/tests/NestedUpcall/Simple/run_test.pl @@ -7,11 +7,26 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../../bin'; require ACEutils; +use Cwd; -$iorfile = "test.ior"; +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior"; unlink $iorfile; +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + print STDERR "\nrunning ST version of the client and the server\n\n"; $SV = Process::Create ($EXEPREFIX."server".$EXE_EXT, diff --git a/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl b/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl index a50f480156c..4e25e20ebc3 100755 --- a/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl +++ b/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl @@ -8,9 +8,24 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../../bin'; require Process; require ACEutils; +use Cwd; -$ior1file = "servera.ior"; -$ior2file = "serverb.ior"; +$cwd = getcwd(); +$ior1file = "$cwd$DIR_SEPARATOR" . "servera.ior"; +$ior2file = "$cwd$DIR_SEPARATOR" . "serverb.ior"; + +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} # Make sure these aren't hanging around unlink $ior1file; diff --git a/TAO/tests/Nested_Event_Loop/run_test.pl b/TAO/tests/Nested_Event_Loop/run_test.pl index 0f0d7af78d8..ba226acd8b6 100755 --- a/TAO/tests/Nested_Event_Loop/run_test.pl +++ b/TAO/tests/Nested_Event_Loop/run_test.pl @@ -7,12 +7,27 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; - -$iorfile = "ior"; +use Cwd; + +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" . "ior"; + +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} unlink $iorfile; -$SV = Process::Create ($EXEPREFIX."server$EXE_EXT"); +$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile"); if (ACE::waitforfile_timed ($iorfile, 5) == -1) { print STDERR "ERROR: cannot find file <$iorfile>\n"; @@ -20,7 +35,8 @@ if (ACE::waitforfile_timed ($iorfile, 5) == -1) { exit 1; } -$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", "-x"); +$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", + "-k file://$iorfile -x"); $client = $CL->TimedWait (200); if ($client == -1) { diff --git a/TAO/tests/ORB_init/run_test.pl b/TAO/tests/ORB_init/run_test.pl index e2eeaf316b3..11ddb3fb203 100755 --- a/TAO/tests/ORB_init/run_test.pl +++ b/TAO/tests/ORB_init/run_test.pl @@ -7,6 +7,21 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; + +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} $orb_init = Process::Create ($EXEPREFIX."ORB_init$EXE_EXT "); diff --git a/TAO/tests/OctetSeq/run_test.pl b/TAO/tests/OctetSeq/run_test.pl index 2064ee23cdb..a37a6d3336e 100755 --- a/TAO/tests/OctetSeq/run_test.pl +++ b/TAO/tests/OctetSeq/run_test.pl @@ -8,10 +8,25 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require Process; require ACEutils; +use Cwd; + +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} print STDERR "\n\n==== Octet sequence passing test\n"; -$file="test.ior"; +$file="$cwd$DIR_SEPARATOR" . "test.ior"; unlink $file; diff --git a/TAO/tests/POA/Deactivation/run_test.pl b/TAO/tests/POA/Deactivation/run_test.pl index 4e96e5f2230..6a02665cb74 100755 --- a/TAO/tests/POA/Deactivation/run_test.pl +++ b/TAO/tests/POA/Deactivation/run_test.pl @@ -8,6 +8,21 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../../bin'; require Process; require ACEutils; +use Cwd; + +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} $T = Process::Create ($EXEPREFIX."Deactivation".$EXE_EXT); diff --git a/TAO/tests/POA/Destruction/run_test.pl b/TAO/tests/POA/Destruction/run_test.pl index 6f2424b2053..bb2b1c3531f 100755 --- a/TAO/tests/POA/Destruction/run_test.pl +++ b/TAO/tests/POA/Destruction/run_test.pl @@ -8,6 +8,21 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../../bin'; require Process; require ACEutils; +use Cwd; + +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} $T = Process::Create ($EXEPREFIX."Destruction".$EXE_EXT); diff --git a/TAO/tests/POA/Identity/run_test.pl b/TAO/tests/POA/Identity/run_test.pl index bf77e2157cf..cf540e26f51 100755 --- a/TAO/tests/POA/Identity/run_test.pl +++ b/TAO/tests/POA/Identity/run_test.pl @@ -8,6 +8,21 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../../bin'; require Process; require ACEutils; +use Cwd; + +$cwd = getcwd(); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} $T = Process::Create ($EXEPREFIX."Identity".$EXE_EXT); diff --git a/TAO/tests/Param_Test/run_test.pl b/TAO/tests/Param_Test/run_test.pl index b534c1f0101..0fe3503c85f 100755 --- a/TAO/tests/Param_Test/run_test.pl +++ b/TAO/tests/Param_Test/run_test.pl @@ -5,11 +5,15 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # $Id$ # -*- perl -*- + + use lib "../../../bin"; require ACEutils; require Process; +use Cwd; -$iorfile = "server.ior"; +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" . "server.ior"; $invocation = "sii"; $num = 5; $other = ""; @@ -76,7 +80,7 @@ for ($i = 0; $i <= $#ARGV; $i++) if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") { print "Run_Test Perl script for TAO Param Test\n\n"; - print "run_test [-n num] [-d] [-onewin] [-h] [-t type] [-i (dii|sii)]\n"; + print "run_test [-n num] [-d] [-onewin] [-h] [-t type] [-i (dii|sii)] [-chorus <target>]\n"; print "\n"; print "-n num -- runs the client num times\n"; print "-d -- runs each in debug mode\n"; @@ -84,8 +88,20 @@ for ($i = 0; $i <= $#ARGV; $i++) print "-h -- prints this information\n"; print "-t type -- runs only one type of param test\n"; print "-i (dii|sii) -- Changes the type of invocation\n"; + print "-chorus <target> -- Run tests on chorus target\n"; exit 0; } + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + last SWITCH; + } if ($ARGV[$i] eq "-n") { $num = $ARGV[$i + 1]; diff --git a/TAO/tests/Smart_Proxies/run_test.pl b/TAO/tests/Smart_Proxies/run_test.pl index 19b627de397..754498ea487 100755 --- a/TAO/tests/Smart_Proxies/run_test.pl +++ b/TAO/tests/Smart_Proxies/run_test.pl @@ -7,8 +7,23 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; - -$iorfile = "test.ior"; +use Cwd; + +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior"; + +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} unlink $iorfile; @@ -23,7 +38,8 @@ if (ACE::waitforfile_timed ($iorfile, 5) == -1) { exit 1; } -$CL = Process::Create ($EXEPREFIX."client$EXE_EXT "); +$CL = Process::Create ($EXEPREFIX."client$EXE_EXT", + "-i file://$iorfile"); $client = $CL->TimedWait (60); if ($client == -1) { diff --git a/TAO/tests/Timed_Buffered_Oneways/run_test.pl b/TAO/tests/Timed_Buffered_Oneways/run_test.pl index 0f0d7af78d8..b33ced012d6 100755 --- a/TAO/tests/Timed_Buffered_Oneways/run_test.pl +++ b/TAO/tests/Timed_Buffered_Oneways/run_test.pl @@ -7,12 +7,27 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; -$iorfile = "ior"; +$cwd = getcwd(); +$iorfile = "$cwd$DIR_SEPARATOR" . "ior"; unlink $iorfile; -$SV = Process::Create ($EXEPREFIX."server$EXE_EXT"); +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + +$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile"); if (ACE::waitforfile_timed ($iorfile, 5) == -1) { print STDERR "ERROR: cannot find file <$iorfile>\n"; @@ -20,7 +35,7 @@ if (ACE::waitforfile_timed ($iorfile, 5) == -1) { exit 1; } -$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", "-x"); +$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", "-k file://$iorfile -x"); $client = $CL->TimedWait (200); if ($client == -1) { diff --git a/TAO/tests/Timeout/run_test.pl b/TAO/tests/Timeout/run_test.pl index c8e485e77d6..f1d48dca55f 100755 --- a/TAO/tests/Timeout/run_test.pl +++ b/TAO/tests/Timeout/run_test.pl @@ -7,12 +7,27 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' unshift @INC, '../../../bin'; require ACEutils; +use Cwd; +$cwd = getcwd(); $status = 0; -$iorfile = "server.ior"; +$iorfile = "$cwd$DIR_SEPARATOR" . "server.ior"; unlink $iorfile; +for($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-chorus') { + $i++; + if (defined $ARGV[$i]) { + $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR"; + } + else { + print STDERR "The -chorus option requires the hostname of the target\n"; + exit(1); + } + } +} + $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", " -o $iorfile"); |