Class ProcessUtil
java.lang.Object
de.tracetronic.jenkins.plugins.ecutest.util.ProcessUtil
Utility class providing process and system operations.
-
Method Summary
Modifier and TypeMethodDescriptioncheckETProcesses
(boolean kill) Check the ecu.test processes and kills them if appropriate.static void
Checks the operating system of a launcher.checkTSProcess
(boolean kill) Check the Tool-Server processes and kills them if appropriate.static boolean
is64BitExecutable
(String filePath) From https://stackoverflow.com/a/35418180static boolean
is64BitJVM
(Computer computer) Checks whether the underlying JVM supports 64-bit architecture.
-
Method Details
-
checkETProcesses
Check the ecu.test processes and kills them if appropriate.- Parameters:
kill
- specifies whether to task-kill the running processes- Returns:
- the list of found or killed processes
-
checkTSProcess
Check the Tool-Server processes and kills them if appropriate.- Parameters:
kill
- specifies whether to task-kill the running processes- Returns:
- the list of found or killed processes
-
checkOS
Checks the operating system of a launcher.Most of the builders and publishers implemented by this plugin require to run on Windows.
- Parameters:
launcher
- the launcher- Throws:
ETPluginException
- if Unix-based launcher
-
is64BitExecutable
From https://stackoverflow.com/a/35418180Reads the .exe file to find headers that tell us if the file is 32 or 64 bit.
Note: Assumes byte pattern 0x50, 0x45, 0x00, 0x00 just before the byte that tells us the architecture.
- Parameters:
filePath
- fully qualified .exe file path.- Returns:
true
if the file is a 64-bit executable,false
otherwise.- Throws:
IOException
- if there is a problem reading the file or the file does not end in .exe.
-
is64BitJVM
Checks whether the underlying JVM supports 64-bit architecture.- Parameters:
computer
- the computer- Returns:
true
64-bit architecture is supported,false
otherwise.- Throws:
IOException
- signals that an I/O exception has occurredInterruptedException
- if the build gets interrupted
-