- make addFriend a virtual (pure) function of the abstract p3LinkMgr class. Useful for testing.

- updated test notes.
- patched netsetup_test and upnpforward to run correctly.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6051 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-12-27 21:18:16 +00:00
parent b2214fcd46
commit 24a40fc665
4 changed files with 41 additions and 26 deletions

View File

@ -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);

View File

@ -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 &&.

View File

@ -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"

View File

@ -31,9 +31,11 @@
#include "util/rswin.h"
#endif
//#include "util/rsdebug.h"
#include "util/utest.h"
#include "upnp/upnphandler_linux.h"
INITTEST() ;
#include <sstream>
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();
}