diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Event/Basic')
-rwxr-xr-x | TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl | 88 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Event/Basic/run_test.pl | 204 |
2 files changed, 109 insertions, 183 deletions
diff --git a/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl b/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl index 6811dd7c615..8ac6b2e0dc1 100755 --- a/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl +++ b/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl @@ -8,61 +8,51 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # This is a Perl script that runs the client and all the other servers that # are needed -unshift @INC, '../../../../../bin'; -require ACEutils; -require Uniqueid; -use Cwd; +use lib '../../../../../bin'; +use PerlACE::Run_Test; -$cwd = getcwd(); -ACE::checkForTarget($cwd); $status = 0; -$conf_file = 'exhaustive.conf'; -@dispatching_configs = ("-ECDispatching reactive", - "-ECDispatching mt -ECDispatchingThreads 4"); -@collection_strategies = ("copy_on_read", - "copy_on_write", - "delayed"); -@collection_types = ("list", "rb_tree"); -@filtering_configs = ("-ECFiltering prefix -ECSupplierFilter per-supplier", - "-ECFiltering prefix -ECSupplierFilter null"); +$conf_file = PerlACE::LocalFile ('exhaustive.conf'); -foreach $d (@dispatching_configs) { - foreach $f (@filtering_configs) { - foreach $c (@collection_strategies) { - foreach $t (@collection_types) { - local $collection = "mt:".$c.":".$t; - local $config = - 'static EC_Factory "' - .$d - ." -ECProxyPushConsumerCollection ".$collection - ." -ECProxyPushSupplierCollection ".$collection - ." ".$f - .'"'; - open (CONFIG,">$conf_file") - || die "Cannot open $conf_file\n"; - print CONFIG $config, "\n"; - close (CONFIG); - - print STDERR "\n\n", $config, "\n"; +@dispatching_configs = ("-ECDispatching reactive", + "-ECDispatching mt -ECDispatchingThreads 4"); +@collection_strategies = ("copy_on_read", + "copy_on_write", + "delayed"); +@collection_types = ("list", + "rb_tree"); +@filtering_configs = ("-ECFiltering prefix -ECSupplierFilter per-supplier", + "-ECFiltering prefix -ECSupplierFilter null"); - system ("purify.exe ". - "/run .\\Release\\Random.exe ". - " -ORBSvcConf " - .$cwd.$DIR_SEPARATOR. - "$conf_file" - ." -suppliers 16" - ." -consumers 16" - ." -max_recursion 0"); -# $T = Process::Create ("c:\\Program Files\\Rational\\Purify\\purify.exe" -# if ($T->TimedWait (900) == -1) { -# print STDERR "ERROR: Test timedout\n"; -# $status = 1; -# $T->Kill (); $T->TimedWait (1); -# } - } +foreach $d (@dispatching_configs) { + foreach $f (@filtering_configs) { + foreach $c (@collection_strategies) { + foreach $t (@collection_types) { + my $collection = "mt:".$c.":".$t; + + my $config = 'static EC_Factory "' + .$d + ." -ECProxyPushConsumerCollection ".$collection + ." -ECProxyPushSupplierCollection ".$collection + ." ".$f + .'"'; + + open (CONFIG,">$conf_file") || die "Cannot open $conf_file\n"; + print CONFIG $config, "\n"; + close (CONFIG); + + print STDERR "\n\n", $config, "\n"; + + system ("purify.exe " + . "/run .\\Release\\Random.exe " + . " -ORBSvcConf $conf_file" + . " -suppliers 16" + . " -consumers 16" + . " -max_recursion 0"); + } + } } - } } unlink "$conf_file"; diff --git a/TAO/orbsvcs/tests/Event/Basic/run_test.pl b/TAO/orbsvcs/tests/Event/Basic/run_test.pl index 1aa10dae736..cbe4506e0d2 100755 --- a/TAO/orbsvcs/tests/Event/Basic/run_test.pl +++ b/TAO/orbsvcs/tests/Event/Basic/run_test.pl @@ -8,158 +8,94 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # This is a Perl script that runs the client and all the other servers that # are needed -unshift @INC, '../../../../../bin'; -require ACEutils; -require Uniqueid; -use Cwd; +use lib '../../../../../bin'; +use PerlACE::Run_Test; -$cwd = getcwd(); -ACE::checkForTarget($cwd); $status = 0; -print STDERR "\n\nReconnect suppliers and consumers,", - " using disconnect/connect calls\n"; -$T = Process::Create ($EXEPREFIX . "Reconnect".$EXE_EXT, - "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" . - " -suppliers 100 -consumers 100 -d 100"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); +$svc_conf = PerlACE::LocalFile ("svc.conf"); +$observer_conf = PerlACE::LocalFile ("observer.conf"); +$svc_complex_conf = PerlACE::LocalFile ("svc.complex.conf"); +$mt_svc_conf = PerlACE::LocalFile ("mt.svc.conf"); +$svc_complex_conf = PerlACE::LocalFile ("svc.complex.conf"); +$control_conf = PerlACE::LocalFile ("control.conf"); + +sub RunTest ($$$) +{ + my $message = shift; + my $program = shift; + my $arguments = shift; + + my $TEST = new PerlACE::Process ($program, $arguments); + + print STDERR "\n\n$message\n"; + + my $test = $TEST->SpawnWaitKill (240); + + if ($test != 0) { + print STDERR "ERROR: Test returned $test\n"; + $status = 1; + } } -print STDERR "\n\nReconnect suppliers and consumers, using connect calls\n"; -$T = Process::Create ($EXEPREFIX . "Reconnect".$EXE_EXT, - "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" . - " -suppliers 100 -consumers 100 -d 100 -s -c"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Reconnect suppliers and consumers, using disconnect/connect calls", + "Reconnect", + "-ORBsvcconf $svc_conf -suppliers 100 -consumers 100 -d 100"); +RunTest ("Reconnect suppliers and consumers, using connect calls", + "Reconnect", + "-ORBsvcconf $svc_conf -suppliers 100 -consumers 100 -d 100 -s -c"); -print STDERR "\n\nShutdown EC with clients still attached\n"; -$T = Process::Create ($EXEPREFIX . "Shutdown".$EXE_EXT, - "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" . - " -suppliers 5 -consumers 5"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Shutdown EC with clients still attached", + "Shutdown", + "-ORBsvcconf $svc_conf -suppliers 5 -consumers 5"); -print STDERR "\n\nGateway test\n"; -$T = Process::Create ($EXEPREFIX . "Gateway".$EXE_EXT, - " -ORBsvcconf $cwd$DIR_SEPARATOR" . "observer.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Gateway test", + "Gateway", + "-ORBsvcconf $observer_conf"); -print STDERR "\n\nComplex event channel test,", - "multiple ECs connected through gateways\n"; -$T = Process::Create ($EXEPREFIX . "Observer".$EXE_EXT, - " -ORBsvcconf $cwd$DIR_SEPARATOR" . "observer.conf" - ." -consumer_tshift 0 -consumers 5" - ." -supplier_tshift 0 -suppliers 2" - ." -burstsize 10 -burstcount 10 -burstpause 0"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Complex event channel test, multiple ECs connected through gateways", + "Observer", + "-ORBsvcconf $observer_conf -consumer_tshift 0 -consumers 5 -supplier_tshift 0 -suppliers 2 -burstsize 10 -burstcount 10 -burstpause 0"); -print STDERR "\n\nTimeout tests\n"; -$T = Process::Create ($EXEPREFIX . "Timeout".$EXE_EXT, - "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Timeout tests", + "Timeout", + "-ORBsvcconf $svc_conf"); -print STDERR "\n\nWildcard tests\n"; -$T = Process::Create ($EXEPREFIX . "Wildcard".$EXE_EXT, - "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Wildcard tests", + "Wildcard", + "-ORBsvcconf $svc_conf"); -print STDERR "\n\nNegation tests\n"; -$T = Process::Create ($EXEPREFIX . "Negation".$EXE_EXT, - "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Negation tests", + "Negation", + "-ORBsvcconf $svc_conf"); -print STDERR "\n\nBitmask tests\n"; -$T = Process::Create ($EXEPREFIX . "Bitmask".$EXE_EXT, - " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.complex.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Bitmask tests", + "Bitmask", + "-ORBSvcConf $svc_complex_conf"); -print STDERR "\n\nDisconnect callbacks test\n"; -$T = Process::Create ($EXEPREFIX . "Disconnect".$EXE_EXT, - "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Disconnect callbacks test", + "Disconnect", + "-ORBsvcconf $svc_conf"); -print STDERR "\n\nMT Disconnects test\n"; -$T = Process::Create ($EXEPREFIX . "MT_Disconnect".$EXE_EXT, - " -ORBSvcConf $cwd$DIR_SEPARATOR" . "mt.svc.conf"); -if ($T->TimedWait (240) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("MT Disconnects test", + "MT_Disconnect", + "-ORBSvcConf $mt_svc_conf"); -print STDERR "\n\nAtomic Reconnection test\n"; -$T = Process::Create ($EXEPREFIX . "Atomic_Reconnect".$EXE_EXT, - " -ORBSvcConf $cwd$DIR_SEPARATOR" . "mt.svc.conf"); -if ($T->TimedWait (120) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Atomic Reconnection test", + "Atomic_Reconnect", + "-ORBSvcConf $mt_svc_conf"); -print STDERR "\n\nComplex filter\n"; -$T = Process::Create ($EXEPREFIX . "Complex".$EXE_EXT, - " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.complex.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Complex filter", + "Complex", + "-ORBSvcConf $svc_complex_conf"); -print STDERR "\n\nControl test\n"; -$T = Process::Create ($EXEPREFIX . "Control".$EXE_EXT, - " -ORBSvcConf $cwd$DIR_SEPARATOR" . "control.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Control test", + "Control", + "-ORBSvcConf $control_conf"); -print STDERR "\n\nRandom test\n"; -$T = Process::Create ($EXEPREFIX . "Random".$EXE_EXT, - " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.conf" - . " -suppliers 4 -consumers 4 -max_recursion 1"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("Random test", + "Random", + "-ORBSvcConf $svc_conf -suppliers 4 -consumers 4 -max_recursion 1"); exit $status; |