commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r3433 - in gnuradio/branches/developers/jcorgan/ticket


From: jcorgan
Subject: [Commit-gnuradio] r3433 - in gnuradio/branches/developers/jcorgan/ticket-3: . gnuradio-core/src/python/gnuradio/gr gr-atsc/src/python
Date: Sat, 26 Aug 2006 20:53:27 -0600 (MDT)

Author: jcorgan
Date: 2006-08-26 20:53:27 -0600 (Sat, 26 Aug 2006)
New Revision: 3433

Added:
   gnuradio/branches/developers/jcorgan/ticket-3/run_tests.sh.in
Modified:
   gnuradio/branches/developers/jcorgan/ticket-3/Makefile.am
   gnuradio/branches/developers/jcorgan/ticket-3/configure.ac
   
gnuradio/branches/developers/jcorgan/ticket-3/gnuradio-core/src/python/gnuradio/gr/run_tests.in
   gnuradio/branches/developers/jcorgan/ticket-3/gr-atsc/src/python/run_tests.in
Log:
Implements ticket:3 for gnuradio-core and gr-atsc.

A master parameterized run_tests.sh is created in the top-level
directory.  It is invoked in individual components' QA directories
with the minimum necessary information for it to find everything.

This version handles the src/lib and src/python component layout; it
will be updated with additional code to handle the simpler src/ layout
when those components get switched over.

Note: For simplicity's sake, the same run_tests.sh is used for the
gnuradio-core component, though the script will create extra path
garbage that gets ignored.  It's harmless, I promise.



Modified: gnuradio/branches/developers/jcorgan/ticket-3/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/ticket-3/Makefile.am   2006-08-27 
01:33:06 UTC (rev 3432)
+++ gnuradio/branches/developers/jcorgan/ticket-3/Makefile.am   2006-08-27 
02:53:27 UTC (rev 3433)
@@ -21,10 +21,11 @@
 
 include $(top_srcdir)/Makefile.common
 
-EXTRA_DIST =                           \
-       bootstrap                       \
-       configure                       \
-       config.h.in
+EXTRA_DIST = \
+       bootstrap \
+       configure \
+       config.h.in \
+       run_tests.sh.in
 
 SUBDIRS = @build_dirs@
 DIST_SUBDIRS = @build_dirs@ @skipped_dirs@

Modified: gnuradio/branches/developers/jcorgan/ticket-3/configure.ac
===================================================================
--- gnuradio/branches/developers/jcorgan/ticket-3/configure.ac  2006-08-27 
01:33:06 UTC (rev 3432)
+++ gnuradio/branches/developers/jcorgan/ticket-3/configure.ac  2006-08-27 
02:53:27 UTC (rev 3433)
@@ -189,9 +189,13 @@
  
 AC_CONFIG_FILES([\
     Makefile \
+    run_tests.sh
     config/Makefile
 ])
 
+dnl run_tests.sh is created from run_tests.in.sh.  Make it executable.
+AC_CONFIG_COMMANDS([run_tests_build], [chmod +x run_tests.sh])
+
 AC_OUTPUT
 
 echo

Modified: 
gnuradio/branches/developers/jcorgan/ticket-3/gnuradio-core/src/python/gnuradio/gr/run_tests.in
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ticket-3/gnuradio-core/src/python/gnuradio/gr/run_tests.in
     2006-08-27 01:33:06 UTC (rev 3432)
+++ 
gnuradio/branches/developers/jcorgan/ticket-3/gnuradio-core/src/python/gnuradio/gr/run_tests.in
     2006-08-27 02:53:27 UTC (rev 3433)
@@ -1,33 +1,14 @@
 #!/bin/sh
 
address@hidden@/gnuradio-core/src/lib/swig
address@hidden@/gnuradio-core/src/lib/swig
address@hidden@/gnuradio-core/src/python
+# 1st parameter is absolute path to component source directory
+# 2nd parameter is absolute path to component build directory
+# 3rd parameter is path to Python QA directory
 
-PYTHONPATH="$swigbld:$swigbld/.libs:$swigsrc:$py"
-export PYTHONPATH
+# Note: calling master run_tests.sh in gnuradio core is not strictly
+# correct, as it will result in a partially bogus PYTHONPATH, but it
+# does make the correct paths in the second half so all is well.
 
-# for OS/X
-DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs"
-export DYLD_LIBRARY_PATH
-
-# Don't load user or system prefs
-GR_DONT_LOAD_PREFS=1
-export GR_DONT_LOAD_PREFS
-
-ok=yes
-for file in @srcdir@/qa_*.py
-do
-  echo $file
-  if ! $file
-  then
-    ok=no
-  fi  
-done
-
-if [ $ok = yes ]
-then
-  exit 0
-else
-  exit 1
-fi
address@hidden@/run_tests.sh \
+    @abs_top_srcdir@/gnuradio-core \
+    @abs_top_builddir@/gnuradio-core \
+    @srcdir@

Modified: 
gnuradio/branches/developers/jcorgan/ticket-3/gr-atsc/src/python/run_tests.in
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ticket-3/gr-atsc/src/python/run_tests.in   
    2006-08-27 01:33:06 UTC (rev 3432)
+++ 
gnuradio/branches/developers/jcorgan/ticket-3/gr-atsc/src/python/run_tests.in   
    2006-08-27 02:53:27 UTC (rev 3433)
@@ -1,51 +1,10 @@
 #!/bin/sh
 
-# All this strange PYTHONPATH manipulation is required to run our
-# tests using our just built shared library and swig-generated python
-# code prior to installation.
+# 1st parameter is absolute path to component source directory
+# 2nd parameter is absolute path to component build directory
+# 3rd parameter is path to Python QA directory
 
-# build tree == src tree unless you're doing a VPATH build.  
-# If you don't know what a VPATH build is, you're not doing one.  Relax...
-
address@hidden@
address@hidden@
-
-# Where to look in the build tree for our shared library
address@hidden@/gr-atsc/src/lib
-# Where to look in the src tree for swig generated python code
address@hidden@/gr-atsc/src/lib
-# Where to look in the src tree for hand written python code
address@hidden@/gr-atsc/src/python
-
-# Where to look for GNU Radio python modules in current build tree
address@hidden@/gnuradio-core/src/python
-grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig
-grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs
-
-PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH"
-export PYTHONPATH
-
-# For OS/X
-DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs"
-export DYLD_LIBRARY_PATH
-
-#
-# This is the simple part...
-# Run everything that matches qa_*.py and return the final result.
-#
-
-ok=yes
-for file in @srcdir@/qa_*.py
-do
-  if ! $file
-  then
-    ok=no
-  fi  
-done
-
-if [ $ok = yes ]
-then
-  exit 0
-else
-  exit 1
-fi
address@hidden@/run_tests.sh \
+    @abs_top_srcdir@/gr-atsc \
+    @abs_top_builddir@/gr-atsc \
+    @srcdir@

Added: gnuradio/branches/developers/jcorgan/ticket-3/run_tests.sh.in
===================================================================
--- gnuradio/branches/developers/jcorgan/ticket-3/run_tests.sh.in               
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/ticket-3/run_tests.sh.in       
2006-08-27 02:53:27 UTC (rev 3433)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# First argument is absolute path to top of component source directory
+# Second argument is absolute path to top of component build directory
+# Third argument is component source directory for qa tests
+
+# Where to find my swig generated shared library
+mylibdir=$2/src/lib
+mylibdir=$mylibdir:$mylibdir/.libs
+
+# Where to find my swig generated python module
+mysrcdir=$1/src/lib
+
+# Where to find my hand written python modules
+mypydir=$1/src/python
+
+# Where to find core's swig generated shared libraries
address@hidden@/gnuradio-core/src/lib/swig
+grswigdir=$grswigdir:$grswigdir/.libs
+
+# Where to find core's python modules
address@hidden@/gnuradio-core/src/python
+
+# Where to find core's master library files
address@hidden@/gnuradio-core/src/lib
+grlibdir=$grlibdir:$grlibdir/.libs
+
+# Construct search path for python modules
+PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$grswigdir:$grpydir:$PYTHONPATH"
+export PYTHONPATH
+
+# For OS/X
+DYLD_LIBRARY_PATH=$grlibdir
+export DYLD_LIBRARY_PATH
+
+# Don't load user or system prefs
+GR_DONT_LOAD_PREFS=1
+export GR_DONT_LOAD_PREFS
+
+# Run everything that matches qa_*.py and return the final result.
+
+ok=yes
+for file in $3/qa_*.py
+do
+  if ! $file
+  then
+    ok=no
+  fi  
+done
+
+if [ $ok = yes ]
+then
+  exit 0
+else
+  exit 1
+fi





reply via email to

[Prev in Thread] Current Thread [Next in Thread]