On 04/30/12 15:13, Greg Ercolano wrote:
> On 04/30/12 13:44, Matthias Melcher wrote:
>> Oh! Not good! It seems that there is still an issue with returning a failed 
>> build on multiple platforms. That really defeats the purpose...
> 
>    Maybe you missed my follow up last week which I think might fix it:
> 
> * * *
> 
>> It's currently:
>> C:\MinGW\msys\1.0\bin\sh.exe --login -c "( cd 
>> /c/jenkins/workspace/FLTK_1.3_MSVista_MinGW && date && gcc --version && 
>> autoconf && ./configure && make && date ) || set ERRORLEVEL=1"
> 
>         Hmm, I'd suggest '|| set ERRORLEVEL=1' inside the quotes
>         is the problem; inside the quotes it's being parsed by sh(1)
>         (and therefore ignored).
> 
>         I could see a few ways to fix it, the easiest being to just
>         change the '|| set ERRORLEVEL=1' to instead '|| exit 1', ie:
> 
> C:\MinGW\msys\1.0\bin\sh.exe --login -c "( cd 
> /c/jenkins/workspace/FLTK_1.3_MSVista_MinGW && date && gcc --version && 
> autoconf && ./configure && make && date ) || exit 1"


    The other alternative I thought would be good is to make a little
    sh script called /c/somewhere/your_mingw.sh which you could run
    with:

C:\MinGW\msys\1.0\bin\sh.exe /c/somewhere/your_mingw.sh

    ..and where the contents of 'your_mingw.sh' might look like:

echo "--- GCC VERSION:"; g++ --version # show compiler version
echo "--- Started: `date`"             # show start time
autoconf && ./configure && make        # run the actual build
err=$?                                 # save exit code
echo "--- Finished: `date`"            # show completion time
echo "--- BUILD EXITCODE: $err"        # show build exit code
exit $err                              # return build's exit code to parent

    This makes sure the started/finished messages still print,
    while passing the build's exit code out the other end, intact.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to