[qmtest] making QMtest grep the Standard Output

Vinod Kumar Singh vsingh at velankani.com
Mon Jun 12 13:45:04 UTC 2006


Hi,

I am using python 2.3.3 on Linux box. But I am not able to find
ValidateOutput() method in command.ExecTestBase class. Do I need to update
my python?

Thanks for input,
Vinod 

-----Original Message-----
From: Stefan Seefeld [mailto:stefan at codesourcery.com] 
Sent: Thursday, June 08, 2006 9:06 PM
To: Sean Kelly
Cc: qmtest at codesourcery.com
Subject: Re: [qmtest] making QMtest grep the Standard Output

Sean Kelly wrote:
> I have a program/script that returns a time stamp in its output.  So the
> Standard Output I put in my test case will never match the actual output.
> Also the output ordering of the strings from the program can sometimes be
> different.
> 
> Is there any way to specify in the Standard output that only certain
strings
> are contained in the actual output?

Not per se. However, the command.ExecTestBase class defines a
ValidateOutput()
method for this purpose. The default implementation simply compares the text
with the expected values for stdout and stderr.
You may be able to subclass from that (or any of its existing subclasses),
providing your own ValidateOutput() method that ignores the irrelevant parts
of the output.

Regards,
		Stefan

-- 
Stefan Seefeld
CodeSourcery
stefan at codesourcery.com
(650) 331-3385 x718





More information about the qmtest mailing list