From: leslie Date: Mon, 11 Aug 2008 09:14:31 +0000 (+0800) Subject: add externalAU testing X-Git-Tag: 0.9.1~41 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=0981e1e0bdbe4cf6f5f110b294eb28052d21c99a;p=sasc-ng.git add externalAU testing --- diff --git a/data.h b/data.h index 3318e4b..8065f91 100644 --- a/data.h +++ b/data.h @@ -354,6 +354,9 @@ public: bool NewKey(int Type, int Id, int Keynr, void *Key, int Keylen); bool NewKeyParse(char *line, const char *reason); void HouseKeeping(void); +#ifdef TESTER + void TestExternalUpdate(void); +#endif }; extern cPlainKeys keys; diff --git a/testing/Makefile b/testing/Makefile index 3f5074b..fe3e178 100644 --- a/testing/Makefile +++ b/testing/Makefile @@ -40,7 +40,7 @@ $(VDRDIR)/%.o: $(VDRDIR)/%.c ### Targets: -all: testECM testEMM testN1Emu testN2Emu testN2RunEmu +all: testECM testEMM testN1Emu testN2Emu testN2RunEmu testTPS testExtAU testECM.o: testECM.c compat.h testECM: testECM.o $(SHAREDOBJS) $(NOBJS) @@ -68,6 +68,10 @@ testTPS.o: testTPS.c ../systems/viaccess/tps.c ../systems/viaccess/st20.c ../sys testTPS: testTPS.o $(SHAREDOBJS) $(NOBJS) $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@ +testExtAU.o: testExtAU.c compat.h +testExtAU: testExtAU.o $(SHAREDOBJS) $(NOBJS) + $(CXX) $(CXXFLAGS) -rdynamic $^ $(LIBS) -o $@ + filterhelper: filterhelper.o $(CXX) $(CXXFLAGS) $^ -o $@ clean: diff --git a/testing/testExtAU.c b/testing/testExtAU.c new file mode 100644 index 0000000..c375d97 --- /dev/null +++ b/testing/testExtAU.c @@ -0,0 +1,34 @@ + +#include +#include + +#define TESTER +#include "data.h" +#include "scsetup.h" +#include "compat.h" + +void cPlainKeys::TestExternalUpdate(void) +{ + Lock(); + Start(); + Unlock(); + while(Active()) { + printf("."); fflush(stdout); + cCondWait::SleepMs(600); + } +} + +int main(int argc, char *argv[]) +{ + if(argc<3) { + printf("usage: %s \n",argv[0]); + return 1; + } + DllsLoad(argv[1]); + InitAll(argv[2]); + LogAll(); + + ScSetup.AutoUpdate=1; + externalAU=argv[3]; + keys.TestExternalUpdate(); +}