Ensure we always kill leaking node processes
When go test fails, we would not kill any extra node processes lying around. In AppVeyor, not killing these causes the job to hang until we reach the AppVeyor timeout. Explicitly killing the jobs ensures AppVeyor ends quickly.
This commit is contained in:
parent
e25a5f91ef
commit
786e1b92e1
10
build.proj
10
build.proj
|
@ -127,13 +127,21 @@
|
|||
<Error Message="Please add "$(NodeJSSdkDirectory)\bin" to your path before running integration tests."
|
||||
Condition="$(WhereLangHostExitCode) != 0"/>
|
||||
|
||||
<!-- Ignore the exit code (but retain it) so we can kill all the lingering node processes even when go test
|
||||
fails. Otherwise, the AppVeyor job would hang until it reached the timeout -->
|
||||
<Exec Command="go test -cover -parallel $(TestParallelism) .\examples"
|
||||
WorkingDirectory="$(RepoRootDirectory)" />
|
||||
IgnoreExitCode="true"
|
||||
WorkingDirectory="$(RepoRootDirectory)">
|
||||
<Output TaskParameter="ExitCode" PropertyName="GoTestExitCode" />
|
||||
</Exec>
|
||||
|
||||
<!-- Work around pulumi/pulumi#371 by killing all lingering node.exe processes. Yes, in the limit
|
||||
this may kill too much, but we assume for now folks hacking on pulumi on windows are not running
|
||||
additional node.exe processes -->
|
||||
<Exec Command="taskkill /f /im node.exe" />
|
||||
|
||||
<Error Message="go test failed, exit code: $(GoTestExitCode)"
|
||||
Condition="'$(GoTestExitCode)' != '0'"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="Publish">
|
||||
|
|
Loading…
Reference in a new issue