moved authgpg fake module to tests folder

fixed ficachetest and fimontest 

makefile update for serialiser for previous revision


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4321 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2011-06-22 21:44:40 +00:00
parent f3fbac7d77
commit f12d2c46bc
10 changed files with 117 additions and 57 deletions

View file

@ -8,10 +8,10 @@ DHT_TOP_DIR = ../../../../libbitdht/src
include $(RS_TOP_DIR)/tests/scripts/config.mk
###############################################################
TESTOBJ = fitest2.o fisavetest.o searchtest.o
TESTOBJ = fitest2.o fisavetest.o searchtest.o #ficachetest.o
#ficachetest.o
TESTS = fitest2 fisavetest searchtest
TESTS = fitest2 fisavetest searchtest #ficachetest
#ficachetest
ifeq ($(OS),Linux)

View file

@ -23,6 +23,7 @@
#include "dbase/cachestrapper.h"
#include "dbase/cachetest.h"
#include "pqi/p3connmgr.h"
#include <iostream>
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
@ -52,9 +53,9 @@ int main(int argc, char **argv)
RsPeerId pid2("0x0102");
RsPeerId pid3("0x0103");
p3ConnectMgr *connMgr1 = NULL;
p3ConnectMgr *connMgr2 = NULL;
p3ConnectMgr *connMgr3 = NULL;
p3ConnectMgr *connMgr1 = new p3ConnectMgr();
p3ConnectMgr *connMgr2 = connMgr1;
p3ConnectMgr *connMgr3 = connMgr1;
CacheStrapper sc1(connMgr1);
CacheStrapper sc2(connMgr2);
@ -72,15 +73,15 @@ int main(int argc, char **argv)
std::string nulldir = "";
CacheSource *csrc1 = new CacheTestSource(&sc1, nulldir);
CacheStore *cstore1 = new CacheTestStore(&ctt1, nulldir);
CacheStore *cstore1 = new CacheTestStore(&ctt1, &sc1, nulldir);
CacheId cid1(TESTID, 0);
CacheSource *csrc2 = new CacheTestSource(&sc2, nulldir);
CacheStore *cstore2 = new CacheTestStore(&ctt2, nulldir);
CacheStore *cstore2 = new CacheTestStore(&ctt2, &sc2, nulldir);
CacheId cid2(TESTID, 0);
CacheSource *csrc3 = new CacheTestSource(&sc3, nulldir);
CacheStore *cstore3 = new CacheTestStore(&ctt3, nulldir);
CacheStore *cstore3 = new CacheTestStore(&ctt3, &sc3, nulldir);
CacheId cid3(TESTID, 0);
CachePair cp1(csrc1, cstore1, cid1);
@ -183,7 +184,7 @@ void handleQuery(CacheStrapper *csp, RsPeerId pid,
std::cerr << "Cache Query from: " << pid << std::endl;
csp -> sendCacheQuery(ids, time(NULL));
//csp -> sendCacheQuery(ids, time(NULL));
for(pit = ids.begin(); pit != ids.end(); pit++)
{
std::cerr << "Cache Query for: " << (*pit) << std::endl;

View file

@ -21,6 +21,9 @@
*
*/
#include "pqi/p3connmgr.h"
#include "retroshare/rsiface.h"
#include "dbase/cachestrapper.h"
#include "dbase/findex.h"
#include "dbase/fimonitor.h"
@ -34,7 +37,12 @@ void usage(char *name)
}
/*!
* What is tested:
* 1.
* 2.
* 3.
*/
int main(int argc, char **argv)
{
/* handle commandline arguments */
@ -73,12 +81,13 @@ int main(int argc, char **argv)
usage(argv[0]);
}
sleep(1);
//p3ConnectMgr connMgr;
NotifyBase nb;
CacheStrapper* cs = NULL;
FileIndexMonitor mon(NULL,NULL, "", "OWN ID");
FileIndexMonitor mon(cs, &nb, "", "OWN ID", std::string("."));
/* setup monitor */
mon.setPeriod(period);
mon.setSharedDirectories(rootdirs);
/* simulate running the thread */