This commit is contained in:
@@ -10,11 +10,17 @@ import urllib.error
|
|||||||
import urllib.request
|
import urllib.request
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
app = Path(sys.argv[1]) / "Contents/MacOS/Meetingnotes"
|
# Launch from the Mac's internal volume; the runner checkout is on removable storage.
|
||||||
with socket.socket() as listener:
|
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))
|
listener.bind(("127.0.0.1", 0))
|
||||||
port = listener.getsockname()[1]
|
port = listener.getsockname()[1]
|
||||||
with tempfile.TemporaryFile() as log:
|
with tempfile.TemporaryFile() as log:
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
[str(app), "-muteDeckAPIEnabled", "YES", "-muteDeckAPIPort", str(port), "-hasCompletedOnboarding", "YES", "-hasAcceptedTerms", "YES", "-SUEnableAutomaticChecks", "NO"],
|
[str(app), "-muteDeckAPIEnabled", "YES", "-muteDeckAPIPort", str(port), "-hasCompletedOnboarding", "YES", "-hasAcceptedTerms", "YES", "-SUEnableAutomaticChecks", "NO"],
|
||||||
stdout=log, stderr=subprocess.STDOUT,
|
stdout=log, stderr=subprocess.STDOUT,
|
||||||
|
|||||||
Reference in New Issue
Block a user