You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2017/04/30 16:42:27 UTC
archiva git commit: Additional tests
Repository: archiva
Updated Branches:
refs/heads/citest 085eadd92 -> 8dbfed5d4
Additional tests
Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/8dbfed5d
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/8dbfed5d
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/8dbfed5d
Branch: refs/heads/citest
Commit: 8dbfed5d471a7c1cce9afd9bc8a509897e4af4e5
Parents: 085eadd
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sun Apr 30 18:42:12 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sun Apr 30 18:42:12 2017 +0200
----------------------------------------------------------------------
src/ci/scripts/cleanup.ps1 | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/archiva/blob/8dbfed5d/src/ci/scripts/cleanup.ps1
----------------------------------------------------------------------
diff --git a/src/ci/scripts/cleanup.ps1 b/src/ci/scripts/cleanup.ps1
index 01d60d1..91e534e 100644
--- a/src/ci/scripts/cleanup.ps1
+++ b/src/ci/scripts/cleanup.ps1
@@ -2,8 +2,10 @@
Powershell script for cleaning up remaining processes on the CI servers
#>
+$currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
+Write-Output "$currentUser"
+
Get-Process | Get-Member
-Get-Process | Select-Object name,fileversion,productversion,company
$View = @(
@{l='Handles';e={$_.HandleCount}},
@@ -22,7 +24,9 @@ Get-WmiObject Win32_Process | % { $_ |
} -Force -PassThru
}
-$processes = Get-WmiObject Win32_Process -Filter "name = 'java.exe'"
+
+
+$processes = Get-WmiObject Win32_Process -Filter "name = 'java.exe'" | Where-Object {$_.GetOwner().User -eq $currentUser }
foreach($proc in $processes)
{
if($proc.CommandLine.Contains("selenium-server.jar"))
@@ -34,6 +38,14 @@ foreach($proc in $processes)
Write-Host "skipping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..."
}
}
-Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process
-Get-Process chrome -ErrorAction SilentlyContinue | Stop-Process
-Get-Process iexplore -ErrorAction SilentlyContinue | Stop-Process
+
+Write-Output "Filter: name = '$procName'"
+foreach ($procName in ['firefox.exe','ieplore.exe','chrome.exe'])
+{
+ $processes = Get-WmiObject Win32_Process -Filter "name = '$procName'" | Where-Object {$_.GetOwner().User -eq $currentUser }
+ foreach($proc in $processes)
+ {
+ Write-Host "stopping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..."
+ Stop-Process -F $proc.ProcessId
+ }
+}