diff --git a/internal/driver/ioscompanion/devicerunner.go b/internal/driver/ioscompanion/devicerunner.go index cd92c2b..2a9e324 100644 --- a/internal/driver/ioscompanion/devicerunner.go +++ b/internal/driver/ioscompanion/devicerunner.go @@ -248,25 +248,6 @@ func testWithoutBuildingArgs(xctestrunPath, hardwareUDID string, creds signingCr } } -// iproxyArgs forwards the host loopback localPort to the device devicePort over -// usbmux for the device selected by hardwareUDID. -func iproxyArgs(localPort, devicePort, hardwareUDID string) []string { - return []string{"iproxy", localPort + ":" + devicePort, "-u", hardwareUDID} -} - -// spawnTunnel opens the usbmux tunnel via iproxy. SIGTERM on cancel closes the -// forwarded sockets cleanly so no orphan lingers. -func spawnTunnel(ctx context.Context, hardwareUDID, localPort, devicePort string) (*exec.Cmd, error) { - args := iproxyArgs(localPort, devicePort, hardwareUDID) - command := exec.CommandContext(ctx, args[0], args[1:]...) - command.Cancel = func() error { return command.Process.Signal(syscall.SIGTERM) } - command.WaitDelay = shutdownGrace - if err := command.Start(); err != nil { - return nil, fmt.Errorf("start iproxy: %w", err) - } - return command, nil -} - // locateDeviceXctestrun finds the device build's xctestrun under the derived // data products. The name embeds the device SDK version, so it is discovered // rather than hardcoded. diff --git a/internal/driver/ioscompanion/devicerunner_test.go b/internal/driver/ioscompanion/devicerunner_test.go index 7688c31..3777929 100644 --- a/internal/driver/ioscompanion/devicerunner_test.go +++ b/internal/driver/ioscompanion/devicerunner_test.go @@ -52,14 +52,6 @@ func TestTestWithoutBuildingArgs(t *testing.T) { } } -func TestIproxyArgs(t *testing.T) { - args := iproxyArgs("49200", "27753", "00008140-HW") - want := []string{"iproxy", "49200:27753", "-u", "00008140-HW"} - if !equalArgs(args, want) { - t.Fatalf("iproxy args = %v, want %v", args, want) - } -} - func TestXcodegenArgs(t *testing.T) { args := xcodegenArgs("/c/project.yml") want := []string{"xcodegen", "--spec", "/c/project.yml"}