From e16ded663a6a0b28c2e6b8d56aeb17cdb2fc1c09 Mon Sep 17 00:00:00 2001 From: Olivier Dion Date: Fri, 12 Aug 2022 14:37:43 -0400 Subject: [PATCH] test/sip: Nuke it These tests were never run on the CI and are not even in the build of Meson. Change-Id: I0109633de2fd03b8589734d92c039b34d5b729bc --- configure.ac | 1 - test/Makefile.am | 2 +- test/sip/.gitignore | 2 - test/sip/Makefile.am | 10 -- test/sip/sip.cpp | 60 ------- test/sip/sippxml/test_1.xml | 156 ----------------- test/sip/sippxml/test_2.xml | 160 ----------------- test/sip/sippxml/test_3.xml | 187 -------------------- test/sip/sippxml/test_4.xml | 121 ------------- test/sip/test_SIP.cpp | 339 ------------------------------------ test/sip/test_SIP.h | 118 ------------- 11 files changed, 1 insertion(+), 1155 deletions(-) delete mode 100644 test/sip/.gitignore delete mode 100644 test/sip/Makefile.am delete mode 100644 test/sip/sip.cpp delete mode 100644 test/sip/sippxml/test_1.xml delete mode 100644 test/sip/sippxml/test_2.xml delete mode 100644 test/sip/sippxml/test_3.xml delete mode 100644 test/sip/sippxml/test_4.xml delete mode 100644 test/sip/test_SIP.cpp delete mode 100644 test/sip/test_SIP.h diff --git a/configure.ac b/configure.ac index dcdb75c4a..c8a0c1748 100644 --- a/configure.ac +++ b/configure.ac @@ -655,7 +655,6 @@ AC_CONFIG_FILES([Makefile \ src/Makefile \ ringtones/Makefile \ test/Makefile\ - test/sip/Makefile test/unitTest/Makefile \ man/Makefile \ doc/Makefile \ diff --git a/test/Makefile.am b/test/Makefile.am index ce5d4e7eb..42f6a066a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,5 +1,5 @@ SUBDIRS = unitTest -SUBDIRS += sip + if ENABLE_FUZZING SUBDIRS += fuzzing endif diff --git a/test/sip/.gitignore b/test/sip/.gitignore deleted file mode 100644 index c28306c38..000000000 --- a/test/sip/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -#test binaries -sip diff --git a/test/sip/Makefile.am b/test/sip/Makefile.am deleted file mode 100644 index 083cf62e7..000000000 --- a/test/sip/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -# Rules for the test code (use `make check` to execute) -include $(top_srcdir)/globals.mk - -AM_CXXFLAGS += -I$(top_srcdir)/src -AM_LDFLAGS += $(CPPUNIT_LIBS) $(top_builddir)/src/libring.la - -check_PROGRAMS = ut_sip -ut_sip_SOURCES = sip.cpp test_SIP.h test_SIP.cpp - -TESTS = $(check_PROGRAMS) diff --git a/test/sip/sip.cpp b/test/sip/sip.cpp deleted file mode 100644 index 9de835da1..000000000 --- a/test/sip/sip.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2004-2022 Savoir-faire Linux Inc. - * Author: Guillaume Roguez - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include -#include - -#include "jami.h" - -#include - -void init_daemon() -{ - DRing::init(DRing::InitFlag(DRing::DRING_FLAG_DEBUG | DRing::DRING_FLAG_CONSOLE_LOG)); - DRing::start("test/unitTest/jami-sample.yml"); -} - -int main() -{ - init_daemon(); - - CppUnit::TextUi::TestRunner runner; - - // Register all tests - auto& registry = CppUnit::TestFactoryRegistry::getRegistry(); - runner.addTest(registry.makeTest()); - - // Use a compiler error format outputter for results and output into stderr - runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(), std::cerr )); - - bool ret; - - try { - // Run tests - ret = !runner.run("", false); - } catch (const std::exception& e) { - std::cerr << "Exception catched during tests: " << e.what() << '\n'; - ret = 1; - } - - DRing::fini(); - - return ret; -} diff --git a/test/sip/sippxml/test_1.xml b/test/sip/sippxml/test_1.xml deleted file mode 100644 index fae68d200..000000000 --- a/test/sip/sippxml/test_1.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Content-Length: 0 - - ]]> - - - - - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - - ]]> - - - - - - - - - - - - - - Content-Length: 0 - - ]]> - - - - - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - - ]]> - - - - - - - - - - - - Content-Length: 0 - - ]]> - - - - - - - - - - - - - - diff --git a/test/sip/sippxml/test_2.xml b/test/sip/sippxml/test_2.xml deleted file mode 100644 index 1856bf713..000000000 --- a/test/sip/sippxml/test_2.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - ;tag=[pid]SIPpTag00[call_number] - To: sut - Call-ID: [call_id] - CSeq: 1 INVITE - Contact: sip:sipp@[local_ip]:[local_port] - Max-Forwards: 70 - Subject: Performance Test - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - - ]]> - - - - - - - - - - - - - - - - - - - - - ;tag=[pid]SIPpTag00[call_number] - To: sut [peer_tag_param] - Call-ID: [call_id] - CSeq: 1 ACK - Contact: sip:sipp@[local_ip]:[local_port] - Max-Forwards: 70 - Subject: Performance Test - Content-Length: 0 - - ]]> - - - - - - - - - Content-Length: 0 - - ]]> - - - - - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - - ]]> - - - - - - - - ;tag=[pid]SIPpTag00[call_number] - To: sut [peer_tag_param] - Call-ID: [call_id] - CSeq: 2 BYE - Contact: sip:sipp@[local_ip]:[local_port] - Max-Forwards: 70 - Subject: Performance Test - Content-Length: 0 - - ]]> - - - - - - - - - - - - diff --git a/test/sip/sippxml/test_3.xml b/test/sip/sippxml/test_3.xml deleted file mode 100644 index bae7eaa2b..000000000 --- a/test/sip/sippxml/test_3.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - Content-Length: 0 - - ]]> - - - - - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - - ]]> - - - - - - - - - - - - - - - - - Content-Length: 0 - - ]]> - - - - - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - - ]]> - - - - - - - - - - - - - - - - - - Content-Length: 0 - - ]]> - - - - - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - - ]]> - - - - - - - - - - - - - Content-Length: 0 - - ]]> - - - - - - - - - - diff --git a/test/sip/sippxml/test_4.xml b/test/sip/sippxml/test_4.xml deleted file mode 100644 index 038aea810..000000000 --- a/test/sip/sippxml/test_4.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;tag=[pid]SIPpTag00[call_number] - To: sut [peer_tag_param] - Call-ID: [call_id] - CSeq: 1 ACK - Contact: sip:sipp@[local_ip]:[local_port] - Max-Forwards: 70 - Subject: Performance Test - Content-Length: 0 - - ]]> - - - - - - - - - ;tag=[pid]SIPpTag00[call_number] - To: sut [peer_tag_param] - Call-ID: [call_id] - CSeq: 2 BYE - Contact: sip:sipp@[local_ip]:[local_port] - Max-Forwards: 70 - Subject: Performance Test - Content-Length: 0 - - ]]> - - - - - - - - - - - - diff --git a/test/sip/test_SIP.cpp b/test/sip/test_SIP.cpp deleted file mode 100644 index 5555288f1..000000000 --- a/test/sip/test_SIP.cpp +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright (C) 2004-2022 Savoir-faire Linux Inc. - * Author: Emmanuel Milou - * Author: Guillaume Roguez - * Author: Olivier Gregoire - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include -#include -#include - -#include -#include -#include - -#include "test_SIP.h" -#include "call_const.h" - -using namespace jami; -using namespace std::literals; - -static pthread_mutex_t count_mutex; -static pthread_cond_t count_nb_thread; -static int counter = 0; - -CPPUNIT_TEST_SUITE_REGISTRATION(test_SIP); - -/* -return an error if all call are not successful -*/ -void* -sippThreadWithCount(void* str) -{ - // number of time we use the mutex. Lock the utilisation of counter - pthread_mutex_lock(&count_mutex); - counter++; - pthread_mutex_unlock(&count_mutex); - - // display what is send on the parameter of the method - std::string* command = (std::string*) (str); - - std::cout << "test_SIP: " << command << std::endl; - - // Set up the sipp instance in this thread in order to catch return value - // 0: All calls were successful - // 1: At least one call failed - // 97: exit on internal command. Calls may have been processed - // 99: Normal exit without calls processed - // -1: Fatal error - // -2: Fatal error binding a socket - int i = system(command->c_str()); // c_str() retrieve the *char of the string - - CPPUNIT_ASSERT(i); - - pthread_mutex_lock(&count_mutex); - counter--; - // ??? - if (counter == 0) - pthread_cond_signal(&count_nb_thread); - - pthread_mutex_unlock(&count_mutex); - - pthread_exit(NULL); -} - -RAIIThread -sippThread(const std::string& command) -{ - return std::thread([command] { - std::cout << "test_SIP: " << command << std::endl; - - // Set up the sipp instance in this thread in order to catch return value - // 0: All calls were successful - // 1: At least one call failed - // 97: exit on internal command. Calls may have been processed - // 99: Normal exit without calls processed - // -1: Fatal error - // -2: Fatal error binding a socket - auto ret = system(command.c_str()); - std::cout << "test_SIP: Command executed by system returned: " << ret << std::endl; - }); -} - -void -test_SIP::setUp() -{ - std::cout << "setup test SIP" << std::endl; - pthread_mutex_lock(&count_mutex); - counter = 0; - pthread_mutex_unlock(&count_mutex); - - running_ = true; - eventLoop_ = RAIIThread(std::thread([this] { - while (running_) { - std::this_thread::sleep_for(std::chrono::milliseconds(50)); - } - })); -} - -void -test_SIP::tearDown() -{ - running_ = false; - eventLoop_.join(); - - // in order to stop any currently running threads - std::cout << "test_SIP: Clean all remaining sipp instances" << std::endl; - int ret = system("killall sipp"); - if (ret) - std::cout << "test_SIP: Error from system call, killall sipp" - << ", ret=" << ret << '\n'; - Manager::instance().callFactory.clear(); -} - -void -test_SIP::testSimpleOutgoingIpCall() -{ - std::cout << ">>>> test simple outgoing IP call <<<< " << '\n'; - - CPPUNIT_ASSERT(Manager::instance().callFactory.empty()); - - // start a user agent server waiting for a call - auto t = sippThread("sipp -sn uas -i 127.0.0.1 -p 5068 -m 1 -bg"); - - std::string testaccount("IP2IP"); - std::string testcallnumber("sip:test@127.0.0.1:5068"); - std::string testcallid; // returned by outgoingCall() - - CPPUNIT_ASSERT(!Manager::instance().hasCurrentCall()); - - // start a new call sending INVITE message to sipp instance - testcallid = DRing::placeCallWithMedia(testaccount, testcallnumber, {}); - - // wait for receiving 180 and 200 message from peer - std::this_thread::sleep_for(std::chrono::seconds(1)); // should be enough - - auto call = Manager::instance().getCallFromCallID(testcallid); - CPPUNIT_ASSERT(call); - - // check call state - auto state = call->getStateStr(); - std::cout << ">>>> call state is now " << state << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::CURRENT); - - // hangup call - std::cout << ">>>> hangup the call " << '\n'; - Manager::instance().hangupCall(testaccount, testcallid); - state = call->getStateStr(); - std::cout << ">>>> call state is now " << state << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::OVER); - - // Call must not not be available (except for thus how already own a pointer like us) - CPPUNIT_ASSERT(not Manager::instance().getCallFromCallID(testcallid)); -} - -void -test_SIP::testSimpleIncomingIpCall() -{ - std::cout << ">>>> test simple incoming IP call <<<< " << '\n'; - - CPPUNIT_ASSERT(Manager::instance().callFactory.empty()); - - // command to be executed by the thread, user agent client which initiate a call and hangup - sippThread("sipp -sn uac 127.0.0.1 -i 127.0.0.1 -p 5062 -m 1 -bg"); - - // sleep a while to make sure that sipp insdtance is initialized and jami received - // the incoming invite. - std::this_thread::sleep_for(std::chrono::seconds(1)); - - // Answer this call - const auto& calls = Manager::instance().callFactory.getAllCalls(); - const auto call = *calls.cbegin(); - CPPUNIT_ASSERT(Manager::instance().answerCall("", call->getCallId())); - - // hangup this call - Manager::instance().hangupCall("", call->getCallId()); - auto state = call->getStateStr(); - std::cout << ">>>> call state is now " << state << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::OVER); -} - -void -test_SIP::testMultipleIncomingIpCall() -{ - std::cout << ">>>> test multiple incoming IP call <<<< " << '\n'; - - CPPUNIT_ASSERT(Manager::instance().callFactory.empty()); - - // this value change the number of outgoing call we do - int numberOfCall = 5; - - for (int i = 0; i < numberOfCall; i++) { - // start a user agent server waiting for a call - sippThread("sipp -sf sippxml/test_2.xml 127.0.0.1 -i 127.0.0.1 -p 506" - + std::to_string(i + 1) + " -m 1 -bg"); - - // sleep a while to make sure that sipp insdtance is initialized and jami received - // the incoming invite. - std::this_thread::sleep_for(std::chrono::seconds(3)); - - const auto& calls = Manager::instance().callFactory.getAllCalls(); - const auto call = *calls.cbegin(); - auto state = call->getStateStr(); - std::cout << ">>>> current call (call number: " + std::to_string(i) + ") state:" << state - << '\n'; - CPPUNIT_ASSERT(state - == DRing::Call::StateEvent::INCOMING); // TODO this state is sometime HOLD - - // Answer this call - CPPUNIT_ASSERT(Manager::instance().answerCall("", call->getCallId())); - - state = call->getStateStr(); - std::cout << ">>>> current call (call number: " + std::to_string(i) + ") state:" << state - << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::CURRENT); - - Manager::instance().onHoldCall("", call->getCallId()); - state = call->getStateStr(); - std::cout << ">>>> current call (call number: " + std::to_string(i) + ") state:" << state - << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::HOLD); - } -} - -void -test_SIP::testMultipleOutgoingIpCall() -{ - std::cout << ">>>> test multiple outgoing IP call <<<< " << '\n'; - - CPPUNIT_ASSERT(Manager::instance().callFactory.empty()); - - // this value change the number of outgoing call we do - int numberOfCall = 5; - - // setup of the calls - std::string callNumber("sip:test@127.0.0.1:5061"); - std::string testaccount("IP2IP"); - std::string callID[numberOfCall]; - - for (int i = 0; i < numberOfCall; i++) { - // start a user agent server waiting for a call - sippThread("sipp -sn uas -i 127.0.0.1 -p 5061 -m " + std::to_string(numberOfCall) + " -bg"); - - callID[i] = DRing::placeCallWithMedia(testaccount, callNumber, {}); - auto newCall = Manager::instance().getCallFromCallID(callID[i]); - CPPUNIT_ASSERT(newCall); - - // wait for receiving 180 and 200 message from peer - std::this_thread::sleep_for(std::chrono::seconds(1)); // should be enough - - auto state = newCall->getStateStr(); - std::cout << ">>>> current call (call number: " + std::to_string(i) + ") state:" << state - << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::CURRENT); - - // test the changement of calls states after doing a new call - if (i) { - for (int j = 0; j < i; j++) { - auto oldCall = Manager::instance().getCallFromCallID(callID[j]); - CPPUNIT_ASSERT(oldCall); - auto oldState = oldCall->getStateStr(); - std::cout << ">>>> old call (call number: " + std::to_string(j) + ") state:" - << oldState << '\n'; - CPPUNIT_ASSERT(oldState == DRing::Call::StateEvent::HOLD); - } - } - } - - // hangup all calls - for (int i = 0; i < numberOfCall; i++) { - auto call = Manager::instance().getCallFromCallID(callID[i]); - Manager::instance().hangupCall(testaccount, callID[i]); - auto state = call->getStateStr(); - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::OVER); - } -} - -void -test_SIP::testHoldIpCall() -{ - std::cout << ">>>> test hold IP call <<<< " << '\n'; - - CPPUNIT_ASSERT(Manager::instance().callFactory.empty()); - - auto testAccount = "IP2IP"; - auto testCallNumber = "sip:test@127.0.0.1:5062"; - - auto callThread = sippThread("sipp -sf sippxml/test_3.xml -i 127.0.0.1 -p 5062 -m 1 -bg"); - - auto testCallId = DRing::placeCallWithMedia(testAccount, testCallNumber, {}); - auto call = Manager::instance().getCallFromCallID(testCallId); - - std::this_thread::sleep_for(std::chrono::seconds(2)); - - auto state = call->getStateStr(); - std::cout << ">>>> call state is now " << state << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::CURRENT); - - Manager::instance().onHoldCall(testAccount, testCallId); - - state = call->getStateStr(); - std::cout << ">>>> call state is now " << state << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::HOLD); - - Manager::instance().offHoldCall(testAccount, testCallId); - - state = call->getStateStr(); - std::cout << ">>>> call state is now " << state << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::CURRENT); - - Manager::instance().hangupCall(testAccount, testCallId); - state = call->getStateStr(); - std::cout << ">>>> call state is now " << state << '\n'; - CPPUNIT_ASSERT(state == DRing::Call::StateEvent::OVER); -} - -void -test_SIP::testSIPURI() -{ - std::cout << ">>>> test SIPURI <<<< " << '\n'; - - auto foo = sip_utils::stripSipUriPrefix(""sv); - CPPUNIT_ASSERT_EQUAL("17771234567"sv, foo); -} diff --git a/test/sip/test_SIP.h b/test/sip/test_SIP.h deleted file mode 100644 index c40562899..000000000 --- a/test/sip/test_SIP.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2004-2022 Savoir-faire Linux Inc. - * Author: Emmanuel Milou - * Author: Guillaume Roguez - * Author: Olivier Gregoire - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ -#pragma once - -// Cppunit import -#include -#include -#include -#include - -// Application import -#include "manager.h" - -#include "sip/sipvoiplink.h" -#include "sip/sip_utils.h" - -#include - -#include -class RAIIThread -{ -public: - RAIIThread() = default; - - RAIIThread(std::thread&& t) : thread_ {std::move(t)} {}; - - ~RAIIThread() { - join(); - } - - void join() { - if (thread_.joinable()) - thread_.join(); - } - - RAIIThread(RAIIThread&&) = default; - RAIIThread& operator=(RAIIThread&&) = default; - -private: - std::thread thread_; -}; - -/* - * @file Test-sip.h - * @brief Regroups unitary tests related to the SIP module - */ - -class test_SIP : public CppUnit::TestFixture -{ -public: - //test_SIP() : CppUnit::TestCase("SIP module Tests") {} - - /* - * Code factoring - Common resources can be initialized here. - * This method is called by unitcpp before each test - */ - void setUp(); - - /* - * Code factoring - Common resources can be released here. - * This method is called by unitcpp after each test - */ - void tearDown(); - -private: - // Create a simple IP call and test his state - void testSimpleOutgoingIpCall(void); - - // Receive a new incoming call and test his state - void testSimpleIncomingIpCall(void); - - // Test with multiple outgoing calls - void testMultipleOutgoingIpCall(void); - - // TODO this test bug, the new calls are sometimes - // put in hold - void testMultipleIncomingIpCall(void); - - // Test the hold state - void testHoldIpCall(void); - - void testSIPURI(void); - - - /** - * Use cppunit library macros to add unit test to the factory - */ - CPPUNIT_TEST_SUITE(test_SIP); - CPPUNIT_TEST ( testSIPURI ); - /*CPPUNIT_TEST ( testHoldIpCall ); - CPPUNIT_TEST ( testSimpleOutgoingIpCall ); - CPPUNIT_TEST ( testMultipleOutgoingIpCall ); - CPPUNIT_TEST ( testSimpleIncomingIpCall );*/ - //CPPUNIT_TEST ( testMultipleIncomingIpCall ); - CPPUNIT_TEST_SUITE_END(); - - RAIIThread eventLoop_; - std::atomic_bool running_; -};