Browse code

hack/ci/windows.ps1: stop tailing logs after stopping the daemon

There's already a step in "Nuke Everything", but lets' stop it
after stopping the daemon as well

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e1636ad5fa1351c3edc20dd9006fb4d6f63c9f69)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/09/07 03:33:12
Showing 1 changed files
... ...
@@ -627,7 +627,8 @@ Try {
627 627
 
628 628
     # Start tailing the daemon under test if the command is installed
629 629
     if ($null -ne (Get-Command "tail" -ErrorAction SilentlyContinue)) {
630
-        $tail = start-process "tail" -ArgumentList "-f $env:TEMP\dut.out" -ErrorAction SilentlyContinue
630
+        Write-Host -ForegroundColor green "INFO: Start tailing logs of the daemon under tests"
631
+        $tail = Start-Process "tail" -ArgumentList "-f $env:TEMP\dut.out" -PassThru -ErrorAction SilentlyContinue
631 632
     }
632 633
 
633 634
     # Verify we can get the daemon under test to respond 
... ...
@@ -963,6 +964,12 @@ Try {
963 963
         Remove-Item "$env:TEMP\docker.pid" -force -ErrorAction SilentlyContinue
964 964
     }
965 965
 
966
+    # Stop the tail process (if started)
967
+    if ($null -ne $tail) {
968
+        Write-Host -ForegroundColor green "INFO: Stop tailing logs of the daemon under tests"
969
+        Stop-Process -InputObject $tail -Force
970
+    }
971
+
966 972
     Write-Host -ForegroundColor Green "INFO: executeCI.ps1 Completed successfully at $(Get-Date)."
967 973
 }
968 974
 Catch [Exception] {