1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2026-01-07 21:58:22 +03:00
Commit Graph

32 Commits

Author SHA1 Message Date
Nick Wellnhofer
971d5c4dd1 tests: Port most of the test suite to C
Use runtest.c from libxml2 as a starting point.

This finally allows us to run most of tests with CMake and Autotools
VPATH builds.
2022-09-07 22:18:55 +02:00
Nick Wellnhofer
5b822f6369 Revert "Remove unnecessary .orig files"
This reverts commit 1e2b460488.

These are actual test result files with an .orig extensions, not
leftovers from a patch application.
2020-08-26 00:41:09 +02:00
Suleyman Poyraz
1e2b460488 Remove unnecessary .orig files 2020-06-22 13:57:09 +02:00
Nick Wellnhofer
57c3ed0514 Make valgrind tests work with libtool
Run valgrind with the actual executable, not the libtool wrapper script.
Also add --leak-check=full.
2016-04-20 11:43:49 +02:00
Daniel Veillard
39b0c27af8 Remove .cvsignore files which are not needed anymore 2012-09-04 14:28:28 +08:00
Daniel Richard G
a2cd8a03ac Various "make distcheck" and other fixes
Makefile.am:

* Use $(VAR), not @VAR@, as the former is the correct form for AC_SUBST'ed
   variables in Makefile.am files

* Touch these *.xml/*.syms files in the "dist-hook" target to prevent them
   from being regenerated, because the "make dist" process in itself
   updates the timestamps of the source files when it copies them into
   $(distdir)

* Add EXTRA_LIBS (-lrt on my system) to xsltConf.sh, as this is a required
   dependency when client applications link against -lxslt

   (note that the definition of EXTRA_LIBS has been changed; see below)

* Removed MAKEFLAGS+=--silent bits, as this is not compatible with non-GNU
   Make programs

autogen.sh:

* Add --warnings=all options to automake and autoconf invocations, to
   better catch potential problems (most of which I've fixed in this patch)

configure.in:

* Replaced obsolete macros with their current equivalents; for reference,
   see

     http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html

   (I removed AC_ISC_POSIX outright because the doc states it is no longer
   useful)

* test(1) uses "=" as an operator, not "=="

* Fixed quoting on an AC_LINK_IFELSE() invocation to quell Autoconf errors

* Don't add redundant libraries to EXTRA_LIBS, because (1) this variable
   already contains LibXSLT's own additional system-library deps, and is
   useful in that form, and (2) the LibXML2 deps are already handled by
   Libtool

* Don't delete files in srcdir, and don't create the symlink to
   "Copyright" there either

   (I don't understand why this is being symlinked in the first place...)

doc/Makefile.am:

* Can't use wildcards in EXTRA_DIST, because this breaks dependencies
   (e.g. you can't "make EXSLT/\*.html"), and they only work properly when
   building inside the source tree; these have been replaced with their
   expansions. Other entries have been added here in lieu of the wildcards
   in the dist-hook target, as well as opportunistic use of the $(*PAGES)
   variables.

* Don't define an "all" target, because this steps on Automake's toes; use
   "all-local" instead

* Define and use an "xsltproc" variable to reference an in-tree-built
   version of xsltproc, instead of e.g. $(bindir)/xsltproc

   NOTE: The makefile also uses $(XSLTPROC), which names an external
   instance of the program found at configure time. Some instances of this
   could probably be changed to $(xsltproc) to remove the dependency on an
   existing installed program.

* Qualified various filenames as appropriate with $(srcdir)

* Use $(XMLLINT) consistently instead of $(bindir)/xmllint

* In the "libxslt-api.xml ..." rule, cd into $(srcdir) before invoking
   apibuild.py as this script has to run in srcdir anyway

* In the "clean-local" rule, clear out some additional files to allow
   "make distcheck" to pass

* Eliminated the redundant "maintainer-clean-local" rule

* Added a "distclean-local" rule to clear out the build directory in an
   out-of-source build to allow "make distcheck" to pass

* Added a "check-extra-dist" target to make it easier to check that
   EXTRA_DIST isn't missing anything

* Use $(MKDIR_P), not $(mkinstalldirs), as the latter name is obsolete

* Use $(VAR) instead of @VAR@

* The "dist-hook" target didn't work (if any generated files were in
   builddir and not in srcdir), and is no longer needed thanks to the
   comprehensive EXTRA_DIST variable

* Added an "uninstall-local" rule to allow "make distcheck" to pass

* Updated the .PHONY target list, removed non-existent targets

doc/symbols.xml:

* Needed to add this bit to make the generation scripts shut up

libexslt/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

* Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS

   (Note that $(CFLAGS) need not be added to AM_CFLAGS, because Automake
   already references both in the build rules)

* Use $(VAR) instead of @VAR@

libxslt.pc.in:

* Add EXTRA_LIBS (-lrt on my system), as this is a required dependency
   when client applications link against -lxslt

libxslt/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

* Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS

* Use $(VAR) instead of @VAR@, $(MKDIR_P) instead of $(mkinstalldirs)

* Use $(MKDIR_P), not $(mkinstalldirs), as the latter name is obsolete

libxslt/xsltutils.c:

* Some systems don't know about CLOCK_MONOTONIC; older Solaris knows about
   CLOCK_HIGHRES. Some systems, alas, have no usable alternative to
   CLOCK_REALTIME.

python/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

* Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS

* Because libxslt-py.c is (presumably) supposed to be generated every time
   at build time, don't bundle it in the dist tarball

* Use $(VAR) instead of @VAR@

* libxsltclass.py is a generated file, so it doesn't get qualified with
   $(srcdir)

* Use $(MKDIR_P) instead of (mkinstalldirs)

* Added an uninstall-local rule so that "make distcheck" passes

* Removed the $(srcdir) qualifications in the GENERATED file list, as
   these files may exist in builddir

* In the gen_prog rule, qualify the script invocation with $(srcdir), and
   set the SRCDIR environment variable so that the script can find the
   files it needs when builddir != srcdir

* Don't define an "all" target, as this steps on Automake's toes

python/generator.py:

* Get the source directory from the SRCDIR environment variable, and use
   it appropriately

python/tests/Makefile.am:

* Set CLEANFILES instead of defining a "clean" rule

* Use $(VAR) instead of @VAR@, $(MKDIR_P) instead of $(mkinstalldirs)

tests/*/Makefile.am, tests/exslt/*/Makefile.am:

* Need to clean up .memdump files for "make distcheck" to pass

* Don't define an "all" target, as this steps on Automake's toes

tests/REC/Makefile.am:

* Added two missing *.stand.out files to EXTRA_DIST

tests/XSLTMark/Makefile.am:

* Replaced the GNU-Make-specific %.out bit with a more broadly compatible
   rule

   (the "dummy" bit shuts up Automake)

* Use "$(xsltproc)" instead of "$(top_builddir)/xsltproc/xsltproc"

* Use a less $(MAKE)-heavy invocation in the "tests" target

* Replaced a conflicting "clean" target with CLEANFILES

* Added a dependency on $(xsltproc) to all the test targets

* Added a .PHONY target list

tests/docbook/Makefile.am:

* Ditched the "echo -n" bit, because it wasn't working as advertised

* Create output directories for out-of-source builds

* "$(basename $$i)" is a typo in a makefile

* Don't embed $(srcdir) in $out/$html/$fo/$msg/$xhtml, so that we can
   refer to these files in builddir or srcdir

* Add a trailing "echo" to complete the "echo -n"

* Don't output files unconditionally to srcdir (it may be read-only, for
   starters)

tests/plugins/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

   (Note that the "$(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)" bit that was here
   can be dropped entirely, because these already appear in
   xmlsoft_org_xslt_testplugin_la_CFLAGS)

* Use noinst_LTLIBRARIES inside the WITH_MODULES conditional instead of
   EXTRA_LTLIBRARIES, as this is cleaner (and disallows building the plugin
   if module support is disabled)

* Need to clean up *.res files for "make distcheck" to pass

* Use the abs_builddir variable conveniently provided to us by Automake
   instead of a GNU Make $(shell ...) construct

xslt-config.in:

* Add EXTRA_LIBS (-lrt on my system), as this is a required dependency
   when client applications link against -lxslt

xsltproc/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

* Moved $(LIBXML_CFLAGS) into AM_CFLAGS

* Use $(VAR) instead of @VAR@

* Need to clean .memdump for "make distcheck" to pass

* Added rules to build lib[e]xslt.la if needed, which allows test
   makefiles to build xsltproc on the fly even if nothing else has been
   built already

* Create .memdump file in the "tests" target, as it's being grepped
   afterward
2012-08-09 19:46:03 +08:00
William M. Brack
efe7443c2b continued interrupt commit for enhanced "make tests" 2004-03-06 15:11:50 +00:00
Daniel Veillard
818dbee708 applied last fix from #125614 Daniel
* tests/multiple/Makefile.am: applied last fix from #125614
Daniel
2003-11-05 11:39:16 +00:00
William M. Brack
fe57c88acb updated to reflect change to HTML output in libxml2 (formatting of <p>,
* tests/multiple/out/letter*.orig: updated to reflect change
  to HTML output in libxml2 (formatting of <p>, bug #125093)
2003-11-04 09:13:05 +00:00
Daniel Veillard
cc98e55946 fixed a bug introduced in the last commit tried to fix #111437 side effect
* libexslt/sets.c: fixed a bug introduced in the last commit
* libxslt/transform.c: tried to fix #111437
* tests/docbook/result/xtchunk/html/*.orig
  tests/multiple/out/*.orig: side effect of #111437 change.
Daniel
2003-04-23 21:29:56 +00:00
Daniel Veillard
dda2ed17ba added some exclude-result-prefixes to avoid extra namespace declaration
* tests/REC/test-8-1.xsl tests/REC/test-9.1-2.xsl
  tests/general/bug-83.xsl tests/multiple/dict.xsl: added some
  exclude-result-prefixes to avoid extra namespace declaration being
  dumped following the fix for #102920 in libxml2
Daniel
2003-01-09 13:30:35 +00:00
Daniel Veillard
ad1a8b3bc3 the change in HTML meta encoding tag serialization affected some of the
* tests/* : the change in HTML meta encoding tag serialization
  affected some of the results
Daniel
2002-07-17 17:59:52 +00:00
Daniel Veillard
f6f08bd890 added "make valgrind" targets to run the test suite under the debugger
* Makefile.am tests/Makefile.am tests/*/Makefile.am
  tests/*/*/Makefile.am : added "make valgrind" targets
  to run the test suite under the debugger control
* transform.c: valgrind spotted 2 bugs, one related to
  the ordering of the deallocation of the data associated to
  a transofrmation, the second in xsltCopyTree when the new
  node may have been coalesced with an adjacent text node.
  The regression tests now pass cleanly under testgrind.
Daniel
2002-03-19 18:52:17 +00:00
Daniel Veillard
ac6924c939 refactored make tests, make all now don't run the test suite added tests
* Makefile.am configure.in tests/Makefile.am tests/*/Makefile.am
  tests/*/*/Makefile.am: refactored make tests, make all now don't
  run the test suite
* python/Makefile.am: added tests
* python/tests/basic.py python/tests/Makefile.am: added the first
  basic test, memory debug included
Daniel
2002-02-06 10:35:19 +00:00
Daniel Veillard
acb2e6c949 the web site is now extracted from the xslt.html flat file using the site
* doc/*.html doc/site.xsl doc/Makefile.am: the web site
  is now extracted from the xslt.html flat file using
  the site stylesheet ... eat your own dogfood !
* libxslt/transform.c libxslt/xsltutils.c: fixed the
  HTML output to not generate a DOCTYPE if it should not
  i.e. no identifier nor version specified in the xsl:output
* tests/multiple/out/*.orig tests/general/bug-11-.out
  tests/general/bug-33-.out tests/general/bug-52.out
  tests/docbook/result/xtchunk/html/*.orig
  tests/docbook/result/html/gdp-handbook.html
  tests/XSLTMark/*.out: fixing xsl:output with method=html
  resulted in a number of small changes in the regression tests
  output
Daniel
2001-10-24 11:07:19 +00:00
Daniel Veillard
45f2619024 fixed an error I propagated to nearly all Makefiles.am on Saturday Daniel
* //Makefile.am : fixed an error I propagated to nearly all
  Makefiles.am on Saturday
Daniel
2001-08-21 11:18:24 +00:00
Daniel Veillard
d025723434 use xmlXPathIsNaN() and xmlXPathIsInf() tag a potential threading problem.
* libexslt/math.c libxslt/numbers.c: use xmlXPathIsNaN() and
  xmlXPathIsInf()
* libxslt/pattern.c: tag a potential threading problem.
Daniel
2001-08-21 11:11:21 +00:00
Daniel Veillard
7b60042845 fixed a serious proble is node-set was called on a nodeset fixed the rule
* libxslt/extra.c: fixed a serious proble is node-set was called
  on a nodeset
* tests//*/Makefile.am: fixed the rule to rebuild xsltproc
Daniel
2001-07-30 13:47:26 +00:00
Daniel Veillard
a476e34b2e Integrating EXSLT and cleanup:
* Makefile.am configure.in libexslt/Makefile.am:
  Integration of libexslt in the build system
* libxslt/Makefile.am libxslt/xsltproc.c libxslt/xsltutils.c
  xsltproc/Makefile.am xsltproc/xsltproc.c:
  Moved xsltproc to a separate directory, linked it to libexslt,
  and added exslt version reports to -V
* tests/*/Makefile.am: updated the path to xsltproc
* libexslt/common.c libexslt/exslt.h libexslt/exsltconfig.h.in
  libexslt/functions.c libexslt/math.c libexslt/sets.c: added
  versionning informations, some cleanup, and added documentation
  to a couple of exported functions
Daniel
2001-07-15 18:30:53 +00:00
Daniel Veillard
15ea351154 updated do not dump document for which there have been no generated
* FEATURES: updated
* libxslt/xsltutils.c: do not dump document for which there have
  been no generated content
* tests/multiple/result.xml tests/namespaces/extra2.out: fixed
  test output accordingly
* libxslt/transform.c libxslt/preproc.c: added xsl:fallback support
* tests/REC/Makefile.am tests/REC/test-15-1.*: xsl:fallback test
* tests/xmlspec/Makefile.am tests/docbook/Makefile.am: cleanups
Daniel
2001-07-05 08:59:37 +00:00
Daniel Veillard
599b6b9743 Lots of cleanup work toward betted multiple document output handling:
* libxslt/transform.[ch] libxslt/xslt.c libxslt/xsltInternals.h:
  added a new interface xsltRunStylesheet() for a more flexible
  handling of the output and trying to adhere to xsl:document
  filename generation semantic if one knows the URL of the output,
  also add IObuf capacity and SAX for output but is currently not
  implemented.
* libxslt/xsltproc.c: added a -o or --output filename argument
  to test xsltRunStylesheet() or provide a base when generating
  multiple outputs
* tests/docbook/Makefile.am tests/docbook/result/xtchunk/html/*:
  updated tests to add DocBook xt:document based chunking
* tests/multiple/Makefile.am: cleaned up the makefile a bit
* tests/multiple/out/*.html: the new xt:document now generate
  the DOCTYPE if available as is the case for HTML
Daniel
2001-06-25 10:58:40 +00:00
Daniel Veillard
bf7c97febe Don't bother me with generated files, Daniel 2001-06-22 14:36:47 +00:00
Daniel Veillard
134706d5da Removed the result of the multiple tests, it's generated stuff, Daniel 2001-06-22 14:35:03 +00:00
ÉRDI Gergo
b58357db78 Adding generated files to .cvsignore -- Hope you don't mind, Daniel 2001-06-18 21:02:58 +00:00
Daniel Veillard
d4ab0d4a43 - tests/documents/Makefile.am tests/general/Makefile.am
tests/multiple/Makefile.am tests/namespaces/Makefile.am
  tests/numbers/Makefile.am tests/xmlspec/Makefile.am
  tests/REC/Makefile.am tests/REC1/Makefile.am tests/REC2/Makefile.am
  tests/XSLTMark/Makefile.am tests/docbook/Makefile.am
  configure.in: Makefiles cleanup from Joe Orton
Daniel
2001-05-20 18:57:32 +00:00
Daniel Veillard
0643448255 - tests/documents/Makefile.am tests/general/Makefile.am
tests/multiple/Makefile.am tests/namespaces/Makefile.am
  tests/numbers/Makefile.am tests/xmlspec/Makefile.am:
  Seems some of the changes I made for 0.9.0 Makefiles were
  not commited ...
Daniel
2001-05-19 16:06:21 +00:00
Daniel Veillard
2cefd348e0 oh my god, most of the HTML output were fucked an I never
noticed !
- tests/docbook/result/html/* tests/general/bug-11-.out
  tests/multiple/result.xml tests/XSLTMark/*.out
  libxslt/transform.c: all the PUBLIC and SYSTEM IDs
  were swapped
Daniel
2001-05-04 18:14:17 +00:00
Daniel Veillard
3b126325ee Fixed a couple of reported packaging bugs:
- tests/multiple/makefile.am: fixing #54015
- tests/XSLTMark/makefile.am tests/docbook/makefile.am: fixing #54014
  and a similar problem for the docbook tests
Daniel
2001-05-02 09:15:02 +00:00
Daniel Veillard
3d65ba4ae6 - tests/general/bug-5-.out tests/multiple/out/*.orig
tests/xmlspec/REC-xml-20001006*.html: fixed the test output
  following the libxml changes
Daniel
2001-04-18 13:26:25 +00:00
Daniel Veillard
42e81556a0 - libxslt/functions.c: applied TOM's patch to key()
- tests/XSLTMark/chart.out tests/XSLTMark/dbonerow.out
  tests/XSLTMark/prettyprint.out tests/multiple/out/*.html:
  small HTML output change
Daniel
2001-04-18 10:27:05 +00:00
Daniel Veillard
fb0a57cf03 Jumbo patch, extended regression tests and fixed regression results:
- configure.in tests/Makefile.am tests/XSLTMark/* tests/multiple:
  added the XSLTMark in the regression tests as well as multiple
  output test from Ankh
- libxslt/functions.c libxslt/keys.c libxslt/transform.c
  libxslt/variables.c libxslt/xsltutils.c: applied William M. Brack
  patches and fixed a memory leak
- tests/docbook/result/html/*.html : updated the results after
  William's patch
- tests/xmlspec/REC-xml-20001006-review.html
  tests/xmlspec/REC-xml-20001006.html: libxml now don't invent
  an HTML doctype when serializing HTML result, but adds the
  encoding in ALT
Daniel
2001-04-02 15:13:28 +00:00
Daniel Veillard
039f7e40c3 Applied small but significant fix:
- libxslt/transform.c: applied fix to xsltApplyTemplates from
  William M. Brack
- test/docbook/result/html/*.html: this change the output
- tests/xmlspec/REC-xml-20001006-review.html
  tests/xmlspec/REC-xml-20001006.html: this also fixed some of
  the reference anchors generated for the XML spec
Daniel
2001-03-29 08:28:31 +00:00