blob: 8d86f2a19ceb0fdbe519f1da7156e5e1308666df [file] [log] [blame]
Daniel Veillard1f33c4d2005-07-10 21:38:31 +00001 README.tests
2
3 Instructions for standalone test regressions of libxml2
4
5libxml2-tests-$version.tar.gz contains 3 standalone C programs as well
6as a large amount of tests and results coming from libxml2 itself and
7from W3C, NIST, Sun Microsystems, Microsoft and James Clark. Each C
8program has a different testing purpose:
9
10 runtest.c : runs libxml2 basic internal regression tests
11 runsuite.c: runs libxml2 against external regression tests
12 testapi.c : exercises the library public entry points
Daniel Veillardabade012008-07-24 15:05:38 +000013 testchar.c: exercise the check of character ranges and UTF-8 validation
Daniel Veillard1f33c4d2005-07-10 21:38:31 +000014
15The command:
16
Daniel Veillard9c56dd02012-05-07 15:23:25 +080017 make check
18or
Daniel Veillardabade012008-07-24 15:05:38 +000019 make -f Makefile.tests check
Daniel Veillard1f33c4d2005-07-10 21:38:31 +000020
21should be sufficient on an Unix system to build and exercise the tests
Daniel Veillardabade012008-07-24 15:05:38 +000022for the version of the library installed on the system. Note however
Daniel Veillard1f33c4d2005-07-10 21:38:31 +000023that there isn't backward compatibility provided so if the installed
Daniel Veillard9c56dd02012-05-07 15:23:25 +080024version is older than the testsuite one, failing to compile or run the tests
Daniel Veillard1f33c4d2005-07-10 21:38:31 +000025is likely. In any event this won't work with an installed libxml2 older
26than 2.6.20.
Daniel Veillard9c56dd02012-05-07 15:23:25 +080027
Daniel Mustielesfabbca82012-03-19 21:42:00 +010028Building on other platforms should be a matter of compiling the C files
Daniel Veillard1f33c4d2005-07-10 21:38:31 +000029like any other program using libxml2, running the test should be done
30simply by launching the resulting executables.
31
Daniel Veillard9c56dd02012-05-07 15:23:25 +080032Also note the availability of a "make valgrind" target which will run the
33above tests under valgrind to check for memory errors (but this relies
34on the availability of the valgrind command and take far more time to
35complete).
36
Daniel Veillard1f33c4d2005-07-10 21:38:31 +000037Daniel Veillard
Daniel Veillard9c56dd02012-05-07 15:23:25 +080038Mon May 7 2012
39