Bug 402511

Summary: When using the --stop-on-failure argument, print contents of log file for failed build to the console
Product: [Developer tools] kdesrc-build Reporter: Nate Graham <nate>
Component: generalAssignee: Michael Pyne <mpyne>
Status: CONFIRMED ---    
Severity: normal CC: mklapetek
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Nate Graham 2018-12-23 22:20:16 UTC
When you use --stop-on-failure and it stops because of failure, it will terminate with output like this:

Removing 7 out of 10 old log directories...

kactivities - ~/kde/src/log/2018-12-23-09/kactivities/cmake.log
Your logs are saved in /home/nate/kde/src/log/2018-12-23-09

It would be nice if it printed the contents to the log for the failing build rather than making you go and open it yourself.

Bonus points if the failure is in CMake and it omits everything before the first occurrence of "CMake Error" in the log file.
Comment 1 Nate Graham 2018-12-27 23:05:04 UTC
Fixed in https://invent.kde.org/kde/kdesrc-build/merge_requests/2
Comment 2 Nate Graham 2018-12-27 23:27:32 UTC
Oops, closed the wrong bug.
Comment 3 Nate Graham 2019-09-09 20:31:09 UTC
I've been working around this by using the following shell function to run kdesrc-build:

# "kde build" just this repo and then set up variables
function kb {
    REPO=`basename $PWD`
    kdesrc-build $REPO --no-src --resume-from $REPO
    if [ -f $ERRORFILE ]
        cat $ERRORFILE
        source ../../build/$REPO/prefix.sh
Comment 4 Michael Pyne 2019-12-16 19:00:51 UTC
*** Bug 331203 has been marked as a duplicate of this bug. ***