summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2010-04-09 11:41:21 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2010-04-09 11:41:21 +0000
commitb4c834e37a04f174e6a91f5927c2ba9d97d67f12 (patch)
tree8f9d2b2005c29b1803a1976d82f953a89dbee126
parent24693123815d38d16a18afbfb8d557b35b964b16 (diff)
downloadATCD-b4c834e37a04f174e6a91f5927c2ba9d97d67f12.tar.gz
Fri Apr 9 11:42:31 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/IDL3/Connectors: New test to validate that connectors don't support consumes/emits/ publishes * bin/ciao_tests.lst: Added new IDL3/Connectors test. This executes tao_idl and validates that it fails
-rw-r--r--CIAO/ChangeLog10
-rw-r--r--CIAO/bin/ciao_tests.lst5
-rw-r--r--CIAO/tests/IDL3/Connectors/README.txt3
-rw-r--r--CIAO/tests/IDL3/Connectors/incorrect_consumes.idl19
-rw-r--r--CIAO/tests/IDL3/Connectors/incorrect_emits.idl19
-rw-r--r--CIAO/tests/IDL3/Connectors/incorrect_publishes.idl19
-rwxr-xr-xCIAO/tests/IDL3/Connectors/run_test.pl68
7 files changed, 141 insertions, 2 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 388dbe4e167..294d570a6c6 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,13 @@
+Fri Apr 9 11:42:31 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/IDL3/Connectors:
+ New test to validate that connectors don't support consumes/emits/
+ publishes
+
+ * bin/ciao_tests.lst:
+ Added new IDL3/Connectors test. This executes tao_idl and validates
+ that it fails
+
Fri Apr 9 10:21:31 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* DAnCE/NodeApplication/NodeApplication_Impl.cpp:
diff --git a/CIAO/bin/ciao_tests.lst b/CIAO/bin/ciao_tests.lst
index e646f9f2031..9cb045a7de4 100644
--- a/CIAO/bin/ciao_tests.lst
+++ b/CIAO/bin/ciao_tests.lst
@@ -28,6 +28,7 @@ TAO/CIAO/tests/IDL3_to_XMI/XMI_For_Native/run_test.pl: !STATIC !MINIMUM !CORBA_E
TAO/CIAO/tests/IDL3_to_XMI/XMI_For_Sequence/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE !NO_IDL3_TO_XMI
TAO/CIAO/tests/IDL3_to_XMI/IDL2XMI_Test/run_test.pl: !FIXED_BUGS_ONLY !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE !NO_IDL3_TO_XMI
TAO/CIAO/tests/IDL_Test/Double_Inherited_Component/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST
+TAO/CIAO/tests/IDL3/Connectors/run_test.pl
TAO/CIAO/tests/Bug_3832_Regression/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST
TAO/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE
TAO/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test_cdr.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE
@@ -85,10 +86,10 @@ TAO/CIAO/connectors/dds4ccm/tests/Policies/run_test.pl: !STATIC !MINIMUM !CORBA_
TAO/CIAO/connectors/dds4ccm/tests/CoherentWriter/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/tests/QueryFilterListenEvent/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/tests/QueryFilterListenState/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
+TAO/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
+TAO/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/performance-tests/LatencyTT/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/descriptors/run_test_dds.pl: !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/descriptors/run_test_ndds.pl: !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/performance-tests/Throughput/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/performance-tests/DDSThroughput/descriptors/run_test_dds.pl: !ACE_FOR_TAO !ST NDDS
-TAO/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
-TAO/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
diff --git a/CIAO/tests/IDL3/Connectors/README.txt b/CIAO/tests/IDL3/Connectors/README.txt
new file mode 100644
index 00000000000..591d6ec8066
--- /dev/null
+++ b/CIAO/tests/IDL3/Connectors/README.txt
@@ -0,0 +1,3 @@
+// $Id$
+
+This test validates whether a connector can't have a consumes
diff --git a/CIAO/tests/IDL3/Connectors/incorrect_consumes.idl b/CIAO/tests/IDL3/Connectors/incorrect_consumes.idl
new file mode 100644
index 00000000000..16771d306a4
--- /dev/null
+++ b/CIAO/tests/IDL3/Connectors/incorrect_consumes.idl
@@ -0,0 +1,19 @@
+// $Id$
+
+#include <Components.idl>
+
+eventtype foo_event
+{
+};
+
+interface A
+{
+ long do_something ();
+};
+
+connector B
+{
+ provides A x;
+ uses A y;
+ consumes foo_event c_foo;
+};
diff --git a/CIAO/tests/IDL3/Connectors/incorrect_emits.idl b/CIAO/tests/IDL3/Connectors/incorrect_emits.idl
new file mode 100644
index 00000000000..19ea0403091
--- /dev/null
+++ b/CIAO/tests/IDL3/Connectors/incorrect_emits.idl
@@ -0,0 +1,19 @@
+// $Id$
+
+#include <Components.idl>
+
+eventtype foo_event
+{
+};
+
+interface A
+{
+ long do_something ();
+};
+
+connector B
+{
+ provides A x;
+ uses A y;
+ emits foo_event e_foo;
+};
diff --git a/CIAO/tests/IDL3/Connectors/incorrect_publishes.idl b/CIAO/tests/IDL3/Connectors/incorrect_publishes.idl
new file mode 100644
index 00000000000..c89eec32706
--- /dev/null
+++ b/CIAO/tests/IDL3/Connectors/incorrect_publishes.idl
@@ -0,0 +1,19 @@
+// $Id$
+
+#include <Components.idl>
+
+eventtype foo_event
+{
+};
+
+interface A
+{
+ long do_something ();
+};
+
+connector B
+{
+ provides A x;
+ uses A y;
+ publishes foo_event p_foo;
+};
diff --git a/CIAO/tests/IDL3/Connectors/run_test.pl b/CIAO/tests/IDL3/Connectors/run_test.pl
new file mode 100755
index 00000000000..41afbb0c113
--- /dev/null
+++ b/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 != 1) {
+ print STDERR "ERROR: tao returned $server_status1 for $input_file1, should have failed\n";
+ $status = 1;
+}
+
+if ($server_status2 != 1) {
+ print STDERR "ERROR: tao returned $server_status2 for $input_file2, should have failed\n";
+ $status = 1;
+}
+
+if ($server_status3 != 1) {
+ print STDERR "ERROR: tao returned $server_status3 for $input_file3, should have failed\n";
+ $status = 1;
+}
+
+exit $status;