Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / tests / Cache_Growth_Test / run_test.pl
blobbef6509b9c5982dc901aa10458fc7663dcde4f4b
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 $status = 0;
11 $debug_level = '0';
13 foreach $i (@ARGV) {
14 if ($i eq '-debug') {
15 $debug_level = '10';
19 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
20 my @clients = ();
21 $clients[0] = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
22 $clients[1] = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
24 my $iorbase = "server.ior";
25 my $server_iorfile = $server->LocalFile ($iorbase);
26 my @clients_iorfile = ();
27 $clients_iorfile[0] = $clients[0]->LocalFile ($iorbase);
28 $clients_iorfile[1] = $clients[1]->LocalFile ($iorbase);
29 $server->DeleteFile($iorbase);
30 $clients[0]->DeleteFile($iorbase);
31 $clients[1]->DeleteFile($iorbase);
33 $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
34 my @CLS = ();
35 $CLS[0] = $clients[0]->CreateProcess ("client", "-k file://$clients_iorfile[0]");
36 $CLS[1] = $clients[1]->CreateProcess ("client", "-k file://$clients_iorfile[1] -x");
37 $server_status = $SV->Spawn ();
39 if ($server_status != 0) {
40 print STDERR "ERROR: server returned $server_status\n";
41 exit 1;
44 if ($server->WaitForFileTimed ($iorbase,
45 $server->ProcessStartWaitInterval()) == -1) {
46 print STDERR "ERROR: cannot find file <$server_iorfile>\n";
47 $SV->Kill (); $SV->TimedWait (1);
48 exit 1;
51 if ($server->GetFile ($iorbase) == -1) {
52 print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
53 $SV->Kill (); $SV->TimedWait (1);
54 exit 1;
57 if ($clients[0]->PutFile ($iorbase) == -1) {
58 print STDERR "ERROR: cannot set file <$clients_iorfile[0]>\n";
59 $SV->Kill (); $SV->TimedWait (1);
60 exit 1;
63 if ($clients[1]->PutFile ($iorbase) == -1) {
64 print STDERR "ERROR: cannot set file <$clients_iorfile[1]>\n";
65 $SV->Kill (); $SV->TimedWait (1);
66 exit 1;
69 for ($i = 0; $i != 30; $i++) {
70 $client_status = $CLS[0]->SpawnWaitKill ($clients[0]->ProcessStartWaitInterval() + 285);
72 if ($client_status != 0) {
73 print STDERR "ERROR: client 0 returned $client_status\n";
74 $status = 1;
78 $client_status = $CLS[1]->SpawnWaitKill ($clients[1]->ProcessStartWaitInterval() + 285);
80 if ($client_status != 0) {
81 print STDERR "ERROR: client 1 returned $client_status\n";
82 $status = 1;
85 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
87 if ($server_status != 0) {
88 print STDERR "ERROR: server returned $server_status\n";
89 $status = 1;
92 $server->DeleteFile($iorbase);
93 $clients[0]->DeleteFile($iorbase);
94 $clients[1]->DeleteFile($iorbase);
96 exit $status;