blob: b6baa9a73a9359665d0bf7bd0ae0a585bd6a7ca5 (
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
63
64
65
66
67
68
69
70
71
|
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::TestTarget;
$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";
}
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
# Generated code file names
$TestCaseC_i = "TestCaseC.i";
$server_TestCaseC_i = $server->LocalFile($TestCaseC_i);
$server->DeleteFile($TestCaseC_i);
$input_file = $server->LocalFile ("TestCase.idl");
# Compile the IDL
#
$SV = $server->CreateProcess ("$tao_idl", "-Ge 1 -Sc $input_file");
$server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
if ($server_status != 0) {
print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
if ($server->WaitForFileTimed ($TestCaseC_i,
$server->ProcessStartWaitInterval()) == -1) {
print STDERR "ERROR: cannot find file <$server_TestCaseC_i\n";
$SV->Kill (); $SV->TimedWait (1);
exit 1;
}
# 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, "$server_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 ;
}
$server->DeleteFile($TestCaseC_i);
exit $status;
|