Skip to content

Commit f451551

Browse files
authored
Merge pull request #19204 from github/oscarsj/migrate-builders-macos-15
Run pytest server with `sudo` and higher `nice` value
2 parents e865d07 + 18c901b commit f451551

File tree

1 file changed

+6
-2
lines changed
  • java/ql/integration-tests/java/buildless-snapshot-repository

1 file changed

+6
-2
lines changed

java/ql/integration-tests/java/buildless-snapshot-repository/test.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import subprocess
2-
import sys
2+
import runs_on
33

44

55
def test(codeql, java):
66
# This serves the "repo" directory on http://localhost:9427
7+
command = ["python3", "-m", "http.server", "9427", "-b", "localhost"]
8+
if runs_on.github_actions and runs_on.posix:
9+
# On GitHub Actions, we try to run the server with higher priority
10+
command = ["sudo", "nice", "-n", "10"] + command
711
repo_server_process = subprocess.Popen(
8-
[sys.executable, "-m", "http.server", "9427"], cwd="repo"
12+
command, cwd="repo"
913
)
1014
try:
1115
codeql.database.create(

0 commit comments

Comments
 (0)