Artifacts were not pushed on failure

Weirong Zhu's Avatar

Weirong Zhu

14 Aug, 2015 06:45 AM

Here is my appveyor.xml:

It specifies that

# on build failure
  - ps: $root = Resolve-Path .\TestLog; [IO.Directory]::GetFiles($root.Path, '*.*', 'AllDirectories') | % { Push-AppveyorArtifact $_ -FileName $_.Substring($root.Path.Length + 1) -DeploymentName to-publish }

Basically, I want to get files under TestLog directory as artifacts upon build failure.

However, when the build failed:, I didn't get any artifacts. I know the build always fails due to tests timeout. I cannot repro locally, thus I need to get the logs under "TestLog" directory to investigate what happened.

I followed the instruction at, to write above "on_failure" command. But it does not seem work. From the console, I cannot tell whether the command was executed and (if so) why it failed.

Also, the whole build takes 40 minutes. However, the console did not have any outputs after 24:47 minutes (tests time out is 20 minutes), so I cannot tell what's going on after that.

Could you please help me figure out how to get the artifacts (files under TestLog) when the build fails?

  1. Support Staff 1 Posted by Feodor Fitsner on 14 Aug, 2015 03:48 PM

    Feodor Fitsner's Avatar

    That handler is not called on build timeout. I'd recommend either run tests in a separate process (PowerShell for example) and set timeout less than build timeout or try looking via RDP:

  2. 2 Posted by Weirong Zhu on 14 Aug, 2015 04:25 PM

    Weirong Zhu's Avatar

    From the console, it seems that the tests have timed out before the build time out. The test timed out at about 24 min. The build timed out at 40 min. There's no other messages in console after 24:47. Also, it seems everything in my build script has finished based on what were shown on console. So I'm not sure what caused the build to time out.

  3. 3 Posted by Weirong Zhu on 14 Aug, 2015 05:56 PM

    Weirong Zhu's Avatar

    Looked via RDP, it seems there's a nunit-agent.exe process hanging after the tests timed out. It causes the build time out. Will look into it ...

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:58 AM.

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