init_spec_cache() # Start the DNS server if ENABLE_DNS_SD and DNS_SD_MODE == "unicast": DNS_SERVER = DNS() # Start the HTTP servers start_web_servers() exit_code = 0 if "suite" not in vars(args): # Interactive testing mode. Await user input. try: while True: time.sleep(0.2) except KeyboardInterrupt: pass else: # Non-interactive testing mode. Tests carried out automatically. exit_code = run_noninteractive_tests(args) # Testing complete print(" * Exiting") # Stop the DNS server if DNS_SERVER: DNS_SERVER.stop() # Exit the application with the desired code sys.exit(exit_code)