[Pkg-octave-commit] rev 851 -
trunk/packages/octave2.9-forge/debian/patches
Thomas Weber
thomas-guest at alioth.debian.org
Thu Feb 22 20:05:51 CET 2007
Author: thomas-guest
Date: 2007-02-22 20:05:51 +0100 (Thu, 22 Feb 2007)
New Revision: 851
Added:
trunk/packages/octave2.9-forge/debian/patches/50-run_unit_tests.patch
Log:
Bug fix for #410463; generate a valid fntests.m file
Added: trunk/packages/octave2.9-forge/debian/patches/50-run_unit_tests.patch
===================================================================
--- trunk/packages/octave2.9-forge/debian/patches/50-run_unit_tests.patch 2007-02-22 18:37:47 UTC (rev 850)
+++ trunk/packages/octave2.9-forge/debian/patches/50-run_unit_tests.patch 2007-02-22 19:05:51 UTC (rev 851)
@@ -0,0 +1,42 @@
+diff -Nur octave2.9-forge-2006.07.09+dfsg1/admin/mktests.sh octave2.9-forge-2006.07.09+dfsg1.new/admin/mktests.sh
+--- octave2.9-forge-2006.07.09+dfsg1/admin/mktests.sh 2006-04-07 13:17:33.000000000 +0000
++++ octave2.9-forge-2006.07.09+dfsg1.new/admin/mktests.sh 2007-02-22 20:02:22.580837979 +0000
+@@ -1,5 +1,9 @@
+ #! /bin/sh
+
++# Where we start and want to come back
++STARTDIR=$PWD
++echo $STARTDIR
++
+ # Where to find mkpkgadd
+ MKPKGADD=$1
+
+@@ -40,7 +44,7 @@
+ m_files=`echo $dir/*.m`
+ if test "$m_files" != "$dir/*.m"; then FILES="$FILES $m_files"; fi
+
+- # No C++ of m-files, so no testing
++ # No C++ or m-files, so no testing
+ if test -z "$FILES" ; then continue; fi
+
+ # Find all files with %!test or %!assert in them
+@@ -54,12 +58,17 @@
+ # if no files have tests in them, skip
+ echo "printf('%s','$prompt'); disp('');" >>fntests.m
+ if test -z "$TESTS" ; then
+- echo "printf('%-40s ---> success','');disp('');" >>fntests.m
++ echo "printf('%-40s ---> no tests found','');disp('');" >>fntests.m
+ else
+ echo "dp=dn=0;" >>fntests.m
+ for file in $TESTS ; do
+- echo "[p,n] = test('$file','quiet',fid);" >>fntests.m
++ BASENAME=`basename $file`
++ DIRNAME=`dirname $file`
++ # change into subdirectory, run tests and change back into top-level directory
++ echo "cd $DIRNAME" >>fntests.m
++ echo "[p,n] = test('$BASENAME','quiet',fid);" >>fntests.m
+ echo "dp += p; dn += n;" >>fntests.m
++ echo "cd $STARTDIR" >>fntests.m
+ done
+ echo "if dp==dn, printf('%-40s ---> success',''); else" >>fntests.m
+ echo "printf('%-40s ---> passes %d out of %d tests','',dp,dn); end" >>fntests.m
More information about the Pkg-octave-commit
mailing list