diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2015-04-04 09:48:13 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2015-04-04 09:48:13 -0700 |
commit | 4149239b5fe7ea1bcf51392c897a99704a6605d6 (patch) | |
tree | 7cc458ae1f2d5cc4de34542fa2d1f38fbbfc7370 /gr-blocks/python | |
parent | 6afc40e80f05a6cc2dbdebcc037ed40c5f5921f1 (diff) | |
parent | fa02d575de685b26d6ecc010fb029d2187b54771 (diff) |
Merge branch 'maint'
Conflicts:
volk
Diffstat (limited to 'gr-blocks/python')
-rwxr-xr-x | gr-blocks/python/blocks/qa_hier_block2.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gr-blocks/python/blocks/qa_hier_block2.py b/gr-blocks/python/blocks/qa_hier_block2.py index 5a351f2b37..97206a248d 100755 --- a/gr-blocks/python/blocks/qa_hier_block2.py +++ b/gr-blocks/python/blocks/qa_hier_block2.py @@ -2,6 +2,7 @@ from gnuradio import gr, gr_unittest, blocks import numpy +import time class add_ff(gr.sync_block): def __init__(self): @@ -426,5 +427,20 @@ class test_hier_block2(gr_unittest.TestCase): procs = hblock.processor_affinity() self.assertEquals((0,), procs) + def test_lock_unlock(self): + hblock = gr.top_block("test_block") + src = blocks.null_source(gr.sizeof_float) + throttle = blocks.throttle(gr.sizeof_float, 32000) + hier = multiply_const_ff(0.5) + sink = blocks.null_sink(gr.sizeof_float) + hblock.connect(src, throttle, hier, sink) + hblock.set_processor_affinity([0,]) + hblock.start() + time.sleep(1) + hblock.lock() + hblock.unlock() + hblock.stop() + hblock.wait() + if __name__ == "__main__": gr_unittest.run(test_hier_block2, "test_hier_block2.xml") |