Re: Ming-0.4.4 released

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

 



On Fri, Oct 28, 2011 at 04:08:02PM +0900, Shigeharu TAKENO wrote:
> shige 10/28 2011
> ----------------
> 
> Thanks for your reply.
> 
> Sandro Santilli <strk@xxxxxxxxxx> wrote:
> | > 2) I needed to change paths of the 1st line of test scripts:
> | > 
> | >  #!/usr/bin/python, #!/usr/bin/perl, #!/usr/bin/php
> | > 
> | > to the proper paths
> | 
> | We want to find a way to recuce maintainance cost, maybe
> | 
> | #!/usr/bin/env python
> | 
> | and similar would work for you ?
> 
> This works for me too. It is a nice solution.

I just asked an openbsd user about this and he mentioned there's no
"python" binary there, just "python2.6" or "python2.7"
This means the only way for it to work there is having it set
at ./configure time (--with-python=xxx) and thus either substituted
in each and every test file (too much work, IMHO :) or only substituted
in the dotests.pl file, which is the script that actually invokes
each and every test. See below.

> | Alternatively we should work something out from the dotests.pl
> | runner, so that the path to interpreter is only substituted
> | in that single place.
> | 
> | Could you please file a ticket for this on bugzilla ?
> 
> Sorry, I can't understand your proposal.

There's a test/dotests.pl script which is the one invoked as a wrapper
for most of the testsuite (all but test/actionscript). That script takes
care of generating the SWF and comparing it with a reference SWF.
It does it for each enabled language binding.
The way it generates the SWF is custom for each binding.
See for example line 157 of the script. There, the commandline to invoke
a PHP test is generated. You could do something similar for python and 
for perl and what.

I gave it a first go, attached is my patch for it.
See if it works for you.


> | > 3) I used the patch below at the compilation. Especially, I think
> | > it is serious for util/parser.c.
> | 
> | Is there any test failing w/out your patch and working with ?
> 
> Sorry, I made a mistake. A patch for util/parser.c is not correct.
> I attached correct version of it below.
> 
> I tested again on my Solaris 9. Since the OS does not have 
> vasprintf(), doing "CCLD ActionScriptTest" is faild without 
> my patch for actionscript/ActionScriptTest.c. 
> 
> Without the patch for util/read.c about endian, "make check" says:
> 
> > Compiling `forin.as.pp'... successfully compiled 174 bytes bytecode.
> > ../../util/listswf forin.swf | diff - ./forin.ref
> > Testing legacy_functions with swfversion 6
> > Preprocessing ./legacy_functions.as... 168c168
> > <      [000]   Float: 0.000000
> > ---
> > >      [000]   Float: 1.000000
> > 175c175
> > <      [000]   Float: 0.000000
> > ---
> > >      [000]   Float: 1.000000
> > done.
> > .............
> > FAIL: ActionScriptTest
> > ==================
> > 1 of 1 test failed
> > ==================
> 
> Without the patch for util/parser.c, "make check" says:
> 
> > Executing './test03 .' in /home/users/shige/tmp/work6/ming-0.4.4/test/Font
> > 64c64
> > <    GlyphIndex[0] = 5ee90    GlyphAdvance[0] = 0086
> > ---
> > >    GlyphIndex[0] = 0000    GlyphAdvance[0] = 0086
> > test03 failed (c). Problem comparing against ./test03.ref
> 
> for test03. This may be a problem for initialization of 
> GlyphIndex[0].
> 
> After applied mypatch, all test passed in "make check". The 
> modified patch is the following:

Ok, sounds better, altought I'd prefer multiple patches
for multiple issues (and ideally also one ticket for each).

Tickets go to: http://bugs.libming.org

Thanks again.

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html

--

what comes below this line is just spam, dont bother scrolling...




















































    still here ?



























>From 1ade2aff0865940aaea2aef67c10b5bd7d592394 Mon Sep 17 00:00:00 2001
From: Sandro Santilli <strk@xxxxxxxxxx>
Date: Fri, 28 Oct 2011 09:37:40 +0200
Subject: [PATCH] Allow having perl and python binaries in arbitrary paths (for testsuite)

---
 test/Makefile.inc |    2 +-
 test/dotests.pl   |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/Makefile.inc b/test/Makefile.inc
index 2458801..b9bb6fe 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -71,7 +71,7 @@ gen: refs $(SWFS) gen-php gen-pl gen-py gen-cxx gen-tcl
 
 .PHONY: dotests 
 dotests: $(top_srcdir)/test/dotests.pl
-	echo "top_builddir=$(top_builddir) builddir=$(PWD) top_srcdir=$(top_srcdir) srcdir=$(srcdir) BINDINGS='$(BINDINGS)' BUILD_OPTIONS='$(BUILD_OPTIONS)' $(PERL) -w $(top_srcdir)/test/dotests.pl" > $@
+	echo "top_builddir=$(top_builddir) builddir=$(PWD) top_srcdir=$(top_srcdir) srcdir=$(srcdir) BINDINGS='$(BINDINGS)' BUILD_OPTIONS='$(BUILD_OPTIONS)' PERL='$(PERL)' PYTHON='$(PYTHON)' PHP='$(PHP)' $(PERL) -w $(top_srcdir)/test/dotests.pl" > $@
 	chmod +x $@
 
 .php.phpx:
diff --git a/test/dotests.pl b/test/dotests.pl
index 6db0dd3..11357af 100755
--- a/test/dotests.pl
+++ b/test/dotests.pl
@@ -149,12 +149,12 @@ sub doswftest($$$$)
 				chop;
 				$ENV{'PYTHONPATH'} .= ":".$_;
 			}
+			$testbuilder = "$ENV{'PYTHON'} $testbuilder";
 		}
 
 		elsif($binding eq 'php')
 		{
-			# TODO: have the .phpx file passed instead !
-			$testbuilder = "php -n -d extension_dir=$TOP_BUILDDIR/php_ext/.libs -d extension=ming.so $testbuilder";
+			$testbuilder = "$ENV{'PHP'} -n -d extension_dir=$TOP_BUILDDIR/php_ext/.libs -d extension=ming.so $testbuilder";
 		}
 
 		elsif($binding eq 'perl')
@@ -162,6 +162,7 @@ sub doswftest($$$$)
 			# Set the proper PERL5LIB
 			# (BUILDDIR contains both SWF.pm and SWF.so)
 			$ENV{'PERL5LIB'}=$TOP_BUILDDIR."/perl_ext/blib/arch/auto/SWF/:".$TOP_BUILDDIR."/perl_ext/blib/lib";
+			$testbuilder = "$ENV{'PERL'} $testbuilder";
 		}
 	}
 	else
-- 
1.7.0.4

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Ming-users mailing list
Ming-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ming-users

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux