FastLED 3.9.15
Loading...
Searching...
No Matches

◆ main()

int test_client.main ( )
Main entry point.

Definition at line 158 of file test_client.py.

158def main() -> int:
159 """Main entry point."""
160 parser = argparse.ArgumentParser(description="Test FastLED Network example")
161 parser.add_argument("--host", default="localhost", help="Server host")
162 parser.add_argument("--port", type=int, default=8080, help="Server port")
163 parser.add_argument("--requests", type=int, default=5, help="Number of requests")
164 args = parser.parse_args()
165
166 config = TestConfig(host=args.host, port=args.port, num_requests=args.requests)
167
168 console.print("[bold]FastLED Network Example Test Client[/bold]")
169 console.print(f"Server: http://{config.host}:{config.port}\n")
170
171 # Wait for server
172 if not wait_for_server(config):
173 console.print("\nERROR: Server not available", style="red bold")
174 console.print("\nTroubleshooting:")
175 console.print("1. Compile: bash compile posix --examples Server")
176 console.print("2. Run: .build/meson-quick/examples/Server.exe")
177 return 1
178
179 # Run tests
180 results = run_tests(config)
181
182 # Display statistics
183 display_statistics(results)
184
185 return 0 if all(r.success for r in results) else 1
186
187

References display_statistics(), run_tests(), and wait_for_server().

Referenced by test_network_example().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: