Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Bug_3743_Regression / run_test.pl
bloba266c13451633596a3a65b134bb98b06d55f75da
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;
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";
19 # IDL file names
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");
25 # The IDL compiler
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";
37 exit 1;
40 $found = 0;
42 $stub_h = $test->LocalFile("Test.stub.h");
44 open (STUB_HANDLE, "<$stub_h");
46 while ($line = <STUB_HANDLE>) {
47 # Process the line.
48 chomp $line;
50 if ($line =~ /^\#include \"orbsvcs\/CosEventChannelAdminC\.h\"$/) {
51 print "INFO: orbsvcs/CosEventChannelAdminC.h\n";
52 $found++;
54 if ($line =~ /^\#include \"orbsvcs\/CosTypedEventChannelAdminC\.h\"$/) {
55 print "INFO: orbsvcs/CosTypedEventChannelAdminC.h\n";
56 $found++;
60 close(STUB_HANDLE);
62 $skel_h = $test->LocalFile("Test.skel.h");
64 open (SKEL_HANDLE, "<$skel_h");
66 while ($line = <SKEL_HANDLE>) {
67 # Process the line.
68 chomp $line;
70 if ($line =~ /^\#include \"Test\.stub\.h\"$/) {
71 print "INFO: Test.stub.hpp\n";
72 $found++;
74 if ($line =~ /^\#include \"orbsvcs\/CosEventChannelAdminS\.h\"$/) {
75 print "INFO: orbsvcs/CosEventChannelAdminS.h\n";
76 $found++;
78 if ($line =~ /^\#include \"orbsvcs\/CosTypedEventChannelAdminS\.h\"$/) {
79 print "INFO: orbsvcs/CosTypedEventChannelAdminS.h\n";
80 $found++;
84 close(SKEL_HANDLE);
86 foreach $generated_file (@generated_files) {
87 $test->DeleteFile($generated_file);
90 if ($found == 5) {
91 print "INFO: Test passed!\n";
92 } else {
93 print STDERR "ERROR: Custom endings are incorrectly applied.\n";
94 $status = 1;
97 exit $status;