From a2c5ddb8725295b2639a467c4e43b01616850adf Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 23 Jul 2020 12:07:49 +0200 Subject: [PATCH] [xharness] Backport Touch.Unit fix for command line parsing. Apply https://github.com/spouliot/Touch.Unit/pull/78 to the duplicated file. --- .../Managed/Resources/src/common/ApplicationOptions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/common/ApplicationOptions.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/common/ApplicationOptions.cs index 936cbdaf0d1b..c65ee083eee8 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/common/ApplicationOptions.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/common/ApplicationOptions.cs @@ -72,9 +72,9 @@ public ApplicationOptions () { "use_tcp_tunnel", "Use a tcp tunnel to connect to the host.", v => UseTcpTunnel = true }, { "enablenetwork", "Enable the network reporter.", v => EnableNetwork = true }, { "transport=", "Select transport method. Either TCP (default), HTTP or FILE.", v => Transport = v }, - { "enablexml", "Enable the xml reported.", v => EnableXml = false }, - { "xmlmode", "The xml mode.", v => XmlMode = (XmlMode) Enum.Parse (typeof (XmlMode), v, false) }, - { "xmlversion", "The xml version.", v => XmlVersion = (XmlVersion) Enum.Parse (typeof (XmlVersion), v, false) }, + { "enablexml:", "Enable the xml reported.", v => EnableXml = string.IsNullOrEmpty (v) ? true : bool.Parse (v) }, + { "xmlmode=", "The xml mode.", v => XmlMode = (XmlMode) Enum.Parse (typeof (XmlMode), v, true) }, + { "xmlversion=", "The xml version.", v => XmlVersion = (XmlVersion) Enum.Parse (typeof (XmlVersion), v, true) }, { "logfile=", "A path where output will be saved.", v => LogFile = v }, { "result=", "The path to be used to store the result", v => ResultFile = v}, };