diff options
Diffstat (limited to 'modules/CIAO/tests/IDL3/Connectors/run_test.pl')
-rwxr-xr-x | modules/CIAO/tests/IDL3/Connectors/run_test.pl | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/modules/CIAO/tests/IDL3/Connectors/run_test.pl b/modules/CIAO/tests/IDL3/Connectors/run_test.pl new file mode 100755 index 00000000000..9facf8c0db1 --- /dev/null +++ b/modules/CIAO/tests/IDL3/Connectors/run_test.pl @@ -0,0 +1,68 @@ + +# $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::TestTarget; +use File::Spec; + +$status =0; + +open (OLDOUT, ">&STDOUT"); +open (STDOUT, ">" . File::Spec->devnull()); +open (OLDERR, ">&STDERR"); +open (STDERR, ">&STDOUT"); + +# 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"; + +$input_file1 = $server->LocalFile ("incorrect_publishes.idl"); +$input_file2 = $server->LocalFile ("incorrect_emits.idl"); +$input_file3 = $server->LocalFile ("incorrect_consumes.idl"); + +# Compile the IDL +$SV = $server->CreateProcess ("$tao_idl", "$input_file1"); + +$server_status1 = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + +# Compile the IDL +$SV = $server->CreateProcess ("$tao_idl", "$input_file2"); + +$server_status2 = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + +# Compile the IDL +$SV = $server->CreateProcess ("$tao_idl", "$input_file3"); + +$server_status3 = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + +open (STDOUT, ">&OLDOUT"); +open (STDERR, ">&OLDERR"); + +if ($server_status1 == 0) { + print STDERR "ERROR: tao_idl returned $server_status1 for $input_file1, should have failed\n"; + $status = 1; +} + +if ($server_status2 == 0) { + print STDERR "ERROR: tao_idl returned $server_status2 for $input_file2, should have failed\n"; + $status = 1; +} + +if ($server_status3 == 0) { + print STDERR "ERROR: tao_idl returned $server_status3 for $input_file3, should have failed\n"; + $status = 1; +} + +exit $status; |