summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_1628_Regression/run_test.pl
blob: c13cae17c0149b1da19835a28c729bd6a7ef1ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

# $Id$

eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
     & eval 'exec perl -S $0 $argv:q'
     if 0;

# -*- perl -*-

use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;

$status =0;

# The location of the tao_idl utility - depends on O/S
if ($^O eq "MSWin32")
{
   $tao_idl = "../../../bin/tao_idl";
}
else
{
   $tao_idl = "../../../TAO/TAO_IDL/tao_idl";
}

# Generated code file names
$TestCaseC_i     = PerlACE::LocalFile("TestCaseC.i");
unlink $TestCaseC_i;


# Compile the IDL
#
$TAO_IDL    = new PerlACE::Process("$tao_idl");
$TAO_IDL->Arguments( "-Ge 1 -Sc TestCase.idl" ) ;
if( $TAO_IDL->SpawnWaitKill(10) != 0 )
{
   print STDERR "ERROR: can't compile IDL\n";
   $TAO_IDL->Kill ();
   $status = 1;
   exit $status;
}

# Test for the presence of Body_dup etc. Crude test assumes that if
# Body_dup is there, then all the Body_* methods are also there.
#
$found = 0 ;
open (I_FILE, "$TestCaseC_i") ;
while( <I_FILE> )
{
   chomp ;
   if( $_ =~ /Body_dup/ )
   {
       $found = 1 ;
       last ;
   }
}
if( $found != 1 )
{
    print STDERR "ERROR: Body_* methods not found\n" ;
    $status = 1 ;
}

exit $status;