[sysadmin/ci-utilities] components: CI: quiet the Windows post-test process cleanup

Méven Car <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit f3b8b6dc9bc28b99e583a94a180258766fd58428 by Méven Car.
Committed on 19/07/2026 at 09:56.
Pushed by bcooksley into branch 'master'.

CI: quiet the Windows post-test process cleanup

After ctest runs, the Windows cleanup fires taskkill for each residual process
that could hold SSH or file handles open. taskkill prints an "ERROR:" line
whenever a process is absent or cannot be terminated, so every job ended with a
run of confusing "ERROR: Access denied" lines that look like a failure but are
just normal cleanup.

Discard the taskkill output and print a single line announcing the cleanup, so
the log stays clear about what is happening. The set of processes killed is
unchanged.

M  +3    -6    components/TestHandler.py

https://invent.kde.org/sysadmin/ci-utilities/-/commit/f3b8b6dc9bc28b99e583a94a180258766fd58428

diff --git a/components/TestHandler.py b/components/TestHandler.py
index 12f9300..715dddf 100644
--- a/components/TestHandler.py
+++ b/components/TestHandler.py
@@ -192,12 +192,9 @@ def run( projectConfig: Dict[str, Dict[str, bool]], sourcesPath: str, buildPath:
     # Finally, we do some last cleanup
     # This is particularly important as residual processes can hold SSH open
     if sys.platform == 'win32':
-        subprocess.call("taskkill /f /T /im dbus-daemon.exe", shell=True)
-        subprocess.call("taskkill /f /T /im kded6.exe", shell=True)
-        subprocess.call("taskkill /f /T /im kioworker.exe", shell=True)
-        subprocess.call("taskkill /f /T /im kioexec.exe", shell=True)
-        subprocess.call("taskkill /f /T /im kiod6.exe", shell=True)
-        subprocess.call("taskkill /f /T /im vctip.exe", shell=True)
+        print( "## Cleaning up any residual processes left behind by the test run" )
+        for processName in [ 'dbus-daemon.exe', 'kded6.exe', 'kioworker.exe', 'kioexec.exe', 'kiod6.exe', 'vctip.exe' ]:
+            subprocess.call( "taskkill /f /T /im " + processName, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL )
 
     if sys.platform != 'win32':
         subprocess.call("killall -9 dbus-daemon kded6 kioworker kioexec kiod6 openbox Xvfb lldb", shell=True)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.