[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: branch: master updated (1.0-20070526-68-gf8680b1)



The branch, master has been updated
       via  f8680b18c8e27617eccbbf158acb84ccac7ac386 (commit)
      from  57b2848a7e69d19e18ac03a1264cb55d41c65d0e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gnetlist/configure.ac                 |    2 +-
 gnetlist/tests/Makefile.am            |    6 +++---
 gnetlist/tests/runtest.sh             |    8 +++++++-
 gnetlist/tests/spice-sdb/Makefile.am  |    2 +-
 gnetlist/tests/spice-sdb/run_tests.sh |   12 +++++++++++-
 gnetlist/tests/spice-sdb/tests.list   |   13 +++++++------
 6 files changed, 30 insertions(+), 13 deletions(-)


=================
 Commit Messages
=================

commit f8680b18c8e27617eccbbf158acb84ccac7ac386
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Date:   Tue Jun 26 16:20:58 2007 -0400

    Portability fixes for the testsuite.
    
    Get the testsuite fully working on SunOS-5.9/sparc.  This
    entails two issues.  The "-I" option to diff is a GNU
    extension and is not supported by the solaris diff.  Work
    around this by using sed to filter out the lines which were
    to be ignored.  This addresses the tests run by gnetlist/tests/runtest.sh.
    
    The other issue is that the longopts tests in the spice-sdb
    testsuite should not be run on a system that does not have
    getopt_long().  To address this, extend the run_tests.sh to allow
    a variable in the tests.list file to disable a test unless set to "yes".

:100644 100644 45f822b... af1b0c8... M	gnetlist/configure.ac
:100644 100644 0992edf... b6a40d0... M	gnetlist/tests/Makefile.am
:100755 100755 df9084c... 381f5e5... M	gnetlist/tests/runtest.sh
:100644 100644 ab488ad... ab5a457... M	gnetlist/tests/spice-sdb/Makefile.am
:100755 100755 ed1c706... fe10f64... M	gnetlist/tests/spice-sdb/run_tests.sh
:100644 100644 fba2b7a... dfc9d69... M	gnetlist/tests/spice-sdb/tests.list

=========
 Changes
=========

commit f8680b18c8e27617eccbbf158acb84ccac7ac386
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Date:   Tue Jun 26 16:20:58 2007 -0400

    Portability fixes for the testsuite.
    
    Get the testsuite fully working on SunOS-5.9/sparc.  This
    entails two issues.  The "-I" option to diff is a GNU
    extension and is not supported by the solaris diff.  Work
    around this by using sed to filter out the lines which were
    to be ignored.  This addresses the tests run by gnetlist/tests/runtest.sh.
    
    The other issue is that the longopts tests in the spice-sdb
    testsuite should not be run on a system that does not have
    getopt_long().  To address this, extend the run_tests.sh to allow
    a variable in the tests.list file to disable a test unless set to "yes".

diff --git a/gnetlist/configure.ac b/gnetlist/configure.ac
index 45f822b..af1b0c8 100644
--- a/gnetlist/configure.ac
+++ b/gnetlist/configure.ac
@@ -76,7 +76,7 @@ if test "x$HAVE_GETOPT_LONG" = xyes ; then
 	AC_DEFINE(HAVE_GETOPT_LONG, [], [Define to 1 if you have the 'getopt_long' function])
 fi
 AC_SUBST(GETOPT_LONG_LIBS)
-
+AC_SUBST(HAVE_GETOPT_LONG)
 
 # 
 # Command line flags end
diff --git a/gnetlist/tests/Makefile.am b/gnetlist/tests/Makefile.am
index 0992edf..b6a40d0 100644
--- a/gnetlist/tests/Makefile.am
+++ b/gnetlist/tests/Makefile.am
@@ -82,7 +82,7 @@ tests:
 
 # multiple equals in attributes SPICE-SDB 
 	$(SRCDIR)/runtest.sh $(SRCDIR)/multiequal.sch spice-sdb \
-		$(BUILDDIR) $(SRCDIR) "-I gnetlist"
+		$(BUILDDIR) $(SRCDIR)
 
 # Cleanup
 	rm -f $(BUILDDIR)/new_*
@@ -108,11 +108,11 @@ tests_ales:
 
 # amp SPICE SDB
 	$(SRCDIR)/runtest.sh $(HOME)/gEDA/alesch/amp.sch spice-sdb \
-		$(BUILDDIR) $(SRCDIR) "-I gnetlist"
+		$(BUILDDIR) $(SRCDIR) 
 
 # darlington SPICE SDB
 	$(SRCDIR)/runtest.sh $(HOME)/gEDA/alesch/darlington.sch spice-sdb \
-		$(BUILDDIR) $(SRCDIR) "-I gnetlist"
+		$(BUILDDIR) $(SRCDIR)
 
 # switcap (does not work with make distcheck due to local test.ana file)
 	gnetlist -o $(BUILDDIR)/new_skt.switcap -g switcap \
diff --git a/gnetlist/tests/runtest.sh b/gnetlist/tests/runtest.sh
index df9084c..381f5e5 100755
--- a/gnetlist/tests/runtest.sh
+++ b/gnetlist/tests/runtest.sh
@@ -20,9 +20,15 @@ then
 	exit 1
 fi
 
-diff $EXTRADIFF ${SRCDIR}/${schbasename}.$BACKEND ${BUILDDIR}/new_${schbasename}.$BACKEND
+sed '/gnetlist.*-g/d' ${SRCDIR}/${schbasename}.$BACKEND > \
+	${BUILDDIR}/${schbasename}.${BACKEND}.filtered
+sed '/gnetlist.*-g/d' ${BUILDDIR}/new_${schbasename}.$BACKEND > \
+	${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
+diff $EXTRADIFF ${BUILDDIR}/${schbasename}.${BACKEND}.filtered \
+	 ${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
 status=$?
 
+rm ${BUILDDIR}/${schbasename}.${BACKEND}.filtered ${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
 if [ "$status" != 0 ]
 then
 	exit 2
diff --git a/gnetlist/tests/spice-sdb/Makefile.am b/gnetlist/tests/spice-sdb/Makefile.am
index ab488ad..ab5a457 100644
--- a/gnetlist/tests/spice-sdb/Makefile.am
+++ b/gnetlist/tests/spice-sdb/Makefile.am
@@ -3,7 +3,7 @@
 
 SUBDIRS= inputs outputs
 
-TESTS_ENVIRONMENT= PERL=${PERL}
+TESTS_ENVIRONMENT= PERL=${PERL} HAVE_GETOPT_LONG=${HAVE_GETOPT_LONG}
 
 RUN_TESTS= run_tests.sh
 
diff --git a/gnetlist/tests/spice-sdb/run_tests.sh b/gnetlist/tests/spice-sdb/run_tests.sh
index ed1c706..fe10f64 100755
--- a/gnetlist/tests/spice-sdb/run_tests.sh
+++ b/gnetlist/tests/spice-sdb/run_tests.sh
@@ -131,10 +131,20 @@ for t in $all_tests ; do
     if test "X$code" = "X" ; then
 	code=0
     fi
+    condition=`grep "^[ \t]*${t}[ \t]*|" $TESTLIST | awk 'BEGIN{FS="|"} {print $6}' | sed 's; ;;g'`
+
     echo "Schematics to copy   = $schematics"
     echo "Args to copy         = $args"
     echo "Expected return code = \"$code\""
-
+    if test "X$condition" != "X" ; then
+        eval "ctest=\`echo \$$condition\`"
+        if test X$ctest = "Xyes" ; then
+            echo "Running test because $condition = yes"
+        else
+            echo "Skipping test because $condition = $ctest"
+	    continue
+        fi
+    fi
 
     tot=`expr $tot + 1`
 
diff --git a/gnetlist/tests/spice-sdb/tests.list b/gnetlist/tests/spice-sdb/tests.list
index fba2b7a..dfc9d69 100644
--- a/gnetlist/tests/spice-sdb/tests.list
+++ b/gnetlist/tests/spice-sdb/tests.list
@@ -2,7 +2,8 @@
 #
 # test_name | input schematics | aux files (gafrc, symbols, etc) | \ 
 # extra flags to pass to gnetlist -g spice-sdb | \
-# return code if non-zero expected
+# return code if non-zero expected | \
+# variable which must be set for the test to run
 #
 
 
@@ -13,9 +14,9 @@
 # The two stage amp
 TwoStageAmp | TwoStageAmp.sch | Simulation.cmd gafrc models/2N3904.mod sym/transistor.sym | | 
 TwoStageAmp_Include | TwoStageAmp.sch | Simulation.cmd gafrc models/2N3904.mod sym/transistor.sym | -I
-TwoStageAmp_Include_longopt | TwoStageAmp.sch | Simulation.cmd gafrc models/2N3904.mod sym/transistor.sym | --include
+TwoStageAmp_Include_longopt | TwoStageAmp.sch | Simulation.cmd gafrc models/2N3904.mod sym/transistor.sym | --include | | HAVE_GETOPT_LONG
 TwoStageAmp_Sort | TwoStageAmp.sch | Simulation.cmd gafrc models/2N3904.mod sym/transistor.sym | -s
-TwoStageAmp_Sort_longopt | TwoStageAmp.sch | Simulation.cmd gafrc models/2N3904.mod sym/transistor.sym | --sort
+TwoStageAmp_Sort_longopt | TwoStageAmp.sch | Simulation.cmd gafrc models/2N3904.mod sym/transistor.sym | --sort | | HAVE_GETOPT_LONG
 
 # John Doty's test circuit
 # First test mangling
@@ -26,9 +27,9 @@ JD_Sort | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | -s
 JD_nomunge | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | | -n
 JD_Include_nomunge | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | -I -n
 JD_Sort_nomunge | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | -s -n
-JD_nomunge_longopt | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | | --nomunge
-JD_Include_nomunge_longopt | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | -I --nomunge
-JD_Sort_nomunge_longopt | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | -s --nomunge
+JD_nomunge_longopt | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | --nomunge | | HAVE_GETOPT_LONG
+JD_Include_nomunge_longopt | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | -I --nomunge | | HAVE_GETOPT_LONG
+JD_Sort_nomunge_longopt | LVDfoo.sch | gafrc models/openIP_5.cir sym/LVD.sym | -s --nomunge | | HAVE_GETOPT_LONG
 
 
 # Tests for slotted parts




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs