Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / DLL_ORB / run_test.pl
blob3cd33317dc3f8ecc3fae4727842c4c95f641b462
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # -*- perl -*-
8 use lib "$ENV{ACE_ROOT}/bin";
9 use PerlACE::TestTarget;
11 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
12 my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
14 $status = 0;
15 my $iorbase = "test.ior";
16 my $server_iorfile = $server->LocalFile ($iorbase);
17 my $client_iorfile = $client->LocalFile ($iorbase);
18 $server->DeleteFile($iorbase);
19 $client->DeleteFile($iorbase);
21 $SV = $server->CreateProcess ("server");
22 $CL = $client->CreateProcess ("client");
24 print STDERR "\n\n==== Running DLL ORB test\n";
26 $server_status = $SV->Spawn ();
28 if ($server_status != 0) {
29 print STDERR "ERROR: server returned $server_status\n";
30 exit 1;
33 if ($server->WaitForFileTimed ($iorbase,
34 $server->ProcessStartWaitInterval()) == -1) {
35 print STDERR "ERROR: cannot find file <$server_iorfile>\n";
36 $SV->Kill (); $SV->TimedWait (1);
37 exit 1;
40 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
42 if ($client_status != 0) {
43 print STDERR "ERROR: client returned $client_status\n";
44 $status = 1;
47 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
49 if ($server_status != 0) {
50 print STDERR "ERROR: server returned $server_status\n";
51 $status = 1;
54 $server->DeleteFile($iorbase);
55 $client->DeleteFile($iorbase);
57 exit $status;