Rewrite the launcher in MoonBit (old code moves to legacy/) (#1)
This commit was merged in pull request #1.
This commit is contained in:
1 parent
7d2bf5996f
commit
2fa7bd745b
150 files changed
+8319
-462
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Serve web/ on a free port and run tests/e2e.cjs against it (`pixi run test`)."""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
from ultra_tool import make_server
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
srv = make_server(os.path.join(ROOT, "web"), 0, quiet=True)
|
||||
threading.Thread(target=srv.serve_forever, daemon=True).start()
|
||||
r = subprocess.run(["node", os.path.join(ROOT, "tests", "e2e.cjs")], cwd=ROOT,
|
||||
env={**os.environ, "BASE": f"http://localhost:{srv.server_address[1]}"})
|
||||
srv.shutdown()
|
||||
sys.exit(r.returncode)
|
||||
Reference in new issue
Block a user