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 | 840946a475f197dcb0a50f3d78336e6b85298f6a (patch) | |
tree | bfbf3f1b80f065e82a6ae4dea52ea417a55bc782 /TAO/tests/InterOp-Naming/run_test.pl | |
parent | 7d35ae0838f2e922df8d8a78dfc00301bb504e02 (diff) | |
download | ATCD-840946a475f197dcb0a50f3d78336e6b85298f6a.tar.gz |
Fri Apr 7 11:12:07 2000 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tests/InterOp-Naming/run_test.pl')
-rwxr-xr-x | TAO/tests/InterOp-Naming/run_test.pl | 55 |
1 files changed, 35 insertions, 20 deletions
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) { |