[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 42/46: zeromq: fixing up QA code for vlen
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 42/46: zeromq: fixing up QA code for vlen |
Date: |
Fri, 16 May 2014 19:37:17 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 361a144527287f7c2c9c52d70c6914c182ba5d91
Author: Johnathan Corgan <address@hidden>
Date: Tue May 13 11:39:15 2014 -0700
zeromq: fixing up QA code for vlen
---
gr-zeromq/python/zeromq/qa_zeromq_pub.py | 14 +++++++-------
gr-zeromq/python/zeromq/qa_zeromq_pushpull.py | 12 ++++++------
gr-zeromq/python/zeromq/qa_zeromq_reqrep.py | 14 +++++++-------
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pub.py
b/gr-zeromq/python/zeromq/qa_zeromq_pub.py
index 4277cc0..8a4d491 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_pub.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pub.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright 202013 Free Software Foundation, Inc.
+# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -34,15 +34,15 @@ class qa_zeromq_pub (gr_unittest.TestCase):
self.tb = None
def test_001 (self):
- print "test_001"
- src_data = [1,2,3,4,5,6,7,8,9,0]*100
- src = blocks.vector_source_f(src_data, False, 1)
- zeromq_pub_sink = zeromq.pub_sink(gr.sizeof_float, 10 ,
"tcp://127.0.0.1:5555")
+ vlen = 10
+ self.rx_data = None
+ src_data = range(vlen)*100
+ src = blocks.vector_source_f(src_data, False, vlen)
+ zeromq_pub_sink = zeromq.pub_sink(gr.sizeof_float, vlen,
"tcp://127.0.0.1:5555")
self.tb.connect(src, zeromq_pub_sink)
self.probe_manager = zeromq.probe_manager()
self.probe_manager.add_socket("tcp://127.0.0.1:5555", 'float32',
self.recv_data)
- self.tb.run ()
- print self.rx_data
+ self.tb.run()
self.assertEqual(self.rx_data, src_data)
def recv_data (self, data):
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
b/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
index dd4cb44..56f0cb6 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
@@ -31,12 +31,12 @@ class qa_zeromq_pushpull (gr_unittest.TestCase):
self.tb = None
def test_001 (self):
- print "test_001"
- src_data = [1,2,3,4,5,6,7,8,9,0]*100
- src = blocks.vector_source_c(src_data, False, 1)
- zeromq_push_sink = zeromq.push_sink(gr.sizeof_gr_complex, 10,
"tcp://127.0.0.1:5555")
- zeromq_pull_source = zeromq.pull_source(gr.sizeof_gr_complex, 10,
"tcp://127.0.0.1:5555", 0)
- sink = blocks.vector_sink_c()
+ vlen = 10
+ src_data = range(vlen)*100
+ src = blocks.vector_source_f(src_data, False, vlen)
+ zeromq_push_sink = zeromq.push_sink(gr.sizeof_float, vlen,
"tcp://127.0.0.1:5555")
+ zeromq_pull_source = zeromq.pull_source(gr.sizeof_float, vlen,
"tcp://127.0.0.1:5555", 0)
+ sink = blocks.vector_sink_f(vlen)
self.tb.connect(src, zeromq_push_sink)
self.tb.connect(zeromq_pull_source, sink)
self.tb.run ()
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
b/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
index e6d20fc..337f285 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright 202013 Free Software Foundation, Inc.
+# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -34,12 +34,12 @@ class qa_zeromq_reqrep (gr_unittest.TestCase):
self.tb = None
def test_001 (self):
- print "test_001"
- src_data = [1,2,3,4,5,6,7,8,9,0]*100
- src = blocks.vector_source_c(src_data, False, 1)
- zeromq_rep_sink = zeromq.rep_sink(gr.sizeof_gr_complex, 10,
"tcp://127.0.0.1:5555", 0)
- zeromq_req_source = zeromq.req_source(gr.sizeof_gr_complex, 10,
"tcp://127.0.0.1:5555", 0)
- sink = blocks.vector_sink_c()
+ vlen = 10
+ src_data = range(vlen)*100
+ src = blocks.vector_source_f(src_data, False, vlen)
+ zeromq_rep_sink = zeromq.rep_sink(gr.sizeof_float, vlen,
"tcp://127.0.0.1:5555", 0)
+ zeromq_req_source = zeromq.req_source(gr.sizeof_float, vlen,
"tcp://127.0.0.1:5555", 0)
+ sink = blocks.vector_sink_f(vlen)
self.tb.connect(src, zeromq_rep_sink)
self.tb.connect(zeromq_req_source, sink)
self.tb.run ()
- [Commit-gnuradio] [gnuradio] 38/46: zeromq: Don't call context close as it is not available in zmq 2, (continued)
- [Commit-gnuradio] [gnuradio] 38/46: zeromq: Don't call context close as it is not available in zmq 2, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 37/46: zeromq: Change the value of the poll timeout according to the zmq version. Must be in microseconds for version 2 and below and in milliseconds for version 3 and above., git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 35/46: zeromq: Add qa code, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 36/46: zeromq: Change string of test name, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 02/46: zeromq: initial surgery to add to master build, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 46/46: Merge branch 'zeromq', git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 40/46: zeromq: Remove blocking Add timeout in xml, fix doxygen, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 39/46: Add sub_source block and fix pub_sink, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 44/46: zeromq: updates to qa code to wait for completion and pass., git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 45/46: zeromq: add missing vlen parameter in ports, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 42/46: zeromq: fixing up QA code for vlen,
git <=
- [Commit-gnuradio] [gnuradio] 43/46: zeromq: update examples and install, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 41/46: zeromq: temporarily removing QA test output to XML, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 23/46: zeromq: cleanup docs and examples, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 01/46: Initial import of gr-zmqblocks OOT project as-is, prior to rework for in-tree, git, 2014/05/16