diff options
author | Tom Rondeau | 2010-10-04 20:18:46 -0400 |
---|---|---|
committer | Tom Rondeau | 2010-10-04 20:18:46 -0400 |
commit | 2652a20330ea1238d561ce799c40833e46d3508c (patch) | |
tree | 18e33f06998841b4d8ea63a1c55374c4728d2f8f | |
parent | 2104a9d1b2c964ec0f710f3209bb4a63cc7ae548 (diff) | |
download | gnuradio-2652a20330ea1238d561ce799c40833e46d3508c.tar.gz gnuradio-2652a20330ea1238d561ce799c40833e46d3508c.tar.bz2 gnuradio-2652a20330ea1238d561ce799c40833e46d3508c.zip |
Updating all of the QA code that I can actually test to work with the new XML output runners.
-rwxr-xr-x | gr-audio-alsa/src/qa_alsa.py | 6 | ||||
-rwxr-xr-x | gr-audio-jack/src/qa_jack.py | 6 | ||||
-rwxr-xr-x | gr-audio-oss/src/qa_oss.py | 6 | ||||
-rwxr-xr-x | gr-audio-portaudio/src/qa_portaudio.py | 6 | ||||
-rwxr-xr-x | gr-cvsd-vocoder/src/python/qa_cvsd_vocoder.py | 6 | ||||
-rwxr-xr-x | gr-gsm-fr-vocoder/src/python/qa_gsm_full_rate.py | 6 | ||||
-rw-r--r-- | gr-howto-write-a-block/lib/test_all.cc | 11 | ||||
-rwxr-xr-x | gr-pager/python/qa_pager.py | 6 | ||||
-rwxr-xr-x | gr-radio-astronomy/src/python/qa_ra.py | 6 | ||||
-rwxr-xr-x | gr-trellis/src/python/qa_trellis.py | 12 | ||||
-rwxr-xr-x | gr-usrp/src/qa_usrp.py | 6 | ||||
-rwxr-xr-x | gr-usrp2/src/qa_usrp2.py | 6 | ||||
-rwxr-xr-x | gr-video-sdl/src/qa_video_sdl.py | 6 |
13 files changed, 45 insertions, 44 deletions
diff --git a/gr-audio-alsa/src/qa_alsa.py b/gr-audio-alsa/src/qa_alsa.py index f2a480a50..52dbfdc7a 100755 --- a/gr-audio-alsa/src/qa_alsa.py +++ b/gr-audio-alsa/src/qa_alsa.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005,2007 Free Software Foundation, Inc. +# Copyright 2005,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import audio_alsa -class qa_alsa (gr_unittest.TestCase): +class test_audio_alsa (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -37,4 +37,4 @@ class qa_alsa (gr_unittest.TestCase): pass if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_audio_alsa, "test_audio_alsa.xml") diff --git a/gr-audio-jack/src/qa_jack.py b/gr-audio-jack/src/qa_jack.py index d8a3aba88..ad6bee27b 100755 --- a/gr-audio-jack/src/qa_jack.py +++ b/gr-audio-jack/src/qa_jack.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005 Free Software Foundation, Inc. +# Copyright 2005,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import audio_jack -class qa_jack (gr_unittest.TestCase): +class test_audio_jack (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -37,4 +37,4 @@ class qa_jack (gr_unittest.TestCase): pass if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_audio_jack, "test_audio_jack.xml") diff --git a/gr-audio-oss/src/qa_oss.py b/gr-audio-oss/src/qa_oss.py index 5427b50ec..365dabc25 100755 --- a/gr-audio-oss/src/qa_oss.py +++ b/gr-audio-oss/src/qa_oss.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005,2007 Free Software Foundation, Inc. +# Copyright 2005,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import audio_oss -class qa_oss (gr_unittest.TestCase): +class test_audio_oss (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -37,4 +37,4 @@ class qa_oss (gr_unittest.TestCase): pass if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_audio_oss, "test_audio_oss.xml") diff --git a/gr-audio-portaudio/src/qa_portaudio.py b/gr-audio-portaudio/src/qa_portaudio.py index f6a54061e..20731f38d 100755 --- a/gr-audio-portaudio/src/qa_portaudio.py +++ b/gr-audio-portaudio/src/qa_portaudio.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005 Free Software Foundation, Inc. +# Copyright 2005,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import audio_portaudio -class qa_portaudio (gr_unittest.TestCase): +class test_audio_portaudio (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -37,4 +37,4 @@ class qa_portaudio (gr_unittest.TestCase): pass if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_audio_portaudio, "test_audio_portaudio.xml") diff --git a/gr-cvsd-vocoder/src/python/qa_cvsd_vocoder.py b/gr-cvsd-vocoder/src/python/qa_cvsd_vocoder.py index 1a39f636e..99a38d946 100755 --- a/gr-cvsd-vocoder/src/python/qa_cvsd_vocoder.py +++ b/gr-cvsd-vocoder/src/python/qa_cvsd_vocoder.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2007 Free Software Foundation, Inc. +# Copyright 2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest, blks2 import cvsd_vocoder -class qa_cvsd_test (gr_unittest.TestCase): +class test_cvsd_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() @@ -112,4 +112,4 @@ class qa_cvsd_test (gr_unittest.TestCase): """ if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_cvsd_vocoder, "test_cvsd_vocoder.xml") diff --git a/gr-gsm-fr-vocoder/src/python/qa_gsm_full_rate.py b/gr-gsm-fr-vocoder/src/python/qa_gsm_full_rate.py index ac5084072..4164a1965 100755 --- a/gr-gsm-fr-vocoder/src/python/qa_gsm_full_rate.py +++ b/gr-gsm-fr-vocoder/src/python/qa_gsm_full_rate.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2007 Free Software Foundation, Inc. +# Copyright 2004,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import gsm_full_rate -class qa_howto (gr_unittest.TestCase): +class test_gsm_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -32,4 +32,4 @@ class qa_howto (gr_unittest.TestCase): self.tb = None if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_gsm_vocoder, "test_gsm_vocoder.xml") diff --git a/gr-howto-write-a-block/lib/test_all.cc b/gr-howto-write-a-block/lib/test_all.cc index 192c537bc..ac1e83839 100644 --- a/gr-howto-write-a-block/lib/test_all.cc +++ b/gr-howto-write-a-block/lib/test_all.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2009 Free Software Foundation, Inc. + * Copyright 2009,2010 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -21,16 +21,23 @@ */ #include <cppunit/TextTestRunner.h> +#include <cppunit/XmlOutputter.h> +#include <gr_unittests.h> #include <qa_howto.h> int main (int argc, char **argv) { - + char path[200]; + get_unittest_path ("gr_howto_write_a_block.xml", path, 200); + CppUnit::TextTestRunner runner; + std::ofstream xmlfile(path); + CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile); runner.addTest(qa_howto::suite ()); + runner.setOutputter(xmlout); bool was_successful = runner.run("", false); diff --git a/gr-pager/python/qa_pager.py b/gr-pager/python/qa_pager.py index 5bf72b561..12a45d4c3 100755 --- a/gr-pager/python/qa_pager.py +++ b/gr-pager/python/qa_pager.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2006 Free Software Foundation, Inc. +# Copyright 2004,2006,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import pager_swig -class qa_pgr(gr_unittest.TestCase): +class test_pager(gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -32,4 +32,4 @@ class qa_pgr(gr_unittest.TestCase): self.tb = None if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_pager, "test_pager.xml") diff --git a/gr-radio-astronomy/src/python/qa_ra.py b/gr-radio-astronomy/src/python/qa_ra.py index 1c44e23ad..2cb0f42be 100755 --- a/gr-radio-astronomy/src/python/qa_ra.py +++ b/gr-radio-astronomy/src/python/qa_ra.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2006 Free Software Foundation, Inc. +# Copyright 2004,2006,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import ra -class qa_ra (gr_unittest.TestCase): +class test_radio_astronomy (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -35,4 +35,4 @@ class qa_ra (gr_unittest.TestCase): pass if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_radio_astronomy, "test_radio_astronomy.xml") diff --git a/gr-trellis/src/python/qa_trellis.py b/gr-trellis/src/python/qa_trellis.py index 306bf994d..cfeefea06 100755 --- a/gr-trellis/src/python/qa_trellis.py +++ b/gr-trellis/src/python/qa_trellis.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004 Free Software Foundation, Inc. +# Copyright 2004,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import trellis -class qa_trellis (gr_unittest.TestCase): +class test_trellis (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -68,11 +68,5 @@ class qa_trellis (gr_unittest.TestCase): i = trellis.interleaver(K,IN) self.assertEqual((K,IN,DIN),(i.K(),i.INTER(),i.DEINTER())) - - - - - - if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_trellis, "test_trellis.xml") diff --git a/gr-usrp/src/qa_usrp.py b/gr-usrp/src/qa_usrp.py index db2d32624..06e630330 100755 --- a/gr-usrp/src/qa_usrp.py +++ b/gr-usrp/src/qa_usrp.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005 Free Software Foundation, Inc. +# Copyright 2005,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import usrp_swig -class qa_usrp (gr_unittest.TestCase): +class test_usrp (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -37,4 +37,4 @@ class qa_usrp (gr_unittest.TestCase): pass if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_usrp, "test_usrp.xml") diff --git a/gr-usrp2/src/qa_usrp2.py b/gr-usrp2/src/qa_usrp2.py index bc6664a1b..cc994b1e9 100755 --- a/gr-usrp2/src/qa_usrp2.py +++ b/gr-usrp2/src/qa_usrp2.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005,2008 Free Software Foundation, Inc. +# Copyright 2005,2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import usrp2 -class qa_usrp2(gr_unittest.TestCase): +class test_usrp2(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() @@ -37,4 +37,4 @@ class qa_usrp2(gr_unittest.TestCase): pass if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_usrp2, "test_usrp2.xml") diff --git a/gr-video-sdl/src/qa_video_sdl.py b/gr-video-sdl/src/qa_video_sdl.py index 98da85f6b..8f82a60b1 100755 --- a/gr-video-sdl/src/qa_video_sdl.py +++ b/gr-video-sdl/src/qa_video_sdl.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2006 Free Software Foundation, Inc. +# Copyright 2006,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import video_sdl -class qa_video_sdl (gr_unittest.TestCase): +class test_video_sdl (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -37,4 +37,4 @@ class qa_video_sdl (gr_unittest.TestCase): pass if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_video_sdl, "test_video_sdl.xml") |