Fix for QA code for wavefile.
authormichaelld <michaelld@221aa14e-8319-0410-a670-987f0aec2ac5>
Thu, 28 Feb 2008 20:11:05 +0000 (20:11 +0000)
committermichaelld <michaelld@221aa14e-8319-0410-a670-987f0aec2ac5>
Thu, 28 Feb 2008 20:11:05 +0000 (20:11 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7866 221aa14e-8319-0410-a670-987f0aec2ac5

gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py
run_tests.sh.in

index 7ce4ae92f9f68b14d54baf90f72d214e35ab9aa0..f6359d82fb9e0782a35ad367442d93ef334330a4 100755 (executable)
@@ -25,6 +25,8 @@ from gnuradio import gr, gr_unittest
 import os
 from os.path import getsize
 
+g_in_file = os.path.join (os.getenv ("srcdir"), "test_16bit_1chunk.wav")
+
 class qa_wavefile(gr_unittest.TestCase):
 
     def setUp (self):
@@ -34,12 +36,12 @@ class qa_wavefile(gr_unittest.TestCase):
         self.tb = None
 
     def test_001_checkwavread (self):
-       wf = gr.wavfile_source("./test_16bit_1chunk.wav")
+       wf = gr.wavfile_source(g_in_file)
        self.assertEqual(wf.sample_rate(), 8000)
 
     # disabled.  Fails on PPC
     def xtest_002_checkwavcopy (self):
-       infile  = "test_16bit_1chunk.wav"
+       infile  = g_in_file
        outfile = "test_out.wav"
 
        wf_in  = gr.wavfile_source(infile)
index 35e24d794ee9825851ec1a6c3d4030a016d42f88..9b6e9bfad3b74466a950c9d071460e81542f0922 100644 (file)
@@ -10,6 +10,9 @@ abs_top_srcdir=@abs_top_srcdir@
 # Absolute path to the top of the build directory
 abs_top_builddir=@abs_top_builddir@
 
+# current QA srcdir
+export srcdir=$3
+
 # Where to find my swig generated shared library
 mylibdir=$2/src:$2/src/.libs:$2/src/lib:$2/src/lib/.libs