11runner_path = os.path.join(
12 cwd,
".build",
"meson-quick",
"examples",
"example_runner.exe"
14dll_path = os.path.join(cwd,
".build",
"meson-quick",
"examples",
"example-Server.dll")
16print(f
"Starting server...")
17print(f
" Runner: {runner_path}")
18print(f
" DLL: {dll_path}")
21proc = subprocess.Popen(
22 [runner_path, dll_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=
True
30 print(
"\nTesting GET /")
31 response = httpx.get(
"http://localhost:8080/", timeout=5.0)
32 print(f
"✓ Status: {response.status_code}")
33 print(f
" Response: {response.text!r}\n")
35 print(
"Testing GET /ping")
36 response = httpx.get(
"http://localhost:8080/ping", timeout=5.0)
37 print(f
"✓ Status: {response.status_code}")
38 print(f
" Response: {response.text!r}\n")
40 print(
"Testing GET /status")
41 response = httpx.get(
"http://localhost:8080/status", timeout=5.0)
42 print(f
"✓ Status: {response.status_code}")
43 print(f
" Response (JSON): {response.json()}\n")
45 print(
"✓ All tests passed!")
48 print(f
"\n✗ Error: {e}")
50 output, _ = proc.communicate(timeout=1)
51 print(f
"\nServer output:\n{output}")