Link test: optional @host on the launch hook; summary script for the Orin's results
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
+7
-3
@@ -18,10 +18,14 @@ Future<void> main() async {
|
||||
await usb.bindFor(Uri.parse(defaultUrl));
|
||||
final boundary = Boundary(defaultUrl)..start();
|
||||
final linkTest = LinkTest(usb);
|
||||
// Development hook: `am start ... --es linktest <label>` runs the test on the gateway's host.
|
||||
Future<void> runLinkTest(String label) async {
|
||||
// Development hook: `am start ... --es linktest <label>[@<host>]` runs the test,
|
||||
// on the gateway's host unless one is given.
|
||||
Future<void> runLinkTest(String request) async {
|
||||
final at = request.indexOf('@');
|
||||
final label = at < 0 ? request : request.substring(0, at);
|
||||
final host = at < 0 ? Uri.parse(boundary.url).host : request.substring(at + 1);
|
||||
navigatorKey.currentState?.push(MaterialPageRoute<void>(builder: (_) => linkTestPage(boundary, linkTest, usb)));
|
||||
await linkTest.run(Uri.parse(boundary.url).host, label);
|
||||
await linkTest.run(host, label);
|
||||
await usb.bindFor(Uri.parse(boundary.url));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user