Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Bug_1628_Regression / run_test.pl
blob7ed14a284a6d2b8ea1cd841f1c51ee748111ec3d
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;
11 my $tao_idl = "$ENV{ACE_ROOT}/bin/tao_idl";
12 if (exists $ENV{HOST_ROOT}) {
13 $tao_idl = "$ENV{HOST_ROOT}/bin/tao_idl";
16 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
18 # Generated code file names
19 $TestCaseC_i = "TestCaseC.i";
21 $server_TestCaseC_i = $server->LocalFile($TestCaseC_i);
22 $server->DeleteFile($TestCaseC_i);
24 $input_file = $server->LocalFile ("TestCase.idl");
26 # Compile the IDL
29 $SV = $server->CreateProcess ("$tao_idl", "-Ge 1 -Sc $input_file");
31 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
33 if ($server_status != 0) {
34 print STDERR "ERROR: server returned $server_status\n";
35 $status = 1;
38 if ($server->WaitForFileTimed ($TestCaseC_i,
39 $server->ProcessStartWaitInterval()) == -1) {
40 print STDERR "ERROR: cannot find file <$server_TestCaseC_i\n";
41 $SV->Kill (); $SV->TimedWait (1);
42 exit 1;
45 # Test for the presence of Body_dup etc. Crude test assumes that if
46 # Body_dup is there, then all the Body_* methods are also there.
48 $found = 0 ;
49 open (I_FILE, "$server_TestCaseC_i");
50 while( <I_FILE> ){
51 chomp ;
52 if( $_ =~ /Body_dup/ ){
53 $found = 1 ;
54 last ;
57 if( $found != 1 ){
58 print STDERR "ERROR: Body_* methods not found\n" ;
59 $status = 1 ;
62 $server->DeleteFile($TestCaseC_i);
64 exit $status;