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. Support Staff 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

     
    https://ci.appveyor.com/project/danielgerlag/workflow-core/builds/22786698

  3. Support Staff 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. Support Staff 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. Support Staff 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

Generic

? 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