MCPcopy Create free account
hub / github.com/Kitware/VTK / launchTests

Function launchTests

ThirdParty/libxml2/vtklibxml2/runtest.c:4930–5040  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4928 ************************************************************************/
4929
4930static int
4931launchTests(testDescPtr tst) {
4932 int res = 0, err = 0;
4933 size_t i;
4934 char *result;
4935 char *error;
4936 int mem;
4937 xmlCharEncodingHandlerPtr ebcdicHandler, ibm1141Handler, eucJpHandler;
4938
4939 ebcdicHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_EBCDIC);
4940 ibm1141Handler = xmlFindCharEncodingHandler("IBM-1141");
4941
4942 /*
4943 * When decoding EUC-JP, musl doesn't seem to support 0x8F control
4944 * codes.
4945 */
4946 eucJpHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_EUC_JP);
4947 if (eucJpHandler != NULL) {
4948 xmlBufferPtr in, out;
4949
4950 in = xmlBufferCreateSize(10);
4951 xmlBufferCCat(in, "\x8f\xe9\xae");
4952 out = xmlBufferCreateSize(10);
4953 if (xmlCharEncInFunc(eucJpHandler, out, in) != 3) {
4954 xmlCharEncCloseFunc(eucJpHandler);
4955 eucJpHandler = NULL;
4956 }
4957 xmlBufferFree(out);
4958 xmlBufferFree(in);
4959 }
4960
4961 if (tst == NULL) return(-1);
4962 if (tst->in != NULL) {
4963 glob_t globbuf;
4964
4965 globbuf.gl_offs = 0;
4966 glob(tst->in, GLOB_DOOFFS, NULL, &globbuf);
4967 for (i = 0;i < globbuf.gl_pathc;i++) {
4968 if (!checkTestFile(globbuf.gl_pathv[i]))
4969 continue;
4970 if ((((ebcdicHandler == NULL) || (ibm1141Handler == NULL)) &&
4971 (strstr(globbuf.gl_pathv[i], "ebcdic") != NULL)) ||
4972 ((eucJpHandler == NULL) &&
4973 (strstr(globbuf.gl_pathv[i], "icu_parse_test") != NULL)))
4974 continue;
4975 if (tst->suffix != NULL) {
4976 result = resultFilename(globbuf.gl_pathv[i], tst->out,
4977 tst->suffix);
4978 if (result == NULL) {
4979 fprintf(stderr, "Out of memory !\n");
4980 fatalError();
4981 }
4982 } else {
4983 result = NULL;
4984 }
4985 if (tst->err != NULL) {
4986 error = resultFilename(globbuf.gl_pathv[i], tst->out,
4987 tst->err);

Callers 1

runtestFunction · 0.85

Calls 15

xmlBufferCreateSizeFunction · 0.85
xmlBufferCCatFunction · 0.85
xmlCharEncInFuncFunction · 0.85
xmlCharEncCloseFuncFunction · 0.85
xmlBufferFreeFunction · 0.85
globFunction · 0.85
resultFilenameFunction · 0.85
fprintfFunction · 0.85
xmlMemUsedFunction · 0.85
xmlResetLastErrorFunction · 0.85

Tested by

no test coverage detected