This commit is contained in:
@@ -10,11 +10,17 @@ import urllib.error
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
app = Path(sys.argv[1]) / "Contents/MacOS/Meetingnotes"
|
||||
with socket.socket() as listener:
|
||||
# Launch from the Mac's internal volume; the runner checkout is on removable storage.
|
||||
cache = Path.home() / "Library/Caches/meetingnotes-ci"
|
||||
cache.mkdir(parents=True, exist_ok=True)
|
||||
with tempfile.TemporaryDirectory(prefix="smoke-", dir=cache) as directory:
|
||||
staged = Path(directory) / "Meetingnotes.app"
|
||||
subprocess.run(["ditto", sys.argv[1], str(staged)], check=True)
|
||||
app = staged / "Contents/MacOS/Meetingnotes"
|
||||
with socket.socket() as listener:
|
||||
listener.bind(("127.0.0.1", 0))
|
||||
port = listener.getsockname()[1]
|
||||
with tempfile.TemporaryFile() as log:
|
||||
with tempfile.TemporaryFile() as log:
|
||||
process = subprocess.Popen(
|
||||
[str(app), "-muteDeckAPIEnabled", "YES", "-muteDeckAPIPort", str(port), "-hasCompletedOnboarding", "YES", "-hasAcceptedTerms", "YES", "-SUEnableAutomaticChecks", "NO"],
|
||||
stdout=log, stderr=subprocess.STDOUT,
|
||||
|
||||
Reference in New Issue
Block a user