teamcityiarteamcity-8.0

Let TeamCity track warnings from IAR-Compiler via command line runner


i am currently working with TeamCity's latest version. I have configured TeamCity to compile my IAR Embedded Workbench Projects via command line runner as follows:

Run: Executable with parameters
Command executable: %IAR_PATH%\common\bin\IarBuild.exe
Command parameters: project1/example_project/_build/example.ewp -build Debug

SVN structure is:

<root>---- tags
|
+--------- branches
|
+--------- trunk 
           |
           +---- example_project 
                 |
                 +---- _build

In order to highlight "todo-notes", i have a function which generates warnings as todo notes which you can see in the compile log. Examples:

file_main.cpp(353) : Warning[TODO]: "this should be done tomorrow."
main.cpp(99) : Remark[Ga826]: parameter "foobar" was never referrenced.
debug.cpp(123) : Remark[Pe192]: argument is incompatible with corresponding format string conversion

How can i make TeamCity track these warning messages? I want to show them in the Overview-tab, or if its impossible, in an extra warning tab. I've tried to figure it out with MSBuilder examples and the documentation, but i'm stuck with figuring it out. =/ Thanks for your help!


Solution

  • I solved my problem as follows. I wrote two simple parser programs in Python:

    A buildlog parser to get the current build-log snippet which contains the IAR-log and an IAR-log parser which uses regular expressions. Seems a bit complicated and there is maybe a simpler way to do this, but it works!