Lines Matching refs:log
260 static void qpTestLog_flushFile (qpTestLog* log) in qpTestLog_flushFile() argument
262 DE_ASSERT(log && log->outputFile); in qpTestLog_flushFile()
263 fflush(log->outputFile); in qpTestLog_flushFile()
266 FlushFileBuffers((HANDLE)_get_osfhandle(_fileno(log->outputFile))); in qpTestLog_flushFile()
302 static deBool endSession (qpTestLog* log) in endSession() argument
304 DE_ASSERT(log && log->isSessionOpen); in endSession()
307 qpXmlWriter_flush(log->writer); in endSession()
310 fprintf(log->outputFile, "\n#endSession\n"); in endSession()
311 qpTestLog_flushFile(log); in endSession()
313 log->isSessionOpen = DE_FALSE; in endSession()
325 qpTestLog* log = (qpTestLog*)deCalloc(sizeof(qpTestLog)); in qpTestLog_createFileLog() local
326 if (!log) in qpTestLog_createFileLog()
332 ContainerStack_reset(&log->containerStack); in qpTestLog_createFileLog()
339 log->outputFile = fopen(fileName, "wb"); in qpTestLog_createFileLog()
340 if (!log->outputFile) in qpTestLog_createFileLog()
343 qpTestLog_destroy(log); in qpTestLog_createFileLog()
347 log->flags = flags; in qpTestLog_createFileLog()
348 log->writer = qpXmlWriter_createFileWriter(log->outputFile, 0, !(flags & QP_TEST_LOG_NO_FLUSH)); in qpTestLog_createFileLog()
349 log->lock = deMutex_create(DE_NULL); in qpTestLog_createFileLog()
350 log->isSessionOpen = DE_FALSE; in qpTestLog_createFileLog()
351 log->isCaseOpen = DE_FALSE; in qpTestLog_createFileLog()
353 if (!log->writer) in qpTestLog_createFileLog()
356 qpTestLog_destroy(log); in qpTestLog_createFileLog()
360 if (!log->lock) in qpTestLog_createFileLog()
363 qpTestLog_destroy(log); in qpTestLog_createFileLog()
367 return log; in qpTestLog_createFileLog()
375 deBool qpTestLog_beginSession(qpTestLog* log, const char* additionalSessionInfo) in qpTestLog_beginSession() argument
377 DE_ASSERT(log); in qpTestLog_beginSession()
380 if (log->isSessionOpen) in qpTestLog_beginSession()
384 fprintf(log->outputFile, "#sessionInfo releaseName %s\n", qpGetReleaseName()); in qpTestLog_beginSession()
385 fprintf(log->outputFile, "#sessionInfo releaseId 0x%08x\n", qpGetReleaseId()); in qpTestLog_beginSession()
386 fprintf(log->outputFile, "#sessionInfo targetName \"%s\"\n", qpGetTargetName()); in qpTestLog_beginSession()
389 fprintf(log->outputFile, "%s\n", additionalSessionInfo); in qpTestLog_beginSession()
392 fprintf(log->outputFile, "#beginSession\n"); in qpTestLog_beginSession()
393 qpTestLog_flushFile(log); in qpTestLog_beginSession()
395 log->isSessionOpen = DE_TRUE; in qpTestLog_beginSession()
404 void qpTestLog_destroy (qpTestLog* log) in qpTestLog_destroy() argument
406 DE_ASSERT(log); in qpTestLog_destroy()
408 if (log->isSessionOpen) in qpTestLog_destroy()
409 endSession(log); in qpTestLog_destroy()
411 if (log->writer) in qpTestLog_destroy()
412 qpXmlWriter_destroy(log->writer); in qpTestLog_destroy()
414 if (log->outputFile) in qpTestLog_destroy()
415 fclose(log->outputFile); in qpTestLog_destroy()
417 if (log->lock) in qpTestLog_destroy()
418 deMutex_destroy(log->lock); in qpTestLog_destroy()
420 deFree(log); in qpTestLog_destroy()
430 deBool qpTestLog_startCase (qpTestLog* log, const char* testCasePath, qpTestCaseType testCaseType) in qpTestLog_startCase() argument
436 DE_ASSERT(log && testCasePath && (testCasePath[0] != 0)); in qpTestLog_startCase()
437 deMutex_lock(log->lock); in qpTestLog_startCase()
439 DE_ASSERT(!log->isCaseOpen); in qpTestLog_startCase()
440 DE_ASSERT(ContainerStack_isEmpty(&log->containerStack)); in qpTestLog_startCase()
443 qpXmlWriter_flush(log->writer); in qpTestLog_startCase()
444 fprintf(log->outputFile, "\n#beginTestCaseResult %s\n", testCasePath); in qpTestLog_startCase()
445 if (!(log->flags & QP_TEST_LOG_NO_FLUSH)) in qpTestLog_startCase()
446 qpTestLog_flushFile(log); in qpTestLog_startCase()
448 log->isCaseOpen = DE_TRUE; in qpTestLog_startCase()
455 if (!qpXmlWriter_startDocument(log->writer) || in qpTestLog_startCase()
456 !qpXmlWriter_startElement(log->writer, "TestCaseResult", numResultAttribs, resultAttribs)) in qpTestLog_startCase()
459 deMutex_unlock(log->lock); in qpTestLog_startCase()
463 deMutex_unlock(log->lock); in qpTestLog_startCase()
474 deBool qpTestLog_endCase (qpTestLog* log, qpTestResult result, const char* resultDetails) in qpTestLog_endCase() argument
479 deMutex_lock(log->lock); in qpTestLog_endCase()
481 DE_ASSERT(log->isCaseOpen); in qpTestLog_endCase()
482 DE_ASSERT(ContainerStack_isEmpty(&log->containerStack)); in qpTestLog_endCase()
487 if (!qpXmlWriter_startElement(log->writer, "Result", 1, &statusAttrib) || in qpTestLog_endCase()
488 (resultDetails && !qpXmlWriter_writeString(log->writer, resultDetails)) || in qpTestLog_endCase()
489 !qpXmlWriter_endElement(log->writer, "Result") || in qpTestLog_endCase()
490 !qpXmlWriter_endElement(log->writer, "TestCaseResult") || in qpTestLog_endCase()
491 !qpXmlWriter_endDocument(log->writer)) /* Close any XML elements still open */ in qpTestLog_endCase()
494 deMutex_unlock(log->lock); in qpTestLog_endCase()
499 qpXmlWriter_flush(log->writer); in qpTestLog_endCase()
500 fprintf(log->outputFile, "\n#endTestCaseResult\n"); in qpTestLog_endCase()
501 if (!(log->flags & QP_TEST_LOG_NO_FLUSH)) in qpTestLog_endCase()
502 qpTestLog_flushFile(log); in qpTestLog_endCase()
504 log->isCaseOpen = DE_FALSE; in qpTestLog_endCase()
506 deMutex_unlock(log->lock); in qpTestLog_endCase()
510 deBool qpTestLog_startTestsCasesTime (qpTestLog* log) in qpTestLog_startTestsCasesTime() argument
512 DE_ASSERT(log); in qpTestLog_startTestsCasesTime()
513 deMutex_lock(log->lock); in qpTestLog_startTestsCasesTime()
516 qpXmlWriter_flush(log->writer); in qpTestLog_startTestsCasesTime()
517 fprintf(log->outputFile, "\n#beginTestsCasesTime\n"); in qpTestLog_startTestsCasesTime()
519 log->isCaseOpen = DE_TRUE; in qpTestLog_startTestsCasesTime()
521 if (!qpXmlWriter_startDocument(log->writer) || in qpTestLog_startTestsCasesTime()
522 !qpXmlWriter_startElement(log->writer, "TestsCasesTime", 0, (const qpXmlAttribute*)DE_NULL)) in qpTestLog_startTestsCasesTime()
525 deMutex_unlock(log->lock); in qpTestLog_startTestsCasesTime()
529 deMutex_unlock(log->lock); in qpTestLog_startTestsCasesTime()
533 deBool qpTestLog_endTestsCasesTime (qpTestLog* log) in qpTestLog_endTestsCasesTime() argument
535 DE_ASSERT(log); in qpTestLog_endTestsCasesTime()
536 deMutex_lock(log->lock); in qpTestLog_endTestsCasesTime()
538 DE_ASSERT(log->isCaseOpen); in qpTestLog_endTestsCasesTime()
540 if (!qpXmlWriter_endElement(log->writer, "TestsCasesTime") || in qpTestLog_endTestsCasesTime()
541 !qpXmlWriter_endDocument(log->writer)) in qpTestLog_endTestsCasesTime()
544 deMutex_unlock(log->lock); in qpTestLog_endTestsCasesTime()
548 qpXmlWriter_flush(log->writer); in qpTestLog_endTestsCasesTime()
550 fprintf(log->outputFile, "\n#endTestsCasesTime\n"); in qpTestLog_endTestsCasesTime()
552 log->isCaseOpen = DE_FALSE; in qpTestLog_endTestsCasesTime()
554 deMutex_unlock(log->lock); in qpTestLog_endTestsCasesTime()
565 deBool qpTestLog_terminateCase (qpTestLog* log, qpTestResult result) in qpTestLog_terminateCase() argument
569 DE_ASSERT(log); in qpTestLog_terminateCase()
572 deMutex_lock(log->lock); in qpTestLog_terminateCase()
574 if (!log->isCaseOpen) in qpTestLog_terminateCase()
576 deMutex_unlock(log->lock); in qpTestLog_terminateCase()
581 qpXmlWriter_flush(log->writer); in qpTestLog_terminateCase()
582 fprintf(log->outputFile, "\n#terminateTestCaseResult %s\n", resultStr); in qpTestLog_terminateCase()
583 qpTestLog_flushFile(log); in qpTestLog_terminateCase()
585 log->isCaseOpen = DE_FALSE; in qpTestLog_terminateCase()
588 ContainerStack_reset(&log->containerStack); in qpTestLog_terminateCase()
591 deMutex_unlock(log->lock); in qpTestLog_terminateCase()
595 static deBool qpTestLog_writeKeyValuePair (qpTestLog* log, const char* elementName, const char* nam… in qpTestLog_writeKeyValuePair() argument
601 DE_ASSERT(log && elementName && text); in qpTestLog_writeKeyValuePair()
602 deMutex_lock(log->lock); in qpTestLog_writeKeyValuePair()
610 if (!qpXmlWriter_startElement(log->writer, elementName, numAttribs, attribs) || in qpTestLog_writeKeyValuePair()
611 !qpXmlWriter_writeString(log->writer, text) || in qpTestLog_writeKeyValuePair()
612 !qpXmlWriter_endElement(log->writer, elementName)) in qpTestLog_writeKeyValuePair()
615 deMutex_unlock(log->lock); in qpTestLog_writeKeyValuePair()
619 deMutex_unlock(log->lock); in qpTestLog_writeKeyValuePair()
632 deBool qpTestLog_writeText (qpTestLog* log, const char* name, const char* description, qpKeyValueTa… in qpTestLog_writeText() argument
635 return qpTestLog_writeKeyValuePair(log, "Text", name, description, DE_NULL, tag, text); in qpTestLog_writeText()
647 deBool qpTestLog_writeInteger (qpTestLog* log, const char* name, const char* description, const cha… in qpTestLog_writeInteger() argument
653 return qpTestLog_writeKeyValuePair(log, "Number", name, description, unit, tag, tmpString); in qpTestLog_writeInteger()
665 deBool qpTestLog_writeFloat (qpTestLog* log, const char* name, const char* description, const char*… in qpTestLog_writeFloat() argument
671 return qpTestLog_writeKeyValuePair(log, "Number", name, description, unit, tag, tmpString); in qpTestLog_writeFloat()
816 deBool qpTestLog_startImageSet (qpTestLog* log, const char* name, const char* description) in qpTestLog_startImageSet() argument
821 DE_ASSERT(log && name); in qpTestLog_startImageSet()
822 deMutex_lock(log->lock); in qpTestLog_startImageSet()
829 if (!qpXmlWriter_startElement(log->writer, "ImageSet", numAttribs, attribs)) in qpTestLog_startImageSet()
832 deMutex_unlock(log->lock); in qpTestLog_startImageSet()
836 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_IMAGESET)); in qpTestLog_startImageSet()
838 deMutex_unlock(log->lock); in qpTestLog_startImageSet()
847 deBool qpTestLog_endImageSet (qpTestLog* log) in qpTestLog_endImageSet() argument
849 DE_ASSERT(log); in qpTestLog_endImageSet()
850 deMutex_lock(log->lock); in qpTestLog_endImageSet()
853 if (!qpXmlWriter_endElement(log->writer, "ImageSet")) in qpTestLog_endImageSet()
856 deMutex_unlock(log->lock); in qpTestLog_endImageSet()
860 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_IMAGESET); in qpTestLog_endImageSet()
862 deMutex_unlock(log->lock); in qpTestLog_endImageSet()
880 qpTestLog* log, in qpTestLog_writeImage() argument
898 DE_ASSERT(log && name); in qpTestLog_writeImage()
903 if (log->flags & QP_TEST_LOG_EXCLUDE_IMAGES) in qpTestLog_writeImage()
991 deMutex_lock(log->lock); in qpTestLog_writeImage()
994 if (!qpXmlWriter_startElement(log->writer, "Image", numAttribs, attribs) || in qpTestLog_writeImage()
995 !qpXmlWriter_writeBase64(log->writer, (const deUint8*)writeDataPtr, writeDataBytes) || in qpTestLog_writeImage()
996 !qpXmlWriter_endElement(log->writer, "Image")) in qpTestLog_writeImage()
999 deMutex_unlock(log->lock); in qpTestLog_writeImage()
1004 deMutex_unlock(log->lock); in qpTestLog_writeImage()
1018 deBool qpTestLog_writeInfoLog (qpTestLog* log, const char* infoLog) in qpTestLog_writeInfoLog() argument
1023 if (infoLog[0] == '\0' && (log->flags & QP_TEST_LOG_EXCLUDE_EMPTY_LOGINFO) != 0) in qpTestLog_writeInfoLog()
1026 return qpXmlWriter_writeStringElement(log->writer, "InfoLog", infoLog); in qpTestLog_writeInfoLog()
1034 deBool qpTestLog_startShaderProgram (qpTestLog* log, deBool linkOk, const char* linkInfoLog) in qpTestLog_startShaderProgram() argument
1039 DE_ASSERT(log); in qpTestLog_startShaderProgram()
1040 deMutex_lock(log->lock); in qpTestLog_startShaderProgram()
1044 if (!qpXmlWriter_startElement(log->writer, "ShaderProgram", numProgramAttribs, programAttribs) || in qpTestLog_startShaderProgram()
1045 !qpTestLog_writeInfoLog(log, linkInfoLog)) in qpTestLog_startShaderProgram()
1048 deMutex_unlock(log->lock); in qpTestLog_startShaderProgram()
1052 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SHADERPROGRAM)); in qpTestLog_startShaderProgram()
1054 deMutex_unlock(log->lock); in qpTestLog_startShaderProgram()
1063 deBool qpTestLog_endShaderProgram (qpTestLog* log) in qpTestLog_endShaderProgram() argument
1065 DE_ASSERT(log); in qpTestLog_endShaderProgram()
1066 deMutex_lock(log->lock); in qpTestLog_endShaderProgram()
1069 if (!qpXmlWriter_endElement(log->writer, "ShaderProgram")) in qpTestLog_endShaderProgram()
1072 deMutex_unlock(log->lock); in qpTestLog_endShaderProgram()
1076 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SHADERPROGRAM); in qpTestLog_endShaderProgram()
1078 deMutex_unlock(log->lock); in qpTestLog_endShaderProgram()
1089 deBool qpTestLog_writeShader (qpTestLog* log, qpShaderType type, const char* source, deBool compile… in qpTestLog_writeShader() argument
1092 …const char* sourceStr = ((log->flags & QP_TEST_LOG_EXCLUDE_SHADER_SOURCES) == 0 || !compileOk) … in qpTestLog_writeShader()
1096 deMutex_lock(log->lock); in qpTestLog_writeShader()
1099 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SHADERPROGRAM); in qpTestLog_writeShader()
1103 if (!qpXmlWriter_startElement(log->writer, tagName, numShaderAttribs, shaderAttribs) || in qpTestLog_writeShader()
1104 !qpXmlWriter_writeStringElement(log->writer, "ShaderSource", sourceStr) || in qpTestLog_writeShader()
1105 !qpTestLog_writeInfoLog(log, infoLog) || in qpTestLog_writeShader()
1106 !qpXmlWriter_endElement(log->writer, tagName)) in qpTestLog_writeShader()
1109 deMutex_unlock(log->lock); in qpTestLog_writeShader()
1113 deMutex_unlock(log->lock); in qpTestLog_writeShader()
1120 deBool qpTestLog_startEglConfigSet (qpTestLog* log, const char* name, const char* description) in qpTestLog_startEglConfigSet() argument
1125 DE_ASSERT(log && name); in qpTestLog_startEglConfigSet()
1126 deMutex_lock(log->lock); in qpTestLog_startEglConfigSet()
1133 if (!qpXmlWriter_startElement(log->writer, "EglConfigSet", numAttribs, attribs)) in qpTestLog_startEglConfigSet()
1136 deMutex_unlock(log->lock); in qpTestLog_startEglConfigSet()
1140 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_EGLCONFIGSET)); in qpTestLog_startEglConfigSet()
1142 deMutex_unlock(log->lock); in qpTestLog_startEglConfigSet()
1149 deBool qpTestLog_endEglConfigSet (qpTestLog* log) in qpTestLog_endEglConfigSet() argument
1151 DE_ASSERT(log); in qpTestLog_endEglConfigSet()
1152 deMutex_lock(log->lock); in qpTestLog_endEglConfigSet()
1155 if (!qpXmlWriter_endElement(log->writer, "EglConfigSet")) in qpTestLog_endEglConfigSet()
1158 deMutex_unlock(log->lock); in qpTestLog_endEglConfigSet()
1162 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_EGLCONFIGSET); in qpTestLog_endEglConfigSet()
1164 deMutex_unlock(log->lock); in qpTestLog_endEglConfigSet()
1172 deBool qpTestLog_writeEglConfig (qpTestLog* log, const qpEglConfigInfo* config) in qpTestLog_writeEglConfig() argument
1177 DE_ASSERT(log && config); in qpTestLog_writeEglConfig()
1178 deMutex_lock(log->lock); in qpTestLog_writeEglConfig()
1212 if (!qpXmlWriter_startElement(log->writer, "EglConfig", numAttribs, attribs) || in qpTestLog_writeEglConfig()
1213 !qpXmlWriter_endElement(log->writer, "EglConfig")) in qpTestLog_writeEglConfig()
1216 deMutex_unlock(log->lock); in qpTestLog_writeEglConfig()
1220 deMutex_unlock(log->lock); in qpTestLog_writeEglConfig()
1231 deBool qpTestLog_startSection (qpTestLog* log, const char* name, const char* description) in qpTestLog_startSection() argument
1236 DE_ASSERT(log && name); in qpTestLog_startSection()
1237 deMutex_lock(log->lock); in qpTestLog_startSection()
1244 if (!qpXmlWriter_startElement(log->writer, "Section", numAttribs, attribs)) in qpTestLog_startSection()
1247 deMutex_unlock(log->lock); in qpTestLog_startSection()
1251 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SECTION)); in qpTestLog_startSection()
1253 deMutex_unlock(log->lock); in qpTestLog_startSection()
1262 deBool qpTestLog_endSection (qpTestLog* log) in qpTestLog_endSection() argument
1264 DE_ASSERT(log); in qpTestLog_endSection()
1265 deMutex_lock(log->lock); in qpTestLog_endSection()
1268 if (!qpXmlWriter_endElement(log->writer, "Section")) in qpTestLog_endSection()
1271 deMutex_unlock(log->lock); in qpTestLog_endSection()
1275 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SECTION); in qpTestLog_endSection()
1277 deMutex_unlock(log->lock); in qpTestLog_endSection()
1284 deBool qpTestLog_writeKernelSource (qpTestLog* log, const char* source) in qpTestLog_writeKernelSource() argument
1286 const char* sourceStr = (log->flags & QP_TEST_LOG_EXCLUDE_SHADER_SOURCES) != 0 ? "" : source; in qpTestLog_writeKernelSource()
1288 DE_ASSERT(log); in qpTestLog_writeKernelSource()
1289 deMutex_lock(log->lock); in qpTestLog_writeKernelSource()
1291 if (!qpXmlWriter_writeStringElement(log->writer, "KernelSource", sourceStr)) in qpTestLog_writeKernelSource()
1294 deMutex_unlock(log->lock); in qpTestLog_writeKernelSource()
1298 deMutex_unlock(log->lock); in qpTestLog_writeKernelSource()
1305 deBool qpTestLog_writeSpirVAssemblySource (qpTestLog* log, const char* source) in qpTestLog_writeSpirVAssemblySource() argument
1307 const char* const sourceStr = (log->flags & QP_TEST_LOG_EXCLUDE_SHADER_SOURCES) != 0 ? "" : source; in qpTestLog_writeSpirVAssemblySource()
1309 deMutex_lock(log->lock); in qpTestLog_writeSpirVAssemblySource()
1311 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SHADERPROGRAM); in qpTestLog_writeSpirVAssemblySource()
1313 if (!qpXmlWriter_writeStringElement(log->writer, "SpirVAssemblySource", sourceStr)) in qpTestLog_writeSpirVAssemblySource()
1316 deMutex_unlock(log->lock); in qpTestLog_writeSpirVAssemblySource()
1320 deMutex_unlock(log->lock); in qpTestLog_writeSpirVAssemblySource()
1327 deBool qpTestLog_writeCompileInfo (qpTestLog* log, const char* name, const char* description, deBoo… in qpTestLog_writeCompileInfo() argument
1332 DE_ASSERT(log && name && description && infoLog); in qpTestLog_writeCompileInfo()
1333 deMutex_lock(log->lock); in qpTestLog_writeCompileInfo()
1339 if (!qpXmlWriter_startElement(log->writer, "CompileInfo", numAttribs, attribs) || in qpTestLog_writeCompileInfo()
1340 !qpTestLog_writeInfoLog(log, infoLog) || in qpTestLog_writeCompileInfo()
1341 !qpXmlWriter_endElement(log->writer, "CompileInfo")) in qpTestLog_writeCompileInfo()
1344 deMutex_unlock(log->lock); in qpTestLog_writeCompileInfo()
1348 deMutex_unlock(log->lock); in qpTestLog_writeCompileInfo()
1352 deBool qpTestLog_startSampleList (qpTestLog* log, const char* name, const char* description) in qpTestLog_startSampleList() argument
1357 DE_ASSERT(log && name && description); in qpTestLog_startSampleList()
1358 deMutex_lock(log->lock); in qpTestLog_startSampleList()
1363 if (!qpXmlWriter_startElement(log->writer, "SampleList", numAttribs, attribs)) in qpTestLog_startSampleList()
1366 deMutex_unlock(log->lock); in qpTestLog_startSampleList()
1370 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SAMPLELIST)); in qpTestLog_startSampleList()
1372 deMutex_unlock(log->lock); in qpTestLog_startSampleList()
1376 deBool qpTestLog_startSampleInfo (qpTestLog* log) in qpTestLog_startSampleInfo() argument
1378 DE_ASSERT(log); in qpTestLog_startSampleInfo()
1379 deMutex_lock(log->lock); in qpTestLog_startSampleInfo()
1381 if (!qpXmlWriter_startElement(log->writer, "SampleInfo", 0, DE_NULL)) in qpTestLog_startSampleInfo()
1384 deMutex_unlock(log->lock); in qpTestLog_startSampleInfo()
1388 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SAMPLEINFO)); in qpTestLog_startSampleInfo()
1390 deMutex_unlock(log->lock); in qpTestLog_startSampleInfo()
1394 deBool qpTestLog_writeValueInfo (qpTestLog* log, const char* name, const char* description, const c… in qpTestLog_writeValueInfo() argument
1400 DE_ASSERT(log && name && description && tagName); in qpTestLog_writeValueInfo()
1401 deMutex_lock(log->lock); in qpTestLog_writeValueInfo()
1403 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SAMPLEINFO); in qpTestLog_writeValueInfo()
1412 if (!qpXmlWriter_startElement(log->writer, "ValueInfo", numAttribs, attribs) || in qpTestLog_writeValueInfo()
1413 !qpXmlWriter_endElement(log->writer, "ValueInfo")) in qpTestLog_writeValueInfo()
1416 deMutex_unlock(log->lock); in qpTestLog_writeValueInfo()
1420 deMutex_unlock(log->lock); in qpTestLog_writeValueInfo()
1424 deBool qpTestLog_endSampleInfo (qpTestLog* log) in qpTestLog_endSampleInfo() argument
1426 DE_ASSERT(log); in qpTestLog_endSampleInfo()
1427 deMutex_lock(log->lock); in qpTestLog_endSampleInfo()
1429 if (!qpXmlWriter_endElement(log->writer, "SampleInfo")) in qpTestLog_endSampleInfo()
1432 deMutex_unlock(log->lock); in qpTestLog_endSampleInfo()
1436 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SAMPLEINFO); in qpTestLog_endSampleInfo()
1438 deMutex_unlock(log->lock); in qpTestLog_endSampleInfo()
1442 deBool qpTestLog_startSample (qpTestLog* log) in qpTestLog_startSample() argument
1444 DE_ASSERT(log); in qpTestLog_startSample()
1445 deMutex_lock(log->lock); in qpTestLog_startSample()
1447 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SAMPLELIST); in qpTestLog_startSample()
1449 if (!qpXmlWriter_startElement(log->writer, "Sample", 0, DE_NULL)) in qpTestLog_startSample()
1452 deMutex_unlock(log->lock); in qpTestLog_startSample()
1456 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SAMPLE)); in qpTestLog_startSample()
1458 deMutex_unlock(log->lock); in qpTestLog_startSample()
1462 deBool qpTestLog_writeValueFloat (qpTestLog* log, double value) in qpTestLog_writeValueFloat() argument
1467 deMutex_lock(log->lock); in qpTestLog_writeValueFloat()
1469 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SAMPLE); in qpTestLog_writeValueFloat()
1471 if (!qpXmlWriter_writeStringElement(log->writer, "Value", &tmpString[0])) in qpTestLog_writeValueFloat()
1474 deMutex_unlock(log->lock); in qpTestLog_writeValueFloat()
1478 deMutex_unlock(log->lock); in qpTestLog_writeValueFloat()
1482 deBool qpTestLog_writeValueInteger (qpTestLog* log, deInt64 value) in qpTestLog_writeValueInteger() argument
1487 deMutex_lock(log->lock); in qpTestLog_writeValueInteger()
1489 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SAMPLE); in qpTestLog_writeValueInteger()
1491 if (!qpXmlWriter_writeStringElement(log->writer, "Value", &tmpString[0])) in qpTestLog_writeValueInteger()
1494 deMutex_unlock(log->lock); in qpTestLog_writeValueInteger()
1498 deMutex_unlock(log->lock); in qpTestLog_writeValueInteger()
1502 deBool qpTestLog_endSample (qpTestLog* log) in qpTestLog_endSample() argument
1504 DE_ASSERT(log); in qpTestLog_endSample()
1505 deMutex_lock(log->lock); in qpTestLog_endSample()
1507 if (!qpXmlWriter_endElement(log->writer, "Sample")) in qpTestLog_endSample()
1510 deMutex_unlock(log->lock); in qpTestLog_endSample()
1514 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SAMPLE); in qpTestLog_endSample()
1516 deMutex_unlock(log->lock); in qpTestLog_endSample()
1520 deBool qpTestLog_endSampleList (qpTestLog* log) in qpTestLog_endSampleList() argument
1522 DE_ASSERT(log); in qpTestLog_endSampleList()
1523 deMutex_lock(log->lock); in qpTestLog_endSampleList()
1525 if (!qpXmlWriter_endElement(log->writer, "SampleList")) in qpTestLog_endSampleList()
1528 deMutex_unlock(log->lock); in qpTestLog_endSampleList()
1532 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SAMPLELIST); in qpTestLog_endSampleList()
1534 deMutex_unlock(log->lock); in qpTestLog_endSampleList()
1538 deBool qpTestLog_writeRaw(qpTestLog* log, const char* rawContents) in qpTestLog_writeRaw() argument
1540 DE_ASSERT(log); in qpTestLog_writeRaw()
1542 fseek(log->outputFile, 0, SEEK_END); in qpTestLog_writeRaw()
1543 fprintf(log->outputFile, "%s", rawContents); in qpTestLog_writeRaw()
1544 if (!(log->flags & QP_TEST_LOG_NO_FLUSH)) in qpTestLog_writeRaw()
1545 qpTestLog_flushFile(log); in qpTestLog_writeRaw()
1550 deUint32 qpTestLog_getLogFlags (const qpTestLog* log) in qpTestLog_getLogFlags() argument
1552 DE_ASSERT(log); in qpTestLog_getLogFlags()
1553 return log->flags; in qpTestLog_getLogFlags()