Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Bug_2593_Regression / run_test.pl
blobec656a31028d770264ee714628abb05cf3120b4e
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 $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
21 my $iorbase = "server.ior";
22 my $server_iorfile = $server->LocalFile ($iorbase);
23 my $client_iorfile = $client->LocalFile ($iorbase);
24 $server->DeleteFile($iorbase);
25 $client->DeleteFile($iorbase);
26 my $server_conf_base = "server$PerlACE::svcconf_ext";
27 my $server_conf = $server->LocalFile ($server_conf_base);
28 if ($server->PutFile ($server_conf_base) == -1) {
29 print STDERR "ERROR: cannot set file <$server_conf_base>\n";
30 exit 1;
33 $endpoints = "-ORBEndpoint shmiop://12345 -ORBEndpoint iiop://:"
34 . PerlACE::TestTarget::RandomPort(5000);
35 $debug_conf = "-ORBDebugLevel $debug_level";
36 $svc_conf = "-ORBSvcConf $server_conf";
38 $server_opts = "-o $server_iorfile $svc_conf $endpoints $debug_conf";
40 $SV = $server->CreateProcess ("server", $server_opts);
41 $CL = $client->CreateProcess ("client", "-k file://$client_iorfile");
43 $server_status = $SV->Spawn ();
45 if ($server_status != 0) {
46 print STDERR "ERROR: server returned $server_status\n";
47 exit 1;
50 if ($server->WaitForFileTimed ($iorbase,
51 $server->ProcessStartWaitInterval()) == -1) {
52 print STDERR "ERROR: cannot find file <$server_iorfile>\n";
53 $SV->Kill (); $SV->TimedWait (1);
54 exit 1;
57 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
59 if ($client_status != 0) {
60 print STDERR "ERROR: client returned $client_status\n";
61 $status = 1;
64 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
66 if ($server_status != 0) {
67 print STDERR "ERROR: server returned $server_status\n";
68 $status = 1;
71 $server->DeleteFile($iorbase);
72 $client->DeleteFile($iorbase);
74 exit $status;