Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

[CLI parser] mtouch arguments are not escaped properly #23

@dodikk

Description

@dodikk

Some parameters may have spaces and specific symbols. For example, we have a device named "Igor’s iPad". The tests are not launched properly on it.

Steps :

  1. Rename your device to "Igor’s iPad"

  2. Install a test app on it

  3. Try launching it with TouchServer

mono Touch.Server.exe \
  --verbose           \
  --autoexit          \
  --port=16393        \
  --launchdev="your.app.bundle" \
  --devname="Igor’s iPad" \
  --logfile=UnitTestReport-Device-iOS8.xml

Actual result :
The script hangs because of an unescaped input (see the log below)

Touch.Unit Simple Server
Copyright 2011, Xamarin Inc. All rights reserved.
User input for endpoint: 0.0.0.0:16393
Touch.Unit Simple Server listening on: 0.0.0.0:16393
[Command] mtouch --launchdev net.sitecore.MobileSDKUnitTestiOS --devname=Igor’s iPad -argument=-connection-mode -argument=none -argument=-app-arg:-autostart -argument=-app-arg:-autoexit -argument=-app-arg:-enablenetwork -argument=-app-arg:-hostport:16393 -argument=-app-arg:-hostname:10.38.10.236
^Z

Expected Result
The tests are launched on the device

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions