Select Git revision
runxmlconf.c
-
Nick Wellnhofer authored
There's no simple way to make the doc/examples tests handle different configurations. But these tests aren't especially valuable, so remove the result file checks.
Nick Wellnhofer authoredThere's no simple way to make the doc/examples tests handle different configurations. But these tests aren't especially valuable, so remove the result file checks.
runxmlconf.c 15.89 KiB
/*
* runxmlconf.c: C program to run XML W3C conformance testsuites
*
* See Copyright for the status of this software.
*
* daniel@veillard.com
*/
#include "libxml.h"
#include <stdio.h>
#ifdef LIBXML_XPATH_ENABLED
#if !defined(_WIN32)
#include <unistd.h>
#endif
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/tree.h>
#include <libxml/uri.h>
#include <libxml/xmlreader.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#define LOGFILE "runxmlconf.log"
static FILE *logfile = NULL;
static int verbose = 0;
#define NB_EXPECTED_ERRORS 15
const char *skipped_tests[] = {
/* http://lists.w3.org/Archives/Public/public-xml-testsuite/2008Jul/0000.html */
"rmt-ns10-035",
NULL
};
/************************************************************************
* *
* File name and path utilities *
* *
************************************************************************/
static int checkTestFile(const char *filename) {
struct stat buf;
if (stat(filename, &buf) == -1)
return(0);
#if defined(_WIN32)
if (!(buf.st_mode & _S_IFREG))
return(0);
#else
if (!S_ISREG(buf.st_mode))
return(0);
#endif
return(1);
}
static xmlChar *composeDir(const xmlChar *dir, const xmlChar *path) {
char buf[500];
if (dir == NULL) return(xmlStrdup(path));