tsp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tsp-devel] dtest: a distributed test framework


From: Frederik Deweerdt
Subject: Re: [Tsp-devel] dtest: a distributed test framework
Date: Tue, 22 May 2007 11:04:32 +0200
User-agent: mutt-ng/devel-r804 (Linux)

On Mon, May 21, 2007 at 05:00:45PM +0200, Eric Noulard wrote:
> stub.addRunStep("ok",True,"TSP Stub and Stdout Starts")
> stub.addRunStep("runCommand",command=stub_param['path'])
> stub.addRunStep("expectFromCommand",pattern="TSP Provider on
> PID",timeout=global_timeout)
> stub.addRunStep("barrier","provider started",timeout=global_timeout)
> 
> ...
> stdout.addRunStep("barrier","provider started",timeout=global_timeout)
> stdout.addRunStep("runCommand",command=stdout_param['path']+" -u
> rpc://"+stub.host)
> stdout.addRunStep("expectFromCommand",pattern="tsp_stdout_client:
> Using provider URL",timeout=5)
> stdout.addRunStep("barrier","consumer started",timeout=global_timeout)
> 
> afterwards every DTesters which participate to the Distributed test should
> register in the DTestMaster:
> 
> myDTestMaster = dtest.DTestMaster()
> myDTestMaster.register(stdout)
> myDTestMaster.register(stub)
> 
> Then the DTestMaster run the (distributed) test
> 
> myDTestMaster.startTestSequence()
> myDTestMaster.waitTestSequenceEnd()
> 
> 
> This is FAR from complete
> (DTesters are SSH only even on localhost)
> and certainly not as user friendly as it should be
> but it should be sufficient to illustrate the idea.
> 
> Any comment are welcomed.
> 
Well, first, it runs here :). It's really great, specially the
expectFromCommand part. A few things, :
- shouldn't the first argument of addRunStep be a real method instead
of a string? That would may be simplify the code a bit and I don't see
the added value of passing strings around.
- The global timeout should be .. global :), we shouldn't pass it to each
step, stub.globalTimeout=42 should be enough, and passing timeout=0 in
case we want to disable it for a given step.
- AFAIK, the set/get way in python is as described here:
http://tomayko.com/articles/2005/01/20/getters-setters-fuxors
so there's no need for the  "def setCommand(self, command)" style setters
in DTester.py

I realize that this was an early pre-release, but it looks great. I'll
write a tester testing the output of autotest.py :)

Fred
> 
> -- 
> Erk


> _______________________________________________
> Tsp-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/tsp-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]