1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
7 use lib
"$ENV{ACE_ROOT}/bin";
8 use PerlACE
::TestTarget
;
19 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
21 my $mapping1 = "mapping_file1.dat";
22 my $server_mapping1 = $server->LocalFile ($mapping1);
23 my $mapping2 = "mapping_file2.dat";
24 my $server_mapping2 = $server->LocalFile ($mapping2);
25 my $svc_conf1 = "orb1_svc.conf";
26 my $server_svc_conf1 = $server->LocalFile ($svc_conf1);
27 my $svc_conf2 = "orb2_svc.conf";
28 my $server_svc_conf2 = $server->LocalFile ($svc_conf2);
29 $server->DeleteFile($mapping1);
30 $server->DeleteFile($mapping2);
32 # copy the configuation files
33 if ($server->PutFile ($svc_conf1) == -1) {
34 print STDERR
"ERROR: cannot set file <$server_svc_conf1>\n";
37 if ($server->PutFile ($svc_conf2) == -1) {
38 print STDERR
"ERROR: cannot set file <$server_svc_conf2>\n";
42 $SV = $server->CreateProcess ("server",
43 "-a \"AAA -ORBdebuglevel $debug_level -ORBSvcConf $server_svc_conf1\" " .
44 "-b \"BBB -ORBdebuglevel $debug_level -ORBGestalt LOCAL -ORBSvcConf $server_svc_conf2\" " .
45 "-y $server_mapping1 " .
46 "-z $server_mapping2");
47 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
49 if ($server_status != 0) {
50 print STDERR
"ERROR: server returned $server_status\n";
54 if ($server->GetFile ($mapping1) == -1) {
55 print STDERR
"ERROR: cannot retrieve file <$server_mapping1>\n";
56 $SV->Kill (); $SV->TimedWait (1);
60 if ($server->GetFile ($mapping2) == -1) {
61 print STDERR
"ERROR: cannot retrieve file <$server_mapping2>\n";
62 $SV->Kill (); $SV->TimedWait (1);
66 if (-s
$mapping1 == -s
$mapping2) {
67 print STDERR
"ERROR: <$server_mapping1> and <$server_mapping2> are identical\n";
71 $server->DeleteFile($mapping1);
72 $server->DeleteFile($mapping2);