Repository: archiva Updated Branches: refs/heads/citest e7d055fa9 -> 6639ff3fd
Additional tests Project: http://git-wip-us.apache.org/repos/asf/archiva/repo Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/6639ff3f Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/6639ff3f Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/6639ff3f Branch: refs/heads/citest Commit: 6639ff3fda1122fa7cfa696fb71a5dea4ea60f15 Parents: e7d055f Author: Martin Stockhammer <[email protected]> Authored: Sun Apr 30 20:45:03 2017 +0200 Committer: Martin Stockhammer <[email protected]> Committed: Sun Apr 30 20:45:03 2017 +0200 ---------------------------------------------------------------------- src/ci/scripts/cleanup.ps1 | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/archiva/blob/6639ff3f/src/ci/scripts/cleanup.ps1 ---------------------------------------------------------------------- diff --git a/src/ci/scripts/cleanup.ps1 b/src/ci/scripts/cleanup.ps1 index cb3361f..4651585 100644 --- a/src/ci/scripts/cleanup.ps1 +++ b/src/ci/scripts/cleanup.ps1 @@ -5,6 +5,7 @@ param ( [switch]$Verbose = $False, [String[]]$Browsers = @("firefox.exe","iexplore.exe","chrome.exe") + [String[]]$SeleniumProcesses = @("mshta.exe","java.exe") ) $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name @@ -32,19 +33,20 @@ if ($Verbose) } } - - -$processes = Get-WmiObject Win32_Process -Filter "name = 'java.exe'" | Where-Object {$_.GetOwner().User -eq $currentUser } -foreach($proc in $processes) +foreach ($procName in $seleniumProcesses) { - if($proc.CommandLine.Contains("selenium-server.jar")) - { - Write-Host "stopping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..." - Stop-Process -F $proc.ProcessId - } else - { - Write-Host "skipping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..." - } + $processes = Get-WmiObject Win32_Process -Filter "name = '$procName'" | Where-Object {$_.GetOwner().User -eq $currentUser } + foreach($proc in $processes) + { + if($proc.CommandLine.Contains("selenium-server")) + { + Write-Host "stopping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..." + Stop-Process -F $proc.ProcessId + } else + { + Write-Host "skipping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..." + } + } } foreach ($procName in $Browsers)
