summaryrefslogtreecommitdiff
path: root/xsltproc/testThreads.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2009-08-14 09:14:51 +0200
committerDaniel Veillard <veillard@redhat.com>2009-08-14 09:14:51 +0200
commit807fdba3dde9073f177c989ede9ca20c989eddc8 (patch)
treee757c8dc784e8b5d99c8424a2c196b0b3f45a69b /xsltproc/testThreads.c
parentb1c52a885d7d2c2b4db9e9cde97456f626093b7d (diff)
downloadlibxslt-807fdba3dde9073f177c989ede9ca20c989eddc8.tar.gz
libxslt-807fdba3dde9073f177c989ede9ca20c989eddc8.tar.bz2
libxslt-807fdba3dde9073f177c989ede9ca20c989eddc8.zip
Improve testThreads a bit
* xsltproc/testThreads.c: load exslt extensions, the test module and a bit of output
Diffstat (limited to 'xsltproc/testThreads.c')
-rw-r--r--xsltproc/testThreads.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xsltproc/testThreads.c b/xsltproc/testThreads.c
index 6c00ef47..904cda9c 100644
--- a/xsltproc/testThreads.c
+++ b/xsltproc/testThreads.c
@@ -12,6 +12,7 @@
*/
#include "config.h"
+#include "libexslt/exslt.h"
#include <stdlib.h>
#include <stdio.h>
@@ -30,6 +31,7 @@
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
#include <libxslt/extensions.h>
+#include <libexslt/exsltconfig.h>
#include <pthread.h>
#include <string.h>
#if !defined(_MSC_VER)
@@ -179,12 +181,22 @@ main(void)
xmlInitParser();
+ /*
+ * Register the EXSLT extensions and the test module
+ */
+ exsltRegisterAll();
+ xsltRegisterTestModule();
+
+ /*
+ * Register our own extension module
+ */
registerFooModule();
/*
* First pass each thread has its own version of the stylesheet
* each of them will initialize and shutdown the extension
*/
+ printf("Pass 1\n");
for (repeat = 0;repeat < 500;repeat++) {
for (i = 0; i < num_threads; i++) {
results[i] = NULL;
@@ -212,6 +224,7 @@ main(void)
* Second pass all threads share the same stylesheet instance
* look for transformation clashes
*/
+ printf("Pass 2\n");
for (repeat = 0;repeat < 500;repeat++) {
xmlDocPtr style;
xsltStylesheetPtr cur;
@@ -251,6 +264,7 @@ main(void)
xsltCleanupGlobals();
xmlCleanupParser();
xmlMemoryDump();
+ printf("Ok\n");
return (0);
}
#else /* !LIBXML_THREADS_ENABLED | !HAVE_PTHREAD_H */