Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Bug_1628_Regression / run_test.pl
blob7f2c56bbb9f1d223771110a996f59248180e7ab1
3 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
4 & eval 'exec perl -S $0 $argv:q'
5 if 0;
7 # -*- perl -*-
9 use lib "$ENV{ACE_ROOT}/bin";
10 use PerlACE::TestTarget;
12 $status = 0;
13 my $tao_idl = "$ENV{ACE_ROOT}/bin/tao_idl";
14 if (exists $ENV{HOST_ROOT}) {
15 $tao_idl = "$ENV{HOST_ROOT}/bin/tao_idl";
18 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
20 # Generated code file names
21 $TestCaseC_i = "TestCaseC.i";
23 $server_TestCaseC_i = $server->LocalFile($TestCaseC_i);
24 $server->DeleteFile($TestCaseC_i);
26 $input_file = $server->LocalFile ("TestCase.idl");
28 # Compile the IDL
31 $SV = $server->CreateProcess ("$tao_idl", "-Ge 1 -Sc $input_file");
33 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
35 if ($server_status != 0) {
36 print STDERR "ERROR: server returned $server_status\n";
37 $status = 1;
40 if ($server->WaitForFileTimed ($TestCaseC_i,
41 $server->ProcessStartWaitInterval()) == -1) {
42 print STDERR "ERROR: cannot find file <$server_TestCaseC_i\n";
43 $SV->Kill (); $SV->TimedWait (1);
44 exit 1;
47 # Test for the presence of Body_dup etc. Crude test assumes that if
48 # Body_dup is there, then all the Body_* methods are also there.
50 $found = 0 ;
51 open (I_FILE, "$server_TestCaseC_i") ;
52 while( <I_FILE> ){
53 chomp ;
54 if( $_ =~ /Body_dup/ ){
55 $found = 1 ;
56 last ;
59 if( $found != 1 ){
60 print STDERR "ERROR: Body_* methods not found\n" ;
61 $status = 1 ;
64 $server->DeleteFile($TestCaseC_i);
67 exit $status;