Verification; Fix testing

This commit is contained in:
Daniel Marjamäki 2019-12-28 22:09:16 +01:00
parent ad8bedebd7
commit d16ea3293e
2 changed files with 7 additions and 6 deletions

View File

@ -195,8 +195,7 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
else if (std::strncmp(argv[i], "--verify-report=", 16) == 0) {
mSettings->verification = true;
mSettings->verificationReport = argv[i] + 16;
}
else if (std::strcmp(argv[i], "--debug-verify") == 0)
} else if (std::strcmp(argv[i], "--debug-verify") == 0)
mSettings->debugVerification = true;
// Enforce language (--language=, -x)

View File

@ -1579,13 +1579,15 @@ void ExprEngine::executeFunction(const Scope *functionScope, const Tokenizer *to
call(callbacks, tok, bailoutValue, &data);
}
if (settings->debugVerification && !trackExecution.isAllOk()) {
if (settings->debugVerification && (callbacks.empty() || !trackExecution.isAllOk())) {
if (!settings->verificationReport.empty())
report << "[debug]" << std::endl;
trackExecution.print(report);
if (!settings->verificationReport.empty())
report << "[details]" << std::endl;
trackExecution.report(report, functionScope);
if (!callbacks.empty()) {
if (!settings->verificationReport.empty())
report << "[details]" << std::endl;
trackExecution.report(report, functionScope);
}
}
// Write a verification report