use sudo nice for running maven test server

This commit is contained in:
Óscar San José
2025-04-08 13:51:09 +02:00
parent a7943d88b1
commit b5e1b25553

View File

@@ -1,10 +1,15 @@
import subprocess
import os
import runs_on
def test(codeql, java, cwd):
# This serves the "repo" directory on https://locahost:4443
repo_server_process = subprocess.Popen(["python3", "../server.py"], cwd="repo")
command = ["python3", "../server.py"]
if runs_on.github_actions and runs_on.posix:
# On GitHub Actions, we try to run the server with higher priority
command = ["sudo", "nice", "-n", "10"] + command
repo_server_process = subprocess.Popen(command, cwd="repo")
certspath = cwd / "jdk8_shipped_cacerts_plus_cert_pem"
# If we override MAVEN_OPTS, we'll break cross-test maven isolation, so we need to append to it instead
maven_opts = os.environ["MAVEN_OPTS"] + f" -Djavax.net.ssl.trustStore={certspath}"