[asterisk-scf-commits] asterisk-scf/release/media_rtp_pjmedia.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu May 19 14:38:07 CDT 2011


branch "master" has been updated
       via  2fe8c6154989313a4f40eb45cccd5b946f8f495b (commit)
      from  103929b269e3391fa36b4d34c81ca96efa5eaaef (commit)

Summary of changes:
 ...t_component.config => test_component_v6.config} |    2 +-
 test/CMakeLists.txt                                |    5 +++--
 test/TestRTPpjmedia.cpp                            |   14 ++++++++++++++
 3 files changed, 18 insertions(+), 3 deletions(-)
 copy config/{test_component.config => test_component_v6.config} (96%)


- Log -----------------------------------------------------------------
commit 2fe8c6154989313a4f40eb45cccd5b946f8f495b
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu May 19 16:39:40 2011 -0300

    Fix issue when running tests on a system without IPv6.

diff --git a/config/test_component_v6.config b/config/test_component_v6.config
new file mode 100644
index 0000000..250ad0e
--- /dev/null
+++ b/config/test_component_v6.config
@@ -0,0 +1,64 @@
+# This is a configuration file used in conjunction with the media_rtp_pjmedia test driver
+
+#
+# Icebox Configuration
+#
+
+IceBox.InheritProperties=1
+IceBox.LoadOrder=ServiceDiscovery,RtpStateReplicator,MediaRTPpjmedia,MediaRTPpjmediaTest
+
+# RtpStateReplicator Configuration
+IceBox.Service.RtpStateReplicator=RtpStateReplicator:create
+
+# Adapter parameters for this component
+RtpStateReplicator.Endpoints=tcp:udp
+
+# A proxy to the service locator management service
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
+
+# A proxy to the service locator service
+LocatorService.Proxy=LocatorService:tcp -p 4411
+
+#
+# media_rtp_pjmedia Configuration
+#
+
+IceBox.Service.MediaRTPpjmedia=media_rtp_pjmedia:create
+
+# Adapter parameters for this component
+MediaRTPpjmediaAdapter.Endpoints=default
+MediaRTPpjmediaAdapterLocal.Endpoints=default
+MediaRTPpjmediaAdapterLogger.Endpoints=default
+
+# A proxy to the service locator management service
+ServiceLocatorManagementProxy=LocatorServiceManagement:tcp -p 4422
+
+# A proxy to the service locator service
+ServiceLocatorProxy=LocatorService:tcp -p 4411
+
+#
+# media_rtp_pjmedia_test Configuration
+#
+
+IceBox.Service.MediaRTPpjmediaTest=media_rtp_pjmedia_test_v6:create
+
+#
+# Service Locator Configuration
+#
+
+IceBox.Service.ServiceDiscovery=service_locator:create
+
+AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
+AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
+AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
+AsteriskSCFIceStorm.Trace.TopicManager=2
+AsteriskSCFIceStorm.Transient=1
+AsteriskSCFIceStorm.Flush.Timeout=2000
+TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
+
+ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
+ServiceLocatorAdapter.Endpoints=tcp -p 4411
+ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
+LocatorService.Proxy=LocatorService:tcp -p 4411
+
+LoggerAdapter.Endpoints=default
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f65d5b2..87662d4 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -9,16 +9,17 @@ asterisk_scf_component_add_boost_libraries(media_rtp_pjmedia_test unit_test_fram
 asterisk_scf_component_build_icebox(media_rtp_pjmedia_test)
 target_link_libraries(media_rtp_pjmedia_test asterisk-scf-api)
 
-add_definitions(-DIPV6_TEST)
 asterisk_scf_component_init(media_rtp_pjmedia_test_v6)
 asterisk_scf_component_add_file(media_rtp_pjmedia_test_v6 TestRTPpjmedia.cpp)
 asterisk_scf_component_add_slice(media_rtp_pjmedia_test_v6 ../local-slice/RtpStateReplicationIf.ice)
 asterisk_scf_component_add_boost_libraries(media_rtp_pjmedia_test_v6 unit_test_framework thread date_time)
 asterisk_scf_component_build_icebox(media_rtp_pjmedia_test_v6)
+pjproject_link(media_rtp_pjmedia_test_v6 pjlib)
+set_property(TARGET media_rtp_pjmedia_test_v6 PROPERTY COMPILE_DEFINITIONS IPV6_TEST)
 target_link_libraries(media_rtp_pjmedia_test_v6 asterisk-scf-api)
 
 # integration test
 if(integrated_build STREQUAL "true")
   asterisk_scf_test_icebox(media_rtp_pjmedia_test config/test_component.config)
-  asterisk_scf_test_icebox(media_rtp_pjmedia_test_v6 config/test_component.config)
+  asterisk_scf_test_icebox(media_rtp_pjmedia_test_v6 config/test_component_v6.config)
 endif()
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index 810963e..3f5e06e 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -15,6 +15,7 @@
  */
 #ifdef IPV6_TEST
 #define BOOST_TEST_MODULE RTPpjmediaTestSuitev6
+#include <pj/config_site.h>
 #else
 #define BOOST_TEST_MODULE RTPpjmediaTestSuite
 #endif
@@ -309,6 +310,8 @@ private:
 
 BOOST_GLOBAL_FIXTURE(GlobalIceFixture);
 
+#if !defined(IPV6_TEST) || defined(PJ_HAS_IPV6)
+
 /**
  * Confirm that we find the rtp media session service based on category
  */
@@ -1111,6 +1114,17 @@ BOOST_AUTO_TEST_CASE(ReleaseRTPSession)
     BOOST_CHECK(released);
 }
 
+#else
+
+/**
+ * Dummy test in case IPv6 is not supported
+ */
+BOOST_AUTO_TEST_CASE(DummyTest)
+{
+}
+
+#endif
+
 void MediaRTPpjmediaTest::start(std::string const& name,
     Ice::CommunicatorPtr const&,
     Ice::StringSeq const& args)

-----------------------------------------------------------------------


-- 
asterisk-scf/release/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list