Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / tests / RTCORBA / Dynamic_Thread_Pool / run_test.pl
blob11188a49f9dade6f46ad94c29d314edac2344c91
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # -*- perl -*-
7 use lib "$ENV{ACE_ROOT}/bin";
8 use PerlACE::TestTarget;
10 $number_of_clients = 1;
11 $status = 0;
13 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
14 my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
16 @configurations =
17 ( {
18 file => "ior_3",
19 description => "Invoking methods on servant in second RT thread pool (with lanes)",
23 for $test (@configurations) {
24 $server->DeleteFile($test->{file});
25 $client->DeleteFile($test->{file});
28 sub run_clients
30 my @parms = @_;
31 $arg = $parms[0];
32 $clients = $parms[1];
34 for ($i = 0; $i < $clients; $i++) {
35 $CL[$i] = $client->CreateProcess ("client", $arg);
36 $CL[$i]->Spawn ();
39 for ($i = 0; $i < $clients; $i++) {
40 $client_status = $CL[$i]->WaitKill ($client->ProcessStopWaitInterval () + 90);
41 if ($client_status != 0) {
42 print STDERR "ERROR: client returned $client_status\n";
43 $status = 1;
44 goto kill_server;
49 $SV = $server->CreateProcess ("server");
50 $SV->Spawn ();
52 for $test (@configurations) {
53 if ($server->WaitForFileTimed ($test->{file},
54 $server->ProcessStartWaitInterval()) == -1) {
55 $server_status = $SV->TimedWait (1);
56 if ($server_status == 2) {
57 # Mark as no longer running to avoid errors on exit.
58 $SV->{RUNNING} = 0;
59 exit $status;
60 } else {
61 print STDERR "ERROR: cannot find ior file: $test->{file}\n";
62 $status = 1;
63 goto kill_server;
68 for $test (@configurations) {
69 print STDERR "\n*************************************************************\n";
70 print STDERR "$test->{description}\n";
71 print STDERR "*************************************************************\n\n";
73 run_clients ("-k file://".$client->LocalFile($test->{file}), $number_of_clients);
76 print STDERR "\n************************\n";
77 print STDERR "Shutting down the server\n";
78 print STDERR "************************\n\n";
80 run_clients ("-k file://".$client->LocalFile($configurations[0]->{file})." -i 1 -x", 1);
82 kill_server:
84 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval () + (2 * $number_of_clients * 100));
86 if ($server_status != 0) {
87 print STDERR "ERROR: server returned $server_status\n";
88 $status = 1;
91 for $test (@configurations) {
92 $server->DeleteFile ($test->{file});
93 $client->DeleteFile ($test->{file});
96 exit $status