diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-03-08 12:14:01 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-03-08 12:15:16 +0100 |
commit | 2d29d88af7bd400840a244a9134e2146a33d56ec (patch) | |
tree | 7d379556fc2564bd41f9a91a4c66e26caf8100ca | |
parent | e84b097f202e32f98c3faabdc2a460d553d86070 (diff) |
mass-testing: handle ProcessLookupError
and just use half of the cpus, which seems to be more stable
Change-Id: Ib1a938bb021c86e715d017f3cdd2623e5a8db11e
-rwxr-xr-x | uitest/mass-testing/run.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/uitest/mass-testing/run.py b/uitest/mass-testing/run.py index 1f6b884d..35485fc8 100755 --- a/uitest/mass-testing/run.py +++ b/uitest/mass-testing/run.py @@ -46,7 +46,10 @@ def kill_soffice(): if b'soffice' in line: pid = int(line.split(None, 1)[0]) print("Killing process: " + str(pid)) - os.kill(pid, signal.SIGKILL) + try: + os.kill(pid, signal.SIGKILL) + except ProcessLookupError: + pass # Also clean leftovers in /tmp for filename in glob.glob("/tmp/OSL_PIPE_*"): @@ -206,7 +209,8 @@ def run_tests_and_get_results(sofficePath, listFiles, isDebug): previousLog = file.read() kill_soffice() - cpuCount = multiprocessing.cpu_count() #use all CPUs + cpuCount = int(multiprocessing.cpu_count() / 2) #Use half of the CPUs + print(cpuCount) chunkSplit = cpuCount * 16 chunks = [listFiles[x:x+chunkSplit] for x in range(0, len(listFiles), chunkSplit)] totalCount = len(listFiles) |