=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tests / CallbackTest / run_test.pl
blob78ffc5c5df8696fa5b02c7c3cfea70eff7b6b77c
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 my $server = PerlACE::TestTarget::create_target(1) || die "Create target 1 failed\n";
11 my $client = PerlACE::TestTarget::create_target(2) || die "Create target 2 failed\n";
13 $iorbase = "server.ior";
14 $server_iorfile = $server->LocalFile ("$iorbase");
15 $client_iorfile = $client->LocalFile ("$iorbase");
16 $server->DeleteFile ($iorbase);
17 $client->DeleteFile ($iorbase);
18 $status = 0;
20 $SV = $server->CreateProcess ("server", "-o $server_iorfile");
21 $CL = $client->CreateProcess ("client", "-k file://$client_iorfile");
23 $server_status = $SV->Spawn ();
25 if ($server_status != 0) {
26 print STDERR "ERROR: server returned $server_status\n";
27 exit 1;
30 if ($server->WaitForFileTimed ($iorbase,
31 $server->ProcessStartWaitInterval()) == -1) {
32 print STDERR "ERROR: cannot find file <$server_iorfile>\n";
33 $SV->Kill (); $SV->TimedWait (1);
34 exit 1;
37 if ($server->GetFile ($iorbase) == -1) {
38 print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
39 $SV->Kill (); $SV->TimedWait (1);
40 exit 1;
42 if ($client->PutFile ($iorbase) == -1) {
43 print STDERR "ERROR: cannot set file <$client_iorfile>\n";
44 $SV->Kill (); $SV->TimedWait (1);
45 exit 1;
48 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
50 # The client crashes, therefore it normally exists with status != 0,
51 # but a status of -1 would be a serious error.
52 if ($client_status == -1) {
53 print STDERR "ERROR: client returned $client_status\n";
54 $status = 1;
57 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 45);
59 if ($server_status != 0) {
60 print STDERR "ERROR: server returned $server_status\n";
61 $status = 1;
64 $server->GetStderrLog();
66 $server->DeleteFile ($iorbase);
67 $client->DeleteFile($iorbase);
69 exit $status;