[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7860 - in gnuradio/branches/developers/michaelld/wav_
From: |
michaelld |
Subject: |
[Commit-gnuradio] r7860 - in gnuradio/branches/developers/michaelld/wav_fix: config gnuradio-core/src/python/gnuradio/gr |
Date: |
Thu, 28 Feb 2008 11:20:52 -0700 (MST) |
Author: michaelld
Date: 2008-02-28 11:20:51 -0700 (Thu, 28 Feb 2008)
New Revision: 7860
Added:
gnuradio/branches/developers/michaelld/wav_fix/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py.in
Removed:
gnuradio/branches/developers/michaelld/wav_fix/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py
Modified:
gnuradio/branches/developers/michaelld/wav_fix/config/grc_gnuradio_core.m4
Log:
Fixes "make check" with new wavefile.
Modified:
gnuradio/branches/developers/michaelld/wav_fix/config/grc_gnuradio_core.m4
===================================================================
--- gnuradio/branches/developers/michaelld/wav_fix/config/grc_gnuradio_core.m4
2008-02-28 18:11:17 UTC (rev 7859)
+++ gnuradio/branches/developers/michaelld/wav_fix/config/grc_gnuradio_core.m4
2008-02-28 18:20:51 UTC (rev 7860)
@@ -69,6 +69,7 @@
gnuradio-core/src/python/gnuradio/blks2impl/Makefile \
gnuradio-core/src/python/gnuradio/gr/Makefile \
gnuradio-core/src/python/gnuradio/gr/run_tests \
+ gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py \
gnuradio-core/src/python/gnuradio/gru/Makefile \
gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
gnuradio-core/src/python/gnuradio/vocoder/Makefile \
Deleted:
gnuradio/branches/developers/michaelld/wav_fix/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py
Added:
gnuradio/branches/developers/michaelld/wav_fix/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py.in
===================================================================
---
gnuradio/branches/developers/michaelld/wav_fix/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py.in
(rev 0)
+++
gnuradio/branches/developers/michaelld/wav_fix/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py.in
2008-02-28 18:20:51 UTC (rev 7860)
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gr_unittest
+
+import os
+from os.path import getsize
+
+class qa_wavefile(gr_unittest.TestCase):
+
+ def setUp (self):
+ self.tb = gr.top_block ()
+
+ def tearDown (self):
+ self.tb = None
+
+ def test_001_checkwavread (self):
+ wf = gr.wavfile_source("@srcdir@/test_16bit_1chunk.wav")
+ self.assertEqual(wf.sample_rate(), 8000)
+
+ # disabled. Fails on PPC
+ def xtest_002_checkwavcopy (self):
+ infile = "@srcdir@/test_16bit_1chunk.wav"
+ outfile = "test_out.wav"
+
+ wf_in = gr.wavfile_source(infile)
+ wf_out = gr.wavfile_sink(outfile,
+ wf_in.channels(),
+ wf_in.sample_rate(),
+ wf_in.bits_per_sample())
+ self.tb.connect(wf_in, wf_out)
+ self.tb.run()
+ wf_out.close()
+
+ self.assertEqual(getsize(infile), getsize(outfile))
+
+ in_f = file(infile, 'rb')
+ out_f = file(outfile, 'rb')
+
+ in_data = in_f.read(getsize(infile))
+ out_data = out_f.read(getsize(outfile))
+ os.remove(outfile)
+
+ self.assertEqual(in_data, out_data)
+
+
+if __name__ == '__main__':
+ gr_unittest.main ()
Property changes on:
gnuradio/branches/developers/michaelld/wav_fix/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py.in
___________________________________________________________________
Name: svn:executable
+ *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7860 - in gnuradio/branches/developers/michaelld/wav_fix: config gnuradio-core/src/python/gnuradio/gr,
michaelld <=