<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 17, 2022 at 10:53 AM Michael Stahl <<a href="mailto:mst@libreoffice.org">mst@libreoffice.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 15.05.22 15:00, Maarten Hoes wrote:<br>
> I guess that 'git bisect run' considers things a 'success' if the build <br>
> succeeds (zero exit code), and a 'failure' if the build fails (non zero <br>
> exit code). Duh. But I don't get the impression that it matters to git <br>
> what it exactly was that made the build fail ?  I mean, what if there <br>
> were multiple build breakages between 'good commit' and 'bad commit', <br>
> but you are only looking for a specific failure (gcov related), and not <br>
> possible others that also broke the build ?<br>
<br>
maybe this can be useful:<br>
<br>
        The special exit code 125 should be used when the current source <br>
code cannot be tested. If the<br>
<br>
        script exits with this code, the current revision will be <br>
skipped (see git bisect skip above)<br>
<br></blockquote><div><br></div><div>Although I think I don't need to do this anymore, now that the build succeeds, I still find this useful information which I am going to take notes of. I guess I could have written a small shellscript that gets executed by 'git bisect run', and then not let the exitcode of the make command be the only factor that determines if git decides if it was a success or a failure. Instead, I could redirect the make output to a file, and if make fails, grep in that output for something along the lines of 'undefined reference _gcov'. If that line is present in the output log, the failure was gcov related and I exit the script with an exitcode of '1', and else exit the script with an exitcode of '125' (build failure due to something else). Basically, something along the lines of this (not tested) :<br><br>$ cat foo.sh<br>gb_GCOV=YES verbose=t make > output.log 2>&1<br>MAKE_RESULT="$1"<br><br>if [ "$MAKE_RESULT" = "0" ]<br>then</div><div>
       

# the build succeeded, exit 0<br>
       

        exit 0<br>fi<br><br>if [ "$MAKE_RESULT" -ne "0" ]<br>then<br>
       

        if grep "undefined reference _gcov" output.log >/dev/null 2>&1<br>
       

        then<br>
       


       

                # we had a match, failure due to gcov error<br>
       


       

                exit 1</div><div>
       

fi<br>else<br>
       

        # other build failure<br>
       

        exit 125<br>fi</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> I know you can limit the <br>
> build to specific build targets, which would make this less likely from <br>
> occurring, with 'make -C external Module_foo'. But when I tried this <br>
> like this :<br>
> <br>
> make clean<br>
> ./autogen.sh --enable-python=internal --without-system-libs <br>
> --without-system-headers<br>
> verbose=t make --output-sync=target -C external Module_liborcus<br>
> <br>
> I get a build error :<br>
> <br>
> /bin/sh: line 1: <br>
> /home/maarten/src/libreoffice/core/workdir/LinkTarget/Executable/concat-deps: <br>
> No such file or directory<br>
<br>
this will build only the external module without any prerequisites in <br>
other modules; try instead "make liborcus.all" - this will read all <br>
makefile but build only what's necessary for the one module.<br></blockquote><div><br></div><div>Thanks, I did not know about that one. Actually, it turns out it's 'liborcus.allbuild' now, which I found out about due to a helpful make error message when you execute "make liborcus.all".<br><br>$ make liborcus.all<br>'make liborcus.all' was renamed to 'make liborcus.allcheck' (or use 'make liborcus.allbuild' to build without unit tests)<br>make: *** [Makefile:122: liborcus.all] Error 42<br></div><div><br></div><div>Thanks.<br></div><div><br></div><div><br>- Maarten</div><div><br></div></div></div>