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
;
12 my $test = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
14 my $tao_idl = "$ENV{ACE_ROOT}/bin/tao_idl";
15 if (exists $ENV{HOST_ROOT
}) {
16 $tao_idl = "$ENV{HOST_ROOT}/bin/tao_idl";
20 my $test_idlfile = $test->LocalFile ("Test.idl");
22 # Files to delete after test
23 my @generated_files = ("TestC.cpp", "TestS.cpp", "TestC.inl", "Test.skel.h", "Test.stub.h");
26 $TAO_IDL = $test->CreateProcess ("$tao_idl");
27 if (exists $ENV{HOST_ROOT
}) {
28 $TAO_IDL->IgnoreHostRoot(1);
31 $TAO_IDL->Arguments ("-Se -DTAO -hs .skel.h -hc .stub.h ".
32 "-I$ENV{TAO_ROOT} -I$ENV{TAO_ROOT}/orbsvcs/ $test_idlfile");
34 $test_status = $TAO_IDL->SpawnWaitKill ($test->ProcessStartWaitInterval() + 45);
35 if ($test_status != 0) {
36 print STDERR
"ERROR: test returned $test_status\n";
42 $stub_h = $test->LocalFile("Test.stub.h");
44 open (STUB_HANDLE
, "<$stub_h");
46 while ($line = <STUB_HANDLE
>) {
50 if ($line =~ /^\#include \"orbsvcs\/CosEventChannelAdminC\
.h
\"$/) {
51 print "INFO: orbsvcs/CosEventChannelAdminC.h\n";
54 if ($line =~ /^\#include \"orbsvcs\/CosTypedEventChannelAdminC\
.h
\"$/) {
55 print "INFO: orbsvcs/CosTypedEventChannelAdminC.h\n";
62 $skel_h = $test->LocalFile("Test.skel.h");
64 open (SKEL_HANDLE
, "<$skel_h");
66 while ($line = <SKEL_HANDLE
>) {
70 if ($line =~ /^\#include \"Test\.stub\.h\"$/) {
71 print "INFO: Test.stub.hpp\n";
74 if ($line =~ /^\#include \"orbsvcs\/CosEventChannelAdminS\
.h
\"$/) {
75 print "INFO: orbsvcs/CosEventChannelAdminS.h\n";
78 if ($line =~ /^\#include \"orbsvcs\/CosTypedEventChannelAdminS\
.h
\"$/) {
79 print "INFO: orbsvcs/CosTypedEventChannelAdminS.h\n";
86 foreach $generated_file (@generated_files) {
87 $test->DeleteFile($generated_file);
91 print "INFO: Test passed!\n";
93 print STDERR
"ERROR: Custom endings are incorrectly applied.\n";