diff --git a/libretroshare/src/pqi/p3linkmgr.h b/libretroshare/src/pqi/p3linkmgr.h index 36808913d..5cf0026dd 100644 --- a/libretroshare/src/pqi/p3linkmgr.h +++ b/libretroshare/src/pqi/p3linkmgr.h @@ -171,7 +171,8 @@ virtual bool getFriendNetStatus(const std::string &id, peerConnectState &state) virtual void setTunnelConnection(bool b) = 0; // ONLY used by p3peermgr.cc & p3peers.cc MOVE => p3PeerMgr virtual bool getTunnelConnection() = 0; // ONLY used by p3peermgr.cc & p3peers.cc MOVE => p3PeerMgr - + /************* DEPRECIATED FUNCTIONS (TO REMOVE) ********/ +virtual int addFriend(const std::string &ssl_id, bool isVisible) = 0; /******* overloaded from pqiConnectCb *************/ // THESE MUSTn't BE specfied HERE - as overloaded from pqiConnectCb. //virtual void peerStatus(std::string id, const pqiIpAddrSet &addrs, @@ -247,7 +248,7 @@ void tick(); void setFriendVisibility(const std::string &id, bool isVisible); /* add/remove friends */ -int addFriend(const std::string &ssl_id, bool isVisible); +virtual int addFriend(const std::string &ssl_id, bool isVisible); int removeFriend(const std::string &ssl_id); void printPeerLists(std::ostream &out); diff --git a/libretroshare/src/tests/TestNotes.txt b/libretroshare/src/tests/TestNotes.txt index da2ea3e77..5d993d8d1 100644 --- a/libretroshare/src/tests/TestNotes.txt +++ b/libretroshare/src/tests/TestNotes.txt @@ -1,28 +1,39 @@ This file documents the high-level status of the regression cases. ------------------------------------------------------------------------------------- -DIRECTORY STATUS TODO ------------------------------------------------------------------------------------- -services : NO TESTS write test framework for services. -turtle : NO TESTS write tests -rsserver : NO TESTS write tests -upnp : NO TESTS write tests. -util : limited manual tests complete tests, convert to automatic -dbase : limited manual tests complete tests, convert to automatic -pqi : limited manual tests complete tests, convert to automatic -ft : manual tests complete tests, convert to automatic -tcponudp : manual tests convert to automatic -dht : manual tests ignore - old code - to be replaced soon. -serialiser : automatic tests complete tests, update tests. +-----------+----------------------+------------------------------------------------- +DIRECTORY | STATUS | TODO +-----------+----------------------+------------------------------------------------- +services | NO TESTS | write test framework for services. +turtle | NO TESTS | write tests +rsserver | NO TESTS | write tests +upnp | automatic tests | [--S] +pgp | automatic tests | [---] +util | automatic tests | [---] +dbase | automatic tests | [--S] +pqi | automatic tests | [C--] +ft | automatic tests | [-FS] (ftcontrollertest, ftserver2test, fttransfermoduletest) +tcponudp | automatic tests | [-F-] Takes 15 mins. test_tou,bidir_tou,stacks_tou fail +dht | NO TESTS | write tests +serialiser | automatic tests | [-F-] (tlvrandom_test) +-----------+----------------------+------------------------------------------------- -Suggestion to automate all tests -================================ - - * each directory contains multiple executables. - - by default, each executable should perform an automatic test - - each executable should return 0 when passed, !=0 otherwise - - each directory has a script "perform_auto_tests.sh" that calls all programs in the directory +Legend: + [---] : nothing to do. All work perfectly. + [ S] : needs scripts + [ F ] : some tests fail + [C ] : some tests don't compile + [E ] : some test execution fail +Commands: + - to launch tests in a directory: + > \rm *.tstout + > make regress + + - to use parameters: + * create a script [testname].sh where [testname] is the name of the + executable test. It will be used automatically by the above command. + * in the script, use a single command, or if necessary put all commands + on one line using &&. diff --git a/libretroshare/src/tests/general/netsetup_test.cc b/libretroshare/src/tests/general/netsetup_test.cc index 9e87b0216..7fe740dfd 100644 --- a/libretroshare/src/tests/general/netsetup_test.cc +++ b/libretroshare/src/tests/general/netsetup_test.cc @@ -3,7 +3,7 @@ //#include "pqi/p3authmgr.h" #include "util/utest.h" -#include "upnp/upnphandler.h" +#include "upnp/upnphandler_linux.h" #include "dht/opendhtmgr.h" #include "tcponudp/tou.h" diff --git a/libretroshare/src/tests/upnp/upnpforward.cc b/libretroshare/src/tests/upnp/upnpforward.cc index bbfd2fd6a..50394d3f1 100644 --- a/libretroshare/src/tests/upnp/upnpforward.cc +++ b/libretroshare/src/tests/upnp/upnpforward.cc @@ -31,9 +31,11 @@ #include "util/rswin.h" #endif -//#include "util/rsdebug.h" +#include "util/utest.h" #include "upnp/upnphandler_linux.h" +INITTEST() ; + #include void usage(char *name) @@ -104,7 +106,8 @@ int main(int argc, char **argv) /* give it a chance to work its magic. */ sleep(30); - return 1; + FINALREPORT("upnpforward") ; + return TESTRESULT(); }