[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Problems with How to Write a Signal ProcessingBlo
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Problems with How to Write a Signal ProcessingBlock |
Date: |
Tue, 30 Jan 2007 18:14:47 -0800 |
User-agent: |
Mutt/1.5.9i |
On Tue, Jan 30, 2007 at 04:33:53PM -0700, Bahn William L Civ USAFA/DFCS wrote:
> As a test, I went into the howto_square_ff.cc file and changed it so
> that it adds instead of multiplies (so doubles instead of squares). The
> make check still passed without problems. If I introduced a syntax
> error, then it fails - so I am definitely changing the file being used
> in the make process.
>
> This implies that the make check process is not actually invoking the
> qa_howto.py program. That being the case, upon what basis does the
> article claim that the new block works?
OK, I just tried this (including changing * to +).
It worked as expected for me.
This is what I did.
Downloaded
ftp://ftp.gnu.org/gnu/gnuradio/gr-howto-write-a-block-3.0.2.tar.gz to ~/dl
$ mkdir /tmp/test
$ cd /tmp/test
$ tar xzvf ~/dl/gr-howto-write-a-block-3.0.2.tar.gz
$ cd gr-howto-write-a-block-3.0.2
$ ./configure
$ make
$ make check
This worked fine.
Then I edited /tmp/test/gr-howto-write-a-block-3.0.2/src/lib/howto_square_ff.c
and changed the * to a + in line 88.
The, with my current directory set to /tmp/test/gr-howto-write-a-block-3.0.2
$ make
$ make check
And I get output like this (truncated)
Making check in python
make[2]: Entering directory `/tmp/test/gr-howto-write-a-block-3.0.2/src/python'
make check-TESTS
make[3]: Entering directory `/tmp/test/gr-howto-write-a-block-3.0.2/src/python'
F.
======================================================================
FAIL: test_001_square_ff (__main__.qa_howto)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./qa_howto.py", line 44, in test_001_square_ff
self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6)
File "/usr/local/lib64/python2.4/site-packages/gnuradio/gr_unittest.py", line
86, in assertFloatTuplesAlmostEqual
self.assertAlmostEqual (a[i], b[i], places, msg)
AssertionError: 9 != -6.0 within 6 places
----------------------------------------------------------------------
Ran 2 tests in 0.014s
FAILED (failures=1)
FAIL: run_tests
===================
1 of 1 tests failed
===================
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory `/tmp/test/gr-howto-write-a-block-3.0.2/src/python'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/tmp/test/gr-howto-write-a-block-3.0.2/src/python'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/tmp/test/gr-howto-write-a-block-3.0.2/src'
make: *** [check-recursive] Error 1
Looks good to me.
Eric