Hello,
I generated a simple file sink block along with qa python tests. When I ran
the test cases, I noticed that the test tool runs the test twice. Code is
small enough that I am taking the liberty of posting it here:
class qa_capture_sink (gr_unittest.TestCase):
def setUp (self):
self.tb = gr.top_block ()
self.u =
blocks.file_source(gr.sizeof_float,"/tmp/testdata.bin",False)
self.throttle =
blocks.throttle(itemsize=gr.sizeof_float,samples_per_sec=1000)
self.tb.connect(self.u,self.throttle)
print "Create capture sink"
sqr = capture.capture_sink(itemsize=gr.sizeof_float, chunksize =
500, capture_dir="/tmp")
self.tb.connect(self.throttle,sqr)
def tearDown (self):
self.tb = None
def test_001_t (self):
self.tb.run ()
# check data TBD
if __name__ == '__main__':
gr_unittest.run(qa_capture_sink, "qa_capture_sink.xml")
When I ran ctest -V , I noticed that the "Create capture sink" was being
called twice.
I would like for the test to run precisely once. Is gr_unittest set up with
a parameter indicating how many times the test case should run? I looked
around for documentation?
Thank you in advance for your help.
Regards,
Ranga.
--
M. Ranganathan
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio