Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Stop passing mlaunch output to stderr of XHarness CLI #211

Merged
merged 2 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions src/Microsoft.DotNet.XHarness.iOS/AppRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,24 +231,6 @@ public AppRunner(IMLaunchProcessManager processManager,

deviceName = simulator.Name;

string? stdoutLogPath = null, stderrLogPath = null;

if (!target.IsWatchOSTarget())
{
var stderrTty = _helpers.GetTerminalName(2);
if (!string.IsNullOrEmpty(stderrTty))
{
args.Add(new SetStderrArgument(stderrTty));
}
else
{
stdoutLogPath = _logs.CreateFile($"mlaunch-stdout-{_helpers.Timestamp}.log", "Standard output");
stderrLogPath = _logs.CreateFile($"mlaunch-stderr-{_helpers.Timestamp}.log", "Standard error");
args.Add(new SetStdoutArgument(stdoutLogPath));
args.Add(new SetStderrArgument(stderrLogPath));
}
}

var systemLogs = new List<ICaptureLog>();
foreach (var sim in simulators)
{
Expand Down Expand Up @@ -308,25 +290,6 @@ public AppRunner(IMLaunchProcessManager processManager,
log.StopCapture();
log.Dispose();
}

// Remove empty files
if (stdoutLogPath != null)
{
var fileInfo = new FileInfo(stdoutLogPath);
if (fileInfo.Exists && fileInfo.Length == 0)
{
fileInfo.Delete();
}
}

if (stderrLogPath != null)
{
var fileInfo = new FileInfo(stderrLogPath);
if (fileInfo.Exists && fileInfo.Length == 0)
{
fileInfo.Delete();
}
}
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public async Task RunOnSimulatorSuccessfullyTest(bool useTunnel, bool useXml)
$"-argument=-app-arg:-hostname:127.0.0.1 -setenv=NUNIT_HOSTNAME=127.0.0.1 -argument=-app-arg:-transport:Tcp " +
$"-setenv=NUNIT_TRANSPORT=TCP -argument=-app-arg:-hostport:{_listener.Object.Port} " +
$"-setenv=NUNIT_HOSTPORT={_listener.Object.Port} {xmlParam}--launchsim {StringUtils.FormatArguments(s_appPath)} " +
$"--stderr=tty1 --device=:v2:udid={simulator.Object.UDID}";
$"--device=:v2:udid={simulator.Object.UDID}";

_processManager
.Verify(
Expand Down