mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #19204 from github/oscarsj/migrate-builders-macos-15
Run pytest server with `sudo` and higher `nice` value
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
import subprocess
|
||||
import sys
|
||||
import runs_on
|
||||
|
||||
|
||||
def test(codeql, java):
|
||||
# This serves the "repo" directory on http://localhost:9427
|
||||
command = ["python3", "-m", "http.server", "9427", "-b", "localhost"]
|
||||
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(
|
||||
[sys.executable, "-m", "http.server", "9427"], cwd="repo"
|
||||
command, cwd="repo"
|
||||
)
|
||||
try:
|
||||
codeql.database.create(
|
||||
|
||||
Reference in New Issue
Block a user