From 61d227681b5c6e3287d9c69f4bb0488823d9dda0 Mon Sep 17 00:00:00 2001 From: parsons Date: Thu, 21 Sep 2000 16:11:24 +0000 Subject: ChangeLogTag: Thu Sep 21 11:01:22 2000 Jeff Parsons --- TAO/orbsvcs/tests/ImplRepo/run_test.pl | 106 +++++++++++++++++++++++++++++++-- 1 file changed, 100 insertions(+), 6 deletions(-) (limited to 'TAO/orbsvcs/tests/ImplRepo/run_test.pl') diff --git a/TAO/orbsvcs/tests/ImplRepo/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/run_test.pl index d389bee8cf2..325e0c992c4 100755 --- a/TAO/orbsvcs/tests/ImplRepo/run_test.pl +++ b/TAO/orbsvcs/tests/ImplRepo/run_test.pl @@ -9,6 +9,7 @@ use lib "../../../../bin"; require ACEutils; use Cwd; +use Sys::Hostname; $cwd = getcwd(); $airplane_ior = "$cwd$DIR_SEPARATOR" . "airplane.ior"; @@ -17,11 +18,21 @@ $implrepo_ior = "$cwd$DIR_SEPARATOR" . "implrepo.ior"; $refstyle = " -ORBobjrefstyle URL"; +$backing_store = "imr_backing_store"; + +$protocol = "iiop"; +$host = hostname(); +$port = 12345; +$endpoint = "-ORBEndpoint" . "$protocol" . "://" . "$host" . ":" . $port; + ACE::checkForTarget($cwd); $implrepo_server = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."ImplRepo_Service". $DIR_SEPARATOR."ImplRepo_Service".$EXE_EXT; +$nt_implrepo_server = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."ImplRepo_Service". + $DIR_SEPARATOR."NT_ImplRepo_Service".$EXE_EXT; + if ($^O eq "MSWin32") { $tao_imr = "tao_imr".$EXE_EXT; @@ -29,7 +40,7 @@ if ($^O eq "MSWin32") else { $tao_imr = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."ImplRepo_Service". - $DIR_SEPARATOR."tao_imr".$EXE_EXT; + $DIR_SEPARATOR."tao_imr".$EXE_EXT; } $airplane_server = $EXEPREFIX."airplane_server".$EXE_EXT." "; @@ -37,6 +48,11 @@ $airplane_client = $EXEPREFIX."airplane_client".$EXE_EXT." "; $nestea_server = $EXEPREFIX."nestea_server".$EXE_EXT." "; $nestea_client = $EXEPREFIX."nestea_client".$EXE_EXT." "; +$airplane_path = $ENV{ACE_ROOT}.$DIR_SEPARATOR."TAO/orbsvcs".$DIR_SEPARATOR."tests". + $DIR_SEPARATOR."ImplRepo".$DIR_SEPARATOR."airplane_server"; +$working_directory = $ENV{ACE_ROOT}.$DIR_SEPARATOR."TAO/orbsvcs".$DIR_SEPARATOR. + "tests".$DIR_SEPARATOR."ImplRepo"; + # Make sure the files are gone, so we can wait on them. unlink $airplane_ior; unlink $nestea_ior; @@ -56,27 +72,53 @@ sub airplane_test $SV->Kill (); $SV->Wait (); } +sub nt_service_ir_test +{ + system ($nt_implrepo_server." -i"); + + system ($nt_implrepo_server." -s"); + + system ($tao_imr." add airplane_server -c \"$airplane_path -ORBUseIMR 1\" -w $working_directory"); + + $SV = Process::Create ($airplane_server, + "-o $airplane_ior -ORBUseIMR 1"); + + ACE::waitforfile ($airplane_ior); + + system($airplane_client." -k file://$airplane_ior"); + + system($tao_imr." shutdown airplane_server"); + + system($airplane_client." -k file://$airplane_ior"); + + system($tao_imr." shutdown airplane_server"); + + system ($nt_implrepo_server." -k"); + + system ($nt_implrepo_server." -r"); +} + sub airplane_ir_test { $IR = Process::Create ($implrepo_server, - "-o $implrepo_ior -d 1 $refstyle"); + "-o $implrepo_ior"); ACE::waitforfile ($implrepo_ior); - system ($tao_imr." -ORBInitRef ImplRepoService=file://$implrepo_ior add airplane_server -c \"$airplane_server -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior\""); + system ($tao_imr." add airplane_server -c \"$airplane_server -ORBUseIMR 1 -o $airplane_ior\""); $SV = Process::Create ($airplane_server, - "-o $airplane_ior -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior"); + "-ORBUseIMR 1 -o $airplane_ior"); ACE::waitforfile ($airplane_ior); system($airplane_client." -k file://$airplane_ior"); - system($tao_imr." -ORBInitRef ImplRepoService=file://$implrepo_ior shutdown airplane_server"); + system($tao_imr." shutdown airplane_server"); system($airplane_client." -k file://$airplane_ior"); - system($tao_imr." -ORBInitRef ImplRepoService=file://$implrepo_ior shutdown airplane_server"); + system($tao_imr." shutdown airplane_server"); $IR->Kill (); $IR->Wait (); } @@ -113,6 +155,48 @@ sub nestea_ir_test $IR->Kill (); $IR->Wait (); } +sub persistent_ir_test +{ + unlink $backing_store; + + $IR = Process::Create ($implrepo_server," $endpoint -o $implrepo_ior -p $backing_store -d 0"); + + ACE::waitforfile ($implrepo_ior); + + system ($tao_imr." -ORBInitRef ImplRepoService=file://$implrepo_ior add airplane_server -c \"$airplane_server -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior\""); + + $SV = Process::Create ($airplane_server, + "-o $airplane_ior -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior"); + + ACE::waitforfile ($airplane_ior); + + system($airplane_client." -k file://$airplane_ior"); + + system($tao_imr." -ORBInitRef ImplRepoService=file://$implrepo_ior shutdown airplane_server"); + + system($airplane_client." -k file://$airplane_ior"); + + system($tao_imr." -ORBInitRef ImplRepoService=file://$implrepo_ior shutdown airplane_server"); + + print "\nShutting down Implementation Repository\n\n"; + + $IR->Kill (); $IR->Wait (); + + print "Restarting Implementation Repository.\n"; + + $IR_NEW = Process::Create ($implrepo_server," $endpoint -p $backing_store -d 0"); + + ACE::waitforfile ($implrepo_ior); + + system($airplane_client." -k file://$airplane_ior"); + + system($tao_imr." -ORBInitRef ImplRepoService=file://$implrepo_ior shutdown airplane_server"); + + $IR_NEW->Kill (); $IR_NEW->Wait (); + + unlink $backing_store; +} + sub both_ir_test { $IR = Process::Create ($implrepo_server, "-o $implrepo_ior -d 0 $refstyle"); @@ -181,6 +265,11 @@ for ($i = 0; $i <= $#ARGV; $i++) airplane_ir_test (); exit; } + if ($ARGV[$i] eq "nt_service_ir") + { + nt_service_ir_test (); + exit; + } if ($ARGV[$i] eq "nestea") { nestea_test (); @@ -196,6 +285,11 @@ for ($i = 0; $i <= $#ARGV; $i++) both_ir_test (); exit; } + if ($ARGV[$i] eq "persistent_ir") + { + persistent_ir_test (); + exit; + } print "run_test: Unknown Option: ".$ARGV[$i]."\n"; } } -- cgit v1.2.1