diff --git a/eng/Version.Details.props b/eng/Version.Details.props
index ce91fe58399b..1a322b803cb9 100644
--- a/eng/Version.Details.props
+++ b/eng/Version.Details.props
@@ -34,7 +34,7 @@ This file should be imported by eng/Versions.props
18.5.9227
26.5.9004
- 11.0.0-prerelease.26424.4
+ 11.0.0-prerelease.26427.1
18.0.9617
18.0.9617
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 6fa8ef0a4d87..7caf7b78d35b 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -124,9 +124,9 @@
https://github.com/dotnet/dotnet
6e38c59c51ac7a6995f6252de38caaff27af165d
-
+
https://github.com/dotnet/xharness
- 8175b669ea7188fce75ed33abedae717cb20af4b
+ 31fee41307f51d5108eba7a4c60e469ce06d620f
https://github.com/dotnet/dotnet
diff --git a/tests/xharness/AppRunner.cs b/tests/xharness/AppRunner.cs
index 8f79f259d1ae..2285c2043452 100644
--- a/tests/xharness/AppRunner.cs
+++ b/tests/xharness/AppRunner.cs
@@ -274,7 +274,7 @@ public async Task RunAsync ()
listener.StartAsync ();
// object that will take care of capturing and parsing the results
- ICrashSnapshotReporter crashReporter = snapshotReporterFactory.Create (MainLog, Logs, isDevice: !isSimulator, deviceName);
+ ICrashSnapshotReporter crashReporter = snapshotReporterFactory.Create (MainLog, Logs, isDevice: !isSimulator, deviceName, AppInformation);
var testReporterTimeout = TimeSpan.FromMinutes (harness.Timeout * timeoutMultiplier);
var testReporter = testReporterFactory.Create (MainLog,
@@ -288,8 +288,7 @@ public async Task RunAsync ()
harness.XmlJargon,
deviceName,
testReporterTimeout,
- buildTask?.Logs?.Directory,
- (level, message) => harness.Log (level, message));
+ buildTask?.Logs?.Directory);
listener.ConnectedTask
.TimeoutAfter (TimeSpan.FromMinutes (harness.LaunchTimeout))
diff --git a/tests/xharness/CrashSnapshotReporterFactory.cs b/tests/xharness/CrashSnapshotReporterFactory.cs
index d2bc2158570d..5f0001212e3b 100644
--- a/tests/xharness/CrashSnapshotReporterFactory.cs
+++ b/tests/xharness/CrashSnapshotReporterFactory.cs
@@ -13,7 +13,7 @@ public CrashSnapshotReporterFactory (IMlaunchProcessManager processManager)
this.processManager = processManager ?? throw new ArgumentNullException (nameof (processManager));
}
- public ICrashSnapshotReporter Create (ILog log, ILogs logs, bool isDevice, string? deviceName) =>
- new CrashSnapshotReporter (processManager, log, logs, isDevice, deviceName);
+ public ICrashSnapshotReporter Create (ILog log, ILogs logs, bool isDevice, string? deviceName, AppBundleInformation appInformation) =>
+ new CrashSnapshotReporter (processManager, log, logs, isDevice, deviceName, appInformation);
}
}
diff --git a/tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs b/tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs
index 6b43a0205eba..b0f3ef1c9a49 100644
--- a/tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs
+++ b/tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs
@@ -53,6 +53,8 @@ public override async Task RunTestAsync ()
var assemblyName = project.GetAssemblyName ();
Path = System.IO.Path.Combine (System.IO.Path.GetDirectoryName (ProjectFile)!, outputPath!, assemblyName + ".app", "Contents", "MacOS", assemblyName);
}
+ var appBundlePath = System.IO.Path.GetFullPath (System.IO.Path.Combine (System.IO.Path.GetDirectoryName (Path)!, "..", ".."));
+ var appInformation = new AppBundleInformation (name!, "N/A", appBundlePath, appBundlePath, true, null, System.IO.Path.GetFileName (Path));
using (var resource = await NotifyAndAcquireDesktopResourceAsync ()) {
using (var proc = new Process ()) {
@@ -92,7 +94,7 @@ public override async Task RunTestAsync ()
if (!Jenkins.Harness.DryRun) {
ExecutionResult = TestExecutingResult.Running;
- snapshot = CrashReportSnapshotFactory.Create (log, Logs, isDevice: false, deviceName: null);
+ snapshot = CrashReportSnapshotFactory.Create (log, Logs, isDevice: false, deviceName: null, appInformation);
await snapshot.StartCaptureAsync ();
ProcessExecutionResult? result = null;
@@ -120,7 +122,7 @@ public override async Task RunTestAsync ()
if (IsUnitTest) {
var reporterFactory = new TestReporterFactory (ProcessManager);
var listener = new Microsoft.DotNet.XHarness.iOS.Shared.Listeners.SimpleFileListener (xmlLog!.FullPath, log, xmlLog, useXmlOutput);
- var reporter = reporterFactory.Create (Harness.HarnessLog!, log, Logs, snapshot!, listener, Harness.ResultParser, new AppBundleInformation ("N/A", "N/A", "N/A", "N/A", true, null), RunMode.MacOS, Harness.XmlJargon, "no device here", TimeSpan.Zero);
+ var reporter = reporterFactory.Create (Harness.HarnessLog!, log, Logs, snapshot!, listener, Harness.ResultParser, appInformation, RunMode.MacOS, Harness.XmlJargon, "no device here", TimeSpan.Zero);
var rv = await reporter.ParseResult ();
if (ExecutionResult == TestExecutingResult.Succeeded) {
diff --git a/tests/xharness/TestReporter.cs b/tests/xharness/TestReporter.cs
index fdbf2bc6efab..18ac94c2bcc2 100644
--- a/tests/xharness/TestReporter.cs
+++ b/tests/xharness/TestReporter.cs
@@ -60,7 +60,7 @@ public class TestReporter : ITestReporter {
public bool ResultsUseXml => xmlJargon != XmlResultJargon.Missing;
- bool TestExecutionStarted => listener.ConnectedTask.IsCompletedSuccessfully && listener.ConnectedTask.Result;
+ public bool TestProtocolConnected => listener.ConnectedTask.IsCompletedSuccessfully && listener.ConnectedTask.Result;
public TestReporter (
IMlaunchProcessManager processManager,
@@ -228,7 +228,7 @@ public void LaunchCallback (Task launchResult)
cancellationTokenSource.Cancel ();
timedout = true;
- if (TestExecutionStarted) {
+ if (TestProtocolConnected) {
mainLog.WriteLine ($"Test execution timed out after {timeoutWatch.Elapsed.TotalMinutes:0.##} minutes");
return;
}
@@ -464,7 +464,7 @@ async Task GenerateXmlFailures (string failure, bool crashed, string? crashReaso
await crashReporter.EndCaptureAsync (TimeSpan.FromSeconds (crashLogWaitTime));
if (timedout) {
- if (TestExecutionStarted) {
+ if (TestProtocolConnected) {
result.ExecutingResult = TestExecutingResult.TimedOut;
} else {
result.ExecutingResult = TestExecutingResult.LaunchTimedOut;
diff --git a/tests/xharness/TestReporterFactory.cs b/tests/xharness/TestReporterFactory.cs
index 77adb724b219..b77da2c4880e 100644
--- a/tests/xharness/TestReporterFactory.cs
+++ b/tests/xharness/TestReporterFactory.cs
@@ -11,8 +11,6 @@
using Microsoft.DotNet.XHarness.iOS.Shared.Logging;
using Microsoft.DotNet.XHarness.iOS.Shared.XmlResults;
-using ExceptionLogger = System.Action;
-
namespace Xharness {
public class TestReporterFactory : ITestReporterFactory {
readonly IMlaunchProcessManager processManager;
@@ -35,7 +33,6 @@ public ITestReporter Create (
string? device,
TimeSpan timeout,
string? additionalLogsDirectory = null,
- ExceptionLogger? exceptionLogger = null,
bool generateHtml = false)
{
return new TestReporter (
@@ -52,8 +49,7 @@ public ITestReporter Create (
device,
timeout,
additionalLogsDirectory,
- exceptionLogger,
- generateHtml);
+ generateHtml: generateHtml);
}
}
}