Headless build does not report errors

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

ocisg
Posts: 2
Joined: Tue Jan 15, 2019 8:25 am

Headless build does not report errors

Postby ocisg » Tue Jan 15, 2019 12:08 pm

Hello,

I set up a headless build for a TrueStudio project in our continuous integration system, it works fine for passing building, but failing builds are not caught. Our CI system relies on the exit code ( != 0) to detect failures, this works fine with all other build systems we use (CMake, Make, Ninja, Gradle...). But it seems the TrueStudio headless build doesn't set the exit code propertly.

For instance, in case of a linker failure:

Code: Select all

collect2.exe: error: ld returned 1 exit status
Info: Parallel threads used: 8

12:12:47 Build Finished (took 36s.569ms)

Invoking scanner config builder on project

C:\>echo %errorlevel%
0



Clearly the build failed, but the exit code is 0, and it also looks like something is still happening after the failure ("Invoking scanner config builder on project").

At first, I thought the problem was is in the "headless.bat" script that is mentioned in the documentation, e.g. that it is not propagating the exit code correctly. But even calling the executable directly doesn't help:

Code: Select all

"TrueSTUDIOc.exe" --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\...\workspace -build all


The exit code is still 0 in case of failures.

The main reason to use headless builds is CI, so I don't understand why this is not working out of the box. Any hint?

Thanks,
Olivier

ocisg
Posts: 2
Joined: Tue Jan 15, 2019 8:25 am

Any Jenkins / Hudson / CI user out there?

Postby ocisg » Mon Jan 28, 2019 6:09 am

Hello,

is there any Jenkins, Hudson or CI user out there who could give me some feedback?
As a workaround, I am now checking after building if the expected ELF files exist, but this requires more code, and pretty fragile.

Thanks,
Olivier


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 1 guest