Commit 68241e8a authored by Emmanuel Milou's avatar Emmanuel Milou

Integrate test compilation in the daemon build-system

parent c4d393d5
......@@ -9,6 +9,6 @@ unittest:
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = libs src ringtones po man
SUBDIRS = libs src ringtones po man test
EXTRA_DIST = m4/*.m4 tools/*.sh platform/* images/* README.gentoo
......@@ -28,12 +28,9 @@
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
//extern struct state _res;
#define CAN_REINVITE 1
/**************** EXTERN VARIABLES AND FUNCTIONS (callbacks) **************************/
/*
......@@ -47,11 +44,11 @@ void get_remote_sdp_from_offer( pjsip_rx_data *rdata, pjmedia_sdp_session** r_sd
int getModId();
/**
* * Set audio (SDP) configuration for a call
* * localport, localip, localexternalport
* * @param call a SIPCall valid pointer
* * @return bool True
* */
* Set audio (SDP) configuration for a call
* localport, localip, localexternalport
* @param call a SIPCall valid pointer
* @return bool True
*/
bool setCallAudioLocal(SIPCall* call, std::string localIP, bool stun, std::string server);
void handle_incoming_options (pjsip_rx_data *rxdata);
......@@ -178,8 +175,6 @@ SIPVoIPLink* SIPVoIPLink::_instance = NULL;
, _useStun(false)
, _clients(0)
{
_debug("SIPVoIPLink::~SIPVoIPLink(): sipvoiplink constructor called \n");
// to get random number for RANDOM_PORT
srand (time(NULL));
......@@ -191,7 +186,6 @@ SIPVoIPLink* SIPVoIPLink::_instance = NULL;
SIPVoIPLink::~SIPVoIPLink()
{
_debug("SIPVoIPLink::~SIPVoIPLink(): sipvoiplink destructor called \n");
terminate();
}
......
......@@ -6,8 +6,7 @@ int main(int argc, const char* argv[])
CppUnit::TextTestRunner runner;
runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
runner.run();
return runner.run();
return 0;
}
#!/bin/bash
myname="`basename $0`"
failures=0
for f in *
do
# Skip ourself
if [ "$f" = "$myname" ]; then
continue
fi
if [ -x "$f" ]; then
echo
echo "=== Running [$f] test ==="
# Warning, libCppUnit returns 0 on failure.
./"$f" && {
echo Warning: Failure in $f.
failures=$((failures+1))
}
fi
done
echo "Tests finshed, there were $failures failures."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment