Re: [xslt] libxslt test run outside of srcdir (possible patch)



On Thu, Oct 25, 2012 at 09:50:17PM +0800, Daniel Veillard wrote:
> On Mon, Oct 15, 2012 at 01:05:06PM +0200, Petr Sumbera wrote:
> > On 10/12/12 05:57 PM, Nick Wellnhofer wrote:
> > >On 12/10/2012 11:18, Petr Sumbera wrote:
> > >>Please see attached patch which tries to fix it. Well, some of these are
> > >>not very nice but finally I have clean test run... :-)
> > >
> > >These changes look particularly ugly:
> > >
> > >@@ -217,6 +217,10 @@
> > >cp err.$$name $$err ; \
> > >fi ; \
> > >else \
> > >+ grep '../docs/' $$out >/dev/null && \
> > >+ sed 's|/docs|/general|' result.$$name | \
> > >+ sed 's|$(srcdir)|../docs|' > result.$$name.tmp && \
> > >+ mv result.$$name.tmp result.$$name; \
> > >diff $$out result.$$name; \
> > >if [ -s $$err ] ; then \
> > >diff $$err err.$$name; \
> > >
> > >It might be better to first canonicalize the "docs" path:
> > >
> > >real_docs_path=`cd $(srcdir)/../docs && pwd`
> > >
> > >And then replace $real_docs_path with "../docs" in the result file. I'm
> > >not sure if this works, though.
> > 
> > Yes. Something like this works. See new patch file.
> > 
> > Petr
> 
> > --- libxslt-1.1.27/tests/plugins/Makefile.am	Tue Sep  4 07:26:23 2012
> > +++ libxslt-1.1.27/tests/plugins/Makefile.am	Thu Oct 11 06:25:06 2012
[...]
> >  	  log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict $$j $$i \
> > -	  	> result.$$name 2>err.$$name; \
> > +	  	2>&1 > result.$$name | sed 's|$(srcdir)|.|' >err.$$name; \
> >  	  if [ ! -f $$out ] ; then \
[...]
> 
>   Okay, if it works for you, great, however I still see the problem:
> 
> ---------------
> bug-165 result
> 1c1
> < runtime error: file ./bug-165.xsl line 6 element value-of
> ---
> > runtime error: file ../../../../XSLT/tests/general/bug-165.xsl line 6
> > element value-of
> ---------------
> 
> But that should not stop from trying to clean things up... I applied
> your patch, and did some <space><TAB> cleanup in the .am files too
> 
> Commited and pushed, thanks !

  Actually it seems the sed commands in the patch don't act as expected
here, I just retried make check, and get tons of errors like:

bug-175 result
1,6c1,6
< compilation error: file ./bug-175.xsl line 28 element function
< xsltStylePreCompute: unknown xsl:function
< compilation error: file ./bug-175.xsl line 5 element transform
< xsl:version: only 1.0 features are supported
< compilation error: file ./bug-175.xsl line 28 element function
< xsltParseStylesheetTop: ignoring unknown function element
---
> .ompilation error: file ./bug-175.xsl line 28 element function
> .sltStylePreCompute: unknown xsl:function
> .ompilation error: file ./bug-175.xsl line 5 element transform
> .sl:version: only 1.0 features are supported
> .ompilation error: file ./bug-175.xsl line 28 element function
> .sltParseStylesheetTop: ignoring unknown function element

  i.e. the match seems to fail and the output is broken as a result.
So I am temporary reverting that patch until we find the cause.
What surprises me is that I didn't caught that problem before
commiting the patch, weird !

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


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