Skip to content
Snippets Groups Projects
Commit 4b82f17a authored by Alexandre Savard's avatar Alexandre Savard
Browse files

Merge branch 'master' into configyaml

parents 6007308c 5ef72f40
No related branches found
No related tags found
Loading
......@@ -37,27 +37,8 @@ endif
sflphoned_CXXFLAGS = \
-DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone\" $(IAX_CXXFLAG) $(NETWORKMANAGER) \
-DVERSION=\"$(VERSION)\" \
@ZRTPCPP_CFLAGS@ \
@libssl_CFLAGS@
# Add here the dynamic libraries sflphoned should be linked against
sflphoned_LDADD = \
./libsflphone.la \
@CCGNU2_LIBS@ \
@CCEXT2_LIBS@ \
@ZRTPCPP_LIBS@ \
$(PJSIP_LIBS) \
@CCRTP_LIBS@ \
@ALSA_LIBS@ \
@PULSEAUDIO_LIBS@ \
@SAMPLERATE_LIBS@ \
@libssl_LIBS@
# sflphoned_LDFLAGS= -pg -luuid
sflphoned_LDFLAGS= $(UUID_LIBS)
-DVERSION=\"$(VERSION)\"
# libsflphone
sflphoned_LDADD = ./libsflphone.la
......@@ -85,11 +66,6 @@ libsflphone_la_LIBADD = \
$(IAX_LIB) \
./sip/libsiplink.la \
./audio/libaudio.la \
./audio/audiortp/libaudiortp.la \
./audio/sound/libsound.la \
./audio/codecs/libcodecdescriptor.la \
./audio/alsa/libalsalayer.la \
./audio/pulseaudio/libpulselayer.la \
./dbus/libdbus.la \
./config/libconfig.la \
./plug-in/libplugin.la \
......@@ -100,9 +76,6 @@ libsflphone_la_LDFLAGS = \
@CCGNU2_LIBS@ \
@CCEXT2_LIBS@ \
@ZRTPCPP_LIBS@ \
@GSTREAMER_LIBS@ \
@LIBAVCODEC_LIBS@ \
@LIBSWSCALE_LIBS@ \
$(PJSIP_LIBS) \
@CCRTP_LIBS@ \
@ALSA_LIBS@ \
......@@ -115,9 +88,6 @@ libsflphone_la_CFLAGS = \
@CCGNU2_CFLAGS@ \
@CCEXT2_CFLAGS@ \
@ZRTPCPP_CFLAGS@ \
@GSTREAMER_CFLAGS@ \
@LIBAVCODEC_CFLAGS@ \
@LIBSWSCALE_CFLAGS@ \
$(PJSIP_CFLAGS) \
@CCRTP_CFLAGS@ \
@ALSA_CFLAGS@ \
......
......@@ -26,22 +26,19 @@ test_SOURCES = \
rtptest.h \
rtptest.cpp \
sdesnegotiatortest.h \
sdesnegotiatortest.cpp \
delaydetectiontest.h \
delaydetectiontest.cpp
sdesnegotiatortest.cpp
LLIBS=$(CPPUNIT_LIBS) \
@ALSA_LIBS@ \
@PULSEAUDIO_LIBS@ \
@CPPUNIT_LIBS@ \
@CCEXT2_LIBS@ \
@CCGNU2_LIBS@ \
@CCRTP_LIBS@ \
@ZRTPCPP_LIBS@ \
@libssl_LIBS@ \
@SAMPLERATE_LIBS@ \
$(PJSIP_LIBS) \
../src/sflphoned-logger.o \
../src/sflphoned-managerimpl.o \
../src/sflphoned-account.o\
../src/sflphoned-accountcreator.o \
../src/sflphoned-call.o \
../src/sflphoned-conference.o \
../src/sflphoned-eventthread.o \
../src/sflphoned-managerimpl_registration.o \
../src/sflphoned-numbercleaner.o \
../src/sflphoned-observer.o \
../src/sflphoned-voiplink.o \
../src/libsflphone.la
......@@ -37,40 +37,21 @@
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TextTestRunner.h>
// TODO: Why some header cannot be included ?
#include "accounttest.h"
#include "audiolayertest.h"
#include "configurationtest.h"
//#include "historytest.h"
//#include "hookmanagertest.h"
#include "mainbuffertest.h"
#include "numbercleanertest.h"
//#include "pluginmanagertest.h"
//#include "rtptest.h"
#include "sdesnegotiatortest.h"
int main(int argc, char* argv[]) {
printf("\nSFLphone Daemon Test Suite, by Savoir-Faire Linux 2004-2010\n\n");
Logger::setConsoleLog(true);
Logger::setDebugMode(true);
/*
Logger::setDebugMode(false);
int argvIndex = 1;
if (argc > 1) {
if (strcmp("--help", argv[1]) == 0) {
argvIndex++;
CPPUNIT_NS::Test
*suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry(
"All Tests").makeTest();
CPPUNIT_NS::Test* suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry("All Tests").makeTest();
int testSuiteCount = suite->getChildTestCount();
printf("Usage: test [OPTIONS] [TEST_SUITE]\n");
printf("\nOptions:\n");
printf(" --debug - Debug mode\n");
......@@ -89,6 +70,7 @@ int main(int argc, char* argv[]) {
}
}
// Default test suite : all tests
std::string testSuiteName = "All Tests";
if(argvIndex < argc)
{
......@@ -100,34 +82,28 @@ int main(int argc, char* argv[]) {
Manager::instance().initConfigFile(true, CONFIG_SAMPLE);
Manager::instance().init();
printf("\n\n=== Test Suite: %s ===\n\n", testSuiteName.c_str());
// Get the top level suite from the registry
printf("\n\n=== Test Suite: %s ===\n\n", testSuiteName.c_str());
CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry(testSuiteName).makeTest();
*/
CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest();
/*
if(suite->getChildTestCount() == 0)
{
_error("Invalid test suite name: %s", testSuiteName.c_str());
exit(-1);
}
*/
Manager::instance().initConfigFile(true, CONFIG_SAMPLE);
Manager::instance().init();
// Adds the test to the list of test to run
CppUnit::TextTestRunner runner;
runner.addTest(suite);
// Change the default outputter to a compiler error format outputter
runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(),
std::cerr));
runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(), std::cerr));
// Run the tests.
bool wasSucessful = runner.run();
Manager::instance().terminate();
// Return error code 1 if the one of test failed.
return wasSucessful ? 0 : 1;
Manager::instance().terminate();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment