From 2104a9d1b2c964ec0f710f3209bb4a63cc7ae548 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 3 Oct 2010 16:56:57 -0400 Subject: [PATCH] Updating all python QA programs in gnuradio-core to output XML files. Also fixed gr_unittest.py to print to the screen and fail make check properly if there's an error. Need to find a way to use XML runner with main() to fail make check and output to screen, too. --- .../src/python/gnuradio/gr/qa_add_and_friends.py | 6 +++--- .../src/python/gnuradio/gr/qa_add_v_and_friends.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_agc.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_argmax.py | 6 +++--- .../src/python/gnuradio/gr/qa_bin_statistics.py | 4 ++-- .../src/python/gnuradio/gr/qa_boolean_operators.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_classify.py | 7 +++---- .../src/python/gnuradio/gr/qa_cma_equalizer.py | 4 ++-- .../src/python/gnuradio/gr/qa_complex_to_xxx.py | 4 ++-- .../gnuradio/gr/qa_constellation_decoder_cb.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_copy.py | 4 ++-- .../python/gnuradio/gr/qa_correlate_access_code.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_delay.py | 4 ++-- .../src/python/gnuradio/gr/qa_diff_encoder.py | 6 +++--- .../src/python/gnuradio/gr/qa_diff_phasor_cc.py | 6 +++--- .../src/python/gnuradio/gr/qa_ecc_ccsds_27.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_feval.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_fft.py | 6 +++--- .../src/python/gnuradio/gr/qa_fft_filter.py | 4 ++-- .../src/python/gnuradio/gr/qa_filter_delay_fc.py | 6 +++--- .../python/gnuradio/gr/qa_fractional_interpolator.py | 5 ++--- .../src/python/gnuradio/gr/qa_frequency_modulator.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.py | 4 ++-- .../src/python/gnuradio/gr/qa_glfsr_source.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_head.py | 4 ++-- .../src/python/gnuradio/gr/qa_hier_block2.py | 2 +- gnuradio-core/src/python/gnuradio/gr/qa_hilbert.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_iir.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_integrate.py | 4 ++-- .../src/python/gnuradio/gr/qa_interleave.py | 4 ++-- .../src/python/gnuradio/gr/qa_interp_fir_filter.py | 4 ++-- .../src/python/gnuradio/gr/qa_kludge_copy.py | 4 ++-- .../src/python/gnuradio/gr/qa_kludged_imports.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_max.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_message.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_mute.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_noise.py | 4 ++-- .../python/gnuradio/gr/qa_ofdm_insert_preamble.py | 6 +++--- .../src/python/gnuradio/gr/qa_packed_to_unpacked.py | 4 ++-- .../src/python/gnuradio/gr/qa_pipe_fittings.py | 4 ++-- .../src/python/gnuradio/gr/qa_pll_carriertracking.py | 6 +++--- .../src/python/gnuradio/gr/qa_pll_freqdet.py | 6 +++--- .../src/python/gnuradio/gr/qa_pll_refout.py | 6 +++--- .../src/python/gnuradio/gr/qa_pn_correlator_cc.py | 4 ++-- .../src/python/gnuradio/gr/qa_rational_resampler.py | 4 ++-- .../src/python/gnuradio/gr/qa_regenerate.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_repeat.py | 4 ++-- gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py | 4 ++-- .../src/python/gnuradio/gr/qa_sig_source.py | 4 ++-- .../src/python/gnuradio/gr/qa_single_pole_iir.py | 4 ++-- .../src/python/gnuradio/gr/qa_single_pole_iir_cc.py | 4 ++-- .../src/python/gnuradio/gr/qa_stream_mux.py | 6 +++--- .../src/python/gnuradio/gr/qa_udp_sink_source.py | 4 ++-- .../src/python/gnuradio/gr/qa_unpack_k_bits.py | 4 ++-- .../src/python/gnuradio/gr/qa_vector_sink_source.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py | 6 +++--- gnuradio-core/src/python/gnuradio/gr_unittest.py | 12 ++++++++++-- 59 files changed, 148 insertions(+), 142 deletions(-) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py b/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py index 2fa97fad..8fb70fb3 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.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 # @@ -22,7 +22,7 @@ from gnuradio import gr, gr_unittest -class test_head (gr_unittest.TestCase): +class test_add_and_friends (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -126,4 +126,4 @@ class test_head (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_add_and_friends, "test_add_and_friends.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_add_v_and_friends.py b/gnuradio-core/src/python/gnuradio/gr/qa_add_v_and_friends.py index 215e0cac..90056e09 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_add_v_and_friends.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_add_v_and_friends.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 # @@ -350,4 +350,4 @@ class test_add_v_and_friends(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_add_v_and_friends, "test_add_v_and_friends.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_agc.py b/gnuradio-core/src/python/gnuradio/gr/qa_agc.py index bb3ddb11..c55d191e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_agc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_agc.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 # @@ -25,7 +25,7 @@ import math test_output = False -class test_sig_source (gr_unittest.TestCase): +class test_agc (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -430,4 +430,4 @@ class test_sig_source (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_agc, "test_agc.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_argmax.py b/gnuradio-core/src/python/gnuradio/gr/qa_argmax.py index 2e16d879..a9db3295 100644 --- a/gnuradio-core/src/python/gnuradio/gr/qa_argmax.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_argmax.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 # @@ -24,7 +24,7 @@ from gnuradio import gr, gr_unittest import math -class test_sig_source (gr_unittest.TestCase): +class test_arg_max (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -73,5 +73,5 @@ class test_sig_source (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_arg_max, "test_arg_max.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py b/gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py index 29b9796c..b8b718a0 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2006,2007 Free Software Foundation, Inc. +# Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -227,4 +227,4 @@ class xtest_bin_statistics(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(xtest_bin_statistics, "test_bin_statistics.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_boolean_operators.py b/gnuradio-core/src/python/gnuradio/gr/qa_boolean_operators.py index ee9bae65..8cfb6009 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_boolean_operators.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_boolean_operators.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2007,2008 Free Software Foundation, Inc. +# Copyright 2004,2007,2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -22,7 +22,7 @@ from gnuradio import gr, gr_unittest -class test_head (gr_unittest.TestCase): +class test_boolean_operators (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -159,4 +159,4 @@ class test_head (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_boolean_operators, "test_boolean_operators.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_classify.py b/gnuradio-core/src/python/gnuradio/gr/qa_classify.py index ac17aff2..ac5b53b5 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_classify.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_classify.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -38,7 +38,7 @@ def np2(k): return m -class qa_classify(gr_unittest.TestCase): +class test_classify(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() @@ -178,5 +178,4 @@ class qa_classify(gr_unittest.TestCase): assert sum < 1e-6 if __name__ == '__main__': - gr_unittest.main() - + gr_unittest.run(test_classify, "test_classify.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_cma_equalizer.py b/gnuradio-core/src/python/gnuradio/gr/qa_cma_equalizer.py index b1ab8f54..79e9cd09 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_cma_equalizer.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_cma_equalizer.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2006,2007 Free Software Foundation, Inc. +# Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -46,4 +46,4 @@ class test_cma_equalizer_fir(gr_unittest.TestCase): self.assertComplexTuplesAlmostEqual(expected_data, result) if __name__ == "__main__": - gr_unittest.main() \ No newline at end of file + gr_unittest.run(test_cma_equalizer_fir, "test_cma_equalizer_fir.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_complex_to_xxx.py b/gnuradio-core/src/python/gnuradio/gr/qa_complex_to_xxx.py index 10f36687..76627247 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_complex_to_xxx.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_complex_to_xxx.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 # @@ -138,5 +138,5 @@ class test_complex_ops (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_complex_ops, "test_complex_ops.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_constellation_decoder_cb.py b/gnuradio-core/src/python/gnuradio/gr/qa_constellation_decoder_cb.py index 13d2840a..27e1802e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_constellation_decoder_cb.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_constellation_decoder_cb.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 math -class test_head (gr_unittest.TestCase): +class test_constellation_decoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -49,5 +49,5 @@ class test_head (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_constellation_decoder, "test_constellation_decoder.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_copy.py b/gnuradio-core/src/python/gnuradio/gr/qa_copy.py index 7f9f72a7..e8ee480c 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_copy.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_copy.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2009 Free Software Foundation, Inc. +# Copyright 2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -55,4 +55,4 @@ class test_copy(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_copy, "test_copy.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_correlate_access_code.py b/gnuradio-core/src/python/gnuradio/gr/qa_correlate_access_code.py index a436c6ad..b3575f4e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_correlate_access_code.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_correlate_access_code.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2006,2007 Free Software Foundation, Inc. +# Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -79,5 +79,5 @@ class test_correlate_access_code(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_correlate_access_code, "test_correlate_access_code.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_delay.py b/gnuradio-core/src/python/gnuradio/gr/qa_delay.py index 8835cba5..7cad0ae7 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_delay.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_delay.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 # @@ -62,4 +62,4 @@ class test_delay (gr_unittest.TestCase): self.assertEqual (expected_result, dst_data) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_delay, "test_delay.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py b/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py index 04c0e2a4..97e9e329 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2006,2007 Free Software Foundation, Inc. +# Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -31,7 +31,7 @@ def make_random_int_tuple(L, min, max): return tuple(result) -class test_encoder (gr_unittest.TestCase): +class test_diff_encoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -82,5 +82,5 @@ class test_encoder (gr_unittest.TestCase): self.assertEqual(expected_result, actual_result) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_diff_encoder, "test_diff_encoder.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_diff_phasor_cc.py b/gnuradio-core/src/python/gnuradio/gr/qa_diff_phasor_cc.py index 385ffa51..5ac115e2 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_diff_phasor_cc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_diff_phasor_cc.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 math -class test_complex_ops (gr_unittest.TestCase): +class test_diff_phasor (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -46,5 +46,5 @@ class test_complex_ops (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_diff_phasor, "test_diff_phasor.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py b/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py index b0dc4706..caf3959f 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.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 # @@ -47,4 +47,4 @@ class test_ccsds_27 (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_ccsds_27, "test_ccsds_27.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_feval.py b/gnuradio-core/src/python/gnuradio/gr/qa_feval.py index 64bbe45c..a9140953 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_feval.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_feval.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2006,2007 Free Software Foundation, Inc. +# Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -107,4 +107,4 @@ class test_feval(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_feval, "test_feval.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fft.py b/gnuradio-core/src/python/gnuradio/gr/qa_fft.py index 412c4c48..98d80fbb 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fft.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fft.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -29,7 +29,7 @@ primes = (2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53, 227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311) -class test_fft_filter(gr_unittest.TestCase): +class test_fft(gr_unittest.TestCase): def setUp(self): pass @@ -154,5 +154,5 @@ class test_fft_filter(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_fft, "test_fft.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py b/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py index d4106ee4..b3124ad2 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2005,2007 Free Software Foundation, Inc. +# Copyright 2004,2005,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -275,5 +275,5 @@ class test_fft_filter(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_fft_filter, "test_fft_filter.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_filter_delay_fc.py b/gnuradio-core/src/python/gnuradio/gr/qa_filter_delay_fc.py index b92f143d..a25c65e5 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_filter_delay_fc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_filter_delay_fc.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 math -class qa_filter_delay_fc (gr_unittest.TestCase): +class test_filter_delay_fc (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -314,4 +314,4 @@ class qa_filter_delay_fc (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_filter_delay_fc, "test_filter_delay_fc.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py b/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py index 4466e8aa..c9ba5416 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.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 # @@ -35,5 +35,4 @@ class test_fractional_resampler (gr_unittest.TestCase): op2 = gr.fractional_interpolator_cc(0.0, 1.0) if __name__ == '__main__': - gr_unittest.main() - + gr_unittest.run(test_fractional_resampler, "test_fractional_resampler.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.py b/gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.py index 53d1a89b..829185c3 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.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 # @@ -52,5 +52,5 @@ class test_frequency_modulator (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_frequency_modulator, "test_frequency_modulator.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.py b/gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.py index b506e3ed..429e57c3 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.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 # @@ -71,5 +71,5 @@ class test_bytes_to_syms (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_bytes_to_syms, "test_bytes_to_syms.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py index fc211657..1665d9dd 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.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 # @@ -91,4 +91,4 @@ def auto_correlate(data): return R if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_glfsr_source, "test_glfsr_source.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py b/gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py index d5dc595c..dcb3d867 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2006,2007 Free Software Foundation, Inc. +# Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -61,4 +61,4 @@ class test_goertzel(gr_unittest.TestCase): self.assertAlmostEqual(expected_result, actual_result, places=4) if __name__ == '__main__': - gr_unittest.main() + gr_unittest.run(test_goertzel, "test_goertzel.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_head.py b/gnuradio-core/src/python/gnuradio/gr/qa_head.py index b7a60597..aae233b5 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_head.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_head.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 # @@ -44,4 +44,4 @@ class test_head (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_head, "test_head.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py b/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py index cc336a4d..924a0fb5 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py @@ -366,4 +366,4 @@ class test_hier_block2(gr_unittest.TestCase): if __name__ == "__main__": - gr_unittest.main() + gr_unittest.run(test_hier_block2, "test_hier_block2.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_hilbert.py b/gnuradio-core/src/python/gnuradio/gr/qa_hilbert.py index 817ba940..2235f28b 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_hilbert.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_hilbert.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 math -class test_sig_source (gr_unittest.TestCase): +class test_hilbert (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -113,4 +113,4 @@ class test_sig_source (gr_unittest.TestCase): self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 5) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_hilbert, "test_hilbert.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_iir.py b/gnuradio-core/src/python/gnuradio/gr/qa_iir.py index 83328507..0e522c16 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_iir.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_iir.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 # @@ -155,5 +155,5 @@ class test_iir (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_iir, "test_iir.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_integrate.py b/gnuradio-core/src/python/gnuradio/gr/qa_integrate.py index fbd601e3..501a89f8 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_integrate.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_integrate.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -72,4 +72,4 @@ class test_integrate (gr_unittest.TestCase): self.assertComplexTuplesAlmostEqual(dst_data, dst.data(), 6) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_integrate, "test_integrate.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_interleave.py b/gnuradio-core/src/python/gnuradio/gr/qa_interleave.py index 3e0b6c5f..1320d0ec 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_interleave.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_interleave.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 # @@ -77,5 +77,5 @@ class test_interleave (gr_unittest.TestCase): self.assertFloatTuplesAlmostEqual (expected_result3, dst3.data ()) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_interleave, "test_interleave.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_interp_fir_filter.py b/gnuradio-core/src/python/gnuradio/gr/qa_interp_fir_filter.py index ea326ce4..9901b71b 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_interp_fir_filter.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_interp_fir_filter.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 # @@ -50,5 +50,5 @@ class test_interp_fir_filter (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_interp_fir_filter, "test_interp_fir_filter.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_kludge_copy.py b/gnuradio-core/src/python/gnuradio/gr/qa_kludge_copy.py index cc25d180..2f0bbe33 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_kludge_copy.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_kludge_copy.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 # @@ -87,5 +87,5 @@ class test_kludge_copy(gr_unittest.TestCase): self.assertRaises(ValueError, self.tb.run) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_kludge_copy, "test_kludge_copy.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py b/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py index 91ddf7cd..7d29a950 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.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 # @@ -22,7 +22,7 @@ from gnuradio import gr, gr_unittest -class test_head (gr_unittest.TestCase): +class test_kludged_imports (gr_unittest.TestCase): def setUp(self): pass @@ -40,4 +40,4 @@ class test_head (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_kludged_imports, "test_kludged_imports.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_max.py b/gnuradio-core/src/python/gnuradio/gr/qa_max.py index 0171c93d..5aa23162 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_max.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_max.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 # @@ -24,7 +24,7 @@ from gnuradio import gr, gr_unittest import math -class test_sig_source (gr_unittest.TestCase): +class test_max (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -66,5 +66,5 @@ class test_sig_source (gr_unittest.TestCase): self.assertEqual(expected_result, result_data) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_max, "test_max.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_message.py b/gnuradio-core/src/python/gnuradio/gr/qa_message.py index cb6c4c33..e7f2778d 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_message.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_message.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 # @@ -128,4 +128,4 @@ class test_message (gr_unittest.TestCase): self.assertEquals(tuple(map(ord, '0123456789')), dst.data()) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_message, "test_message.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_mute.py b/gnuradio-core/src/python/gnuradio/gr/qa_mute.py index 646f495c..58c5062a 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_mute.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_mute.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2005,2007 Free Software Foundation, Inc. +# Copyright 2004,2005,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -22,7 +22,7 @@ from gnuradio import gr, gr_unittest -class test_head (gr_unittest.TestCase): +class test_mute (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -86,4 +86,4 @@ class test_head (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_mute, "test_mute.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py b/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py index 4dca67b2..5a2e6a0d 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.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 # @@ -22,7 +22,7 @@ from gnuradio import gr, gr_unittest -class test_single_pole_iir(gr_unittest.TestCase): +class test_nlog10(gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -43,5 +43,5 @@ class test_single_pole_iir(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_nlog10, "test_nlog10.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_noise.py b/gnuradio-core/src/python/gnuradio/gr/qa_noise.py index f8ed739a..4a575f5d 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_noise.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_noise.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 # @@ -35,5 +35,5 @@ class test_noise_source(gr_unittest.TestCase): op = gr.noise_source_f(gr.GR_GAUSSIAN, 10, 10) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_noise_source, "test_noise_source.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_ofdm_insert_preamble.py b/gnuradio-core/src/python/gnuradio/gr/qa_ofdm_insert_preamble.py index d45560d3..d69f5ca5 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_ofdm_insert_preamble.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_ofdm_insert_preamble.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 from pprint import pprint -class testing (gr_unittest.TestCase): +class test_ofdm_insert_preamble (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -176,4 +176,4 @@ class testing (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_ofdm_insert_preamble, "test_ofdm_insert_preamble.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_packed_to_unpacked.py b/gnuradio-core/src/python/gnuradio/gr/qa_packed_to_unpacked.py index b1b3a971..8833f755 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_packed_to_unpacked.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_packed_to_unpacked.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 # @@ -401,5 +401,5 @@ class test_packing(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_packing, "test_packing.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pipe_fittings.py b/gnuradio-core/src/python/gnuradio/gr/qa_pipe_fittings.py index 533f4f05..a6683c5c 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pipe_fittings.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pipe_fittings.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 # @@ -139,5 +139,5 @@ class test_pipe_fittings(gr_unittest.TestCase): self.assertEqual(expected_results, dst.data()) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_pipe_fittings, "test_pipe_fittings.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pll_carriertracking.py b/gnuradio-core/src/python/gnuradio/gr/qa_pll_carriertracking.py index 4a109663..8e4a0eef 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pll_carriertracking.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pll_carriertracking.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 math -class test_sig_source (gr_unittest.TestCase): +class test_pll_carriertracking (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() @@ -155,4 +155,4 @@ class test_sig_source (gr_unittest.TestCase): self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 5) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_pll_carriertracking, "test_pll_carriertracking.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pll_freqdet.py b/gnuradio-core/src/python/gnuradio/gr/qa_pll_freqdet.py index ac9c1844..5225a9a3 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pll_freqdet.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pll_freqdet.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 math -class test_sig_source (gr_unittest.TestCase): +class test_pll_freqdet (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() @@ -158,4 +158,4 @@ class test_sig_source (gr_unittest.TestCase): self.assertFloatTuplesAlmostEqual (expected_result, dst_data, 3) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_pll_freqdet, "test_pll_freqdet.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pll_refout.py b/gnuradio-core/src/python/gnuradio/gr/qa_pll_refout.py index 9cafa61e..c40a885a 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pll_refout.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pll_refout.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 math -class test_sig_source (gr_unittest.TestCase): +class test_pll_refout (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() @@ -155,4 +155,4 @@ class test_sig_source (gr_unittest.TestCase): self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 5) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_pll_refout, "test_pll_refout.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py b/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py index 01d01bde..fbdabb4c 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.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 # @@ -47,4 +47,4 @@ class test_pn_correlator_cc(gr_unittest.TestCase): self.assertEqual(data[-1], (1.0+0j)) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_pn_correlator_cc, "test_pn_correlator_cc.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py b/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py index f8bf4b12..3bd6160d 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005,2006,2007 Free Software Foundation, Inc. +# Copyright 2005,2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -294,5 +294,5 @@ class test_rational_resampler (gr_unittest.TestCase): if __name__ == '__main__': pass # FIXME: Disabled, see ticket:210 - # gr_unittest.main() + # gr_unittest.run(test_rational_resampler, "test_rational_resampler.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py b/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py index 64e75118..32ecc377 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.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 import math -class test_sig_source (gr_unittest.TestCase): +class test_regenerate (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -87,4 +87,4 @@ class test_sig_source (gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_regenerate, "test_regenerate.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_repeat.py b/gnuradio-core/src/python/gnuradio/gr/qa_repeat.py index 1ecc7ead..2b142998 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_repeat.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_repeat.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -45,4 +45,4 @@ class test_repeat (gr_unittest.TestCase): self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_repeat, "test_repeat.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py b/gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py index aecf4929..241d8ec2 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -61,4 +61,4 @@ class test_scrambler(gr_unittest.TestCase): self.assertEqual(src_data, dst.data()) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_scrambler, "test_scrambler.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_sig_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_sig_source.py index 058890c4..4bb58038 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_sig_source.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_sig_source.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 # @@ -154,4 +154,4 @@ class test_sig_source (gr_unittest.TestCase): self.assertFloatTuplesAlmostEqual (expected_result, dst_data, 5) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_sig_source, "test_sig_source.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir.py b/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir.py index 8ad0a9bb..1d2e6595 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir.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 # @@ -68,5 +68,5 @@ class test_single_pole_iir(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_single_pole_iir, "test_single_pole_iir.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir_cc.py b/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir_cc.py index 865c7c90..47b4948b 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir_cc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir_cc.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005,2006,2007 Free Software Foundation, Inc. +# Copyright 2005,2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -68,5 +68,5 @@ class test_single_pole_iir_cc(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_single_pole_iir_cc, "test_single_pole_iir_cc.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_stream_mux.py b/gnuradio-core/src/python/gnuradio/gr/qa_stream_mux.py index 8a76f814..7d6ddf81 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_stream_mux.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_stream_mux.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2005,2007 Free Software Foundation, Inc. +# Copyright 2004,2005,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -22,7 +22,7 @@ from gnuradio import gr, gr_unittest -class test_head (gr_unittest.TestCase): +class test_stream_mux (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -165,4 +165,4 @@ class test_head (gr_unittest.TestCase): self.assertEqual (exp_data, result_data) if __name__ == '__main__': - gr_unittest.main() + gr_unittest.run(test_stream_mux, "test_stream_mux.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_udp_sink_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_udp_sink_source.py index b00b26bb..097e394c 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_udp_sink_source.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_udp_sink_source.py @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest from threading import Timer -class test_sink_source(gr_unittest.TestCase): +class test_udp_sink_source(gr_unittest.TestCase): def setUp(self): self.tb_snd = gr.top_block() @@ -95,5 +95,5 @@ class test_sink_source(gr_unittest.TestCase): #print "tb_rcv stopped by Timer" if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_udp_sink_source, "test_udp_sink_source.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py b/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py index edb263ad..d1faf9d9 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.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 # @@ -53,5 +53,5 @@ class test_unpack(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_unpack, "test_unpack.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py index 149c6690..5d8d85c7 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ from gnuradio import gr, gr_unittest import math -class test_sink_source(gr_unittest.TestCase): +class test_vector_sink_source(gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -61,5 +61,5 @@ class test_sink_source(gr_unittest.TestCase): self.assertRaises(ValueError, lambda : gr.vector_source_f(src_data, False, 3)) if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_vector_sink_source, "test_vector_sink_source.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py b/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py index 3ba5dfbc..d9f38e3f 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -27,7 +27,7 @@ from os.path import getsize g_in_file = os.path.join (os.getenv ("srcdir"), "test_16bit_1chunk.wav") -class qa_wavefile(gr_unittest.TestCase): +class test_wavefile(gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -66,4 +66,4 @@ class qa_wavefile(gr_unittest.TestCase): if __name__ == '__main__': - gr_unittest.main () + gr_unittest.run(test_wavefile, "test_wavefile.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr_unittest.py b/gnuradio-core/src/python/gnuradio/gr_unittest.py index 29a73194..8ecd83d5 100755 --- a/gnuradio-core/src/python/gnuradio/gr_unittest.py +++ b/gnuradio-core/src/python/gnuradio/gr_unittest.py @@ -127,11 +127,19 @@ def run(PUT, filename=None): # Create an XML runner to filename fout = file(path+"/"+filename, "w") - runner = gr_xmlrunner.XMLTestRunner(fout) + xmlrunner = gr_xmlrunner.XMLTestRunner(fout) + txtrunner = TextTestRunner(verbosity=1) # Run the test; runner also creates XML output file + # FIXME: make xmlrunner output to screen so we don't have to do run and main suite = TestLoader().loadTestsFromTestCase(PUT) - runner.run(suite) + xmlrunner.run(suite) + main() + + # This will run and fail make check if problem + # but does not output to screen. + #main(testRunner = xmlrunner) + else: # If no filename is given, just run the test main() -- 2.30.2