Test script with exit status of 1 on Ubuntu image

Daniel Gerlag's Avatar

Daniel Gerlag

03 Mar, 2019 06:39 PM

When I have a bash test script on the ubuntu image that calls "exit 1"... the build freezes but does not stop.

  1. 1 Posted by Ilya Finkelshte... on 05 Mar, 2019 12:27 AM

    Ilya Finkelshteyn's Avatar

    Just double-checked and do not see such behavior. Please provide a link to the specific build and build configuration in YAML format (use Export YAML button if you use UI).

  2. 2 Posted by Daniel Gerlag on 06 Mar, 2019 05:30 AM

    Daniel Gerlag's Avatar

    Here is a link to a build that I had to manually cancel because of this issue


  3. 3 Posted by Ilya Finkelshte... on 06 Mar, 2019 08:43 PM

    Ilya Finkelshteyn's Avatar

    I am not sure build stuck because of exit 1 command was called (not sure it was called at all). Can you please remove if [ $? -ne 0 ] then exit 1 fi expressions and re-build the same commit?

  4. 4 Posted by Daniel Gerlag on 13 Mar, 2019 03:29 AM

    Daniel Gerlag's Avatar

    If I do that, then a failing test will not cause the script to fail and it will publish artifacts that it should not…. This was the whole reason that I had to add the explicit “exit 1”, which causes it to hang… which is better than not failing at all.

  5. 5 Posted by Ilya Finkelshte... on 13 Mar, 2019 06:21 AM

    Ilya Finkelshteyn's Avatar

    I propose that to see what actually stuck, exit 1 command or something else.

  6. 6 Posted by Daniel Gerlag on 17 Mar, 2019 01:46 AM

    Daniel Gerlag's Avatar

    Can you suggest an alterative to AppVeyor that can run .net core tests on a Linux image and doesn’t get stuck or report fails as passes?

  7. 7 Posted by msathyanarayan on 22 May, 2019 08:48 AM

    msathyanarayan's Avatar

    Even I have the same issue. Im running ubuntu image with dotnet test. The dotnet test is actually throwing an error but the build is still passing.

  8. 8 Posted by Ilya Finkelshte... on 22 May, 2019 11:41 PM

    Ilya Finkelshteyn's Avatar

    @msathyanarayan, @Daniel Gerlag can you guys please help with a simple repro when failed tests pass? Please see very basic repro I created with intentionally failing test and it fails on all images.

    Please feel free to create a PR to this repository so we have a falsely successful build to investigate.

  9. Ilya Finkelshteyn closed this discussion on 23 Jul, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

07 Jul, 2020 06:21 PM
07 Jul, 2020 03:15 PM
05 Jul, 2020 02:33 AM
03 Jul, 2020 07:29 PM
03 Jul, 2020 03:53 AM


02 Jul, 2020 09:09 PM
02 Jul, 2020 03:24 PM
01 Jul, 2020 01:12 PM
30 Jun, 2020 04:26 PM
25 Jun, 2020 05:54 PM
24 Jun, 2020 08:11 AM