Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Bug_1495_Regression / run_test.pl
bloba3d5143883b1338408fc56e5da35768da685a633
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 $client = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
20 my $server = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
23 my $iorbase = "test.ior";
24 my $thrserverfile = "thr_server.ior";
26 my $server_iorbase = $server->LocalFile ($iorbase);
27 my $client_iorbase = $client->LocalFile ($iorbase);
29 $server->DeleteFile($iorbase);
30 $client->DeleteFile($iorbase);
32 my $server_thrserverfile = $server->LocalFile ($thrserverfile);
33 my $client_thrserverfile = $client->LocalFile ($thrserverfile);
34 $server->DeleteFile($thrserverfile);
35 $client->DeleteFile($thrserverfile);
37 $SV = $server->CreateProcess ("server",
38 "-ORBdebuglevel $debug_level " .
39 "-o $server_iorbase " .
40 "-i file://$server_thrserverfile");
42 $CL = $client->CreateProcess ("client",
43 "-ORBdebuglevel $debug_level " .
44 "-o $client_thrserverfile " .
45 "-i $client_iorbase");
47 $client_status = $CL->Spawn ();
49 if ($client_status != 0) {
50 print STDERR "ERROR: client returned $client_status\n";
51 exit 1;
54 if ($client->WaitForFileTimed ($thrserverfile,
55 $client->ProcessStartWaitInterval()) == -1) {
56 print STDERR "ERROR: cannot find file <$server_thrserverfile>\n";
57 $CL->Kill (); $CL->TimedWait (1);
58 exit 1;
61 if ($client->GetFile ($thrserverfile) == -1) {
62 print STDERR "ERROR: cannot retrieve file <$client_thrserverfile>\n";
63 $CL->Kill (); $CL->TimedWait (1);
64 exit 1;
66 if ($server->PutFile ($thrserverfile) == -1) {
67 print STDERR "ERROR: cannot set file <$server_thrserverfile>\n";
68 $CL->Kill (); $CL->TimedWait (1);
69 exit 1;
72 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 20);
74 if ($server_status != 0) {
75 print STDERR "ERROR: client returned $server_status\n";
76 $status = 1;
79 $client_status = $CL->WaitKill ($client->ProcessStopWaitInterval());
81 if ($client_status != 0) {
82 print STDERR "ERROR: client returned $client_status\n";
83 $status = 1;
86 $server->DeleteFile($iorbase);
87 $client->DeleteFile($iorbase);
89 $server->DeleteFile($thrserverfile);
90 $client->DeleteFile($thrserverfile);
92 exit $status;