Commit b3247242 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Parse jom errors



Unlike nmake, jom (currently) outputs errors to stderr

Change-Id: I11d679095a0c281fd926e5b8e328a6578f25981e
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 523dbb4f
......@@ -143,6 +143,15 @@ void MsvcParser::stdError(const QString &line)
{
if (processCompileLine(line))
return;
// Jom outputs errors to stderr
if (line.startsWith(QLatin1String("Error:"))) {
m_lastTask = Task(Task::Error,
line.mid(6).trimmed(), /* description */
Utils::FileName(), /* fileName */
-1, /* linenumber */
Constants::TASK_CATEGORY_COMPILE);
return;
}
IOutputParser::stdError(line);
}
......@@ -307,7 +316,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
Utils::FileName::fromUserInput(QLatin1String("debug\\Experimentation.exe")), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("Linker error 3")
QTest::newRow("nmake error")
<< QString::fromLatin1("Error: dependent '..\\..\\..\\..\\creator-2.5\\src\\plugins\\coreplugin\\ifile.h' does not exist.")
<< OutputParserTester::STDOUT
<< QString() << QString()
......@@ -317,6 +327,16 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
Utils::FileName(), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("jom error")
<< QString::fromLatin1("Error: dependent 'main.cpp' does not exist.")
<< OutputParserTester::STDERR
<< QString() << QString()
<< (QList<Task>()
<< Task(Task::Error,
QLatin1String("dependent 'main.cpp' does not exist."),
Utils::FileName(), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("Multiline error")
<< QString::fromLatin1("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility(2227) : warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment