Skip to content

Commit

Permalink
[Harness] If we cannot connect over tcp use Console.Out as the writer. (
Browse files Browse the repository at this point in the history
#8235)

If we could not connect to the host via tcp, set the writer to be
Console.Out which will fix the NRE and will report the test run in the
runlogs.

fixes: #8130
  • Loading branch information
mandel-macaque authored Apr 1, 2020
1 parent b14a055 commit f16561b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public async override void ViewDidLoad ()
break;
}
if (options.EnableXml) {
runner.WriteResultsToFile (writer, jargon);
runner.WriteResultsToFile (writer ?? Console.Out, jargon);
logger.Info ("Xml file was written to the tcp listener.");
} else {
string resultsFilePath = runner.WriteResultsToFile (jargon);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ public async override void ViewDidLoad ()
base.ViewDidLoad ();
var options = ApplicationOptions.Current;
TcpTextWriter writer = null;
if (!string.IsNullOrEmpty (options.HostName))
writer = new TcpTextWriter (options.HostName, options.HostPort);
if (!string.IsNullOrEmpty (options.HostName)) {
try {
writer = new TcpTextWriter (options.HostName, options.HostPort);
} catch (Exception ex) {
Console.WriteLine ("Network error: Cannot connect to {0}:{1}: {2}. Continuing on console.", options.HostName, options.HostPort, ex);
writer = null; // will default to the console
}
}

// we generate the logs in two different ways depending if the generate xml flag was
// provided. If it was, we will write the xml file to the tcp writer if present, else
Expand Down Expand Up @@ -97,7 +103,7 @@ public async override void ViewDidLoad ()
break;
}
if (options.EnableXml) {
runner.WriteResultsToFile (writer, jargon);
runner.WriteResultsToFile (writer ?? Console.Out, jargon);
logger.Info ("Xml file was written to the tcp listener.");
} else {
string resultsFilePath = runner.WriteResultsToFile (jargon);
Expand Down

3 comments on commit f16561b

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚧 Experimental DDFun pipeline

🔥 Device tests completed (Failed) on iOS-DDFun on Azure DevOps(iOS-DDFun) 🔥

Test results

143 tests failed, 7 tests' device not found, 0 tests passed.

Failed tests

  • monotouch-test/iOS Unified 64-bits - device/Debug: Crashed
  • framework-test/iOS Unified 64-bits - device/Debug: Crashed
  • interdependent-binding-projects/iOS Unified 64-bits - device/Debug: Crashed
  • fsharp/iOS Unified 64-bits - device/Debug: Crashed
  • dont link/iOS Unified 64-bits - device/Debug: Crashed
  • link all/iOS Unified 64-bits - device/Debug: Crashed
  • link sdk/iOS Unified 64-bits - device/Debug: Crashed
  • mono-native-compat/iOS Unified 64-bits - device/Debug: Crashed
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - device/Debug: TimedOut
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/Debug: TimedOut
  • [xUnit] Mono BCL tests group 3/iOS Unified 64-bits - device/Debug: Crashed
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - device/Debug: Crashed
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/Debug: Crashed
  • mscorlib Part 1/iOS Unified 64-bits - device/Debug: TimedOut
  • mscorlib Part 2/iOS Unified 64-bits - device/Debug: TimedOut
  • mscorlib Part 3/iOS Unified 64-bits - device/Debug: TimedOut
  • [xUnit] Mono SystemCoreXunit Part 1/iOS Unified 64-bits - device/Debug: Crashed
  • [xUnit] Mono SystemCoreXunit Part 2/iOS Unified 64-bits - device/Debug: TimedOut
  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - device/Debug: TimedOut
  • monotouch-test/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • monotouch-test/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • monotouch-test/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • monotouch-test/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • monotouch-test/iOS Unified 64-bits - device/Release: Crashed
  • monotouch-test/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • monotouch-test/iOS Unified 64-bits - device/Debug (dynamic registrar): Crashed
  • monotouch-test/iOS Unified 64-bits - device/Release (all optimizations): Crashed
  • monotouch-test/iOS Unified 64-bits - device/Debug (all optimizations): Crashed
  • monotouch-test/iOS Unified 64-bits - device/Debug: SGenConc: Crashed
  • monotouch-test/iOS Unified 64-bits - device/Debug (interpreter): TimedOut
  • monotouch-test/iOS Unified 64-bits - device/Debug (interpreter -mscorlib): TimedOut
  • monotouch-test/iOS Unified 64-bits - device/Release (interpreter -mscorlib): Crashed
  • framework-test/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • framework-test/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • framework-test/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • framework-test/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • framework-test/iOS Unified 64-bits - device/Release: Crashed
  • framework-test/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • interdependent-binding-projects/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • interdependent-binding-projects/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • interdependent-binding-projects/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • interdependent-binding-projects/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • interdependent-binding-projects/iOS Unified 64-bits - device/Release: Crashed
  • interdependent-binding-projects/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • fsharp/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • fsharp/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • fsharp/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • fsharp/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • fsharp/iOS Unified 64-bits - device/Release: Crashed
  • fsharp/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • dont link/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • dont link/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • dont link/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • dont link/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • dont link/iOS Unified 64-bits - device/Release: Crashed
  • dont link/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • link all/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • link all/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • link all/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • link all/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • link all/iOS Unified 64-bits - device/Release: Crashed
  • link all/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • link sdk/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • link sdk/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • link sdk/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • link sdk/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • link sdk/iOS Unified 64-bits - device/Release: Crashed
  • link sdk/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • mono-native-compat/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • mono-native-compat/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • mono-native-compat/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • mono-native-compat/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • mono-native-compat/iOS Unified 64-bits - device/Release: Crashed
  • mono-native-compat/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): TimedOut
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): TimedOut
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): TimedOut
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): TimedOut
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - device/Release: TimedOut
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): TimedOut
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): TimedOut
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): TimedOut
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): TimedOut
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): TimedOut
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/Release: TimedOut
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): TimedOut
  • [xUnit] Mono BCL tests group 3/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • [xUnit] Mono BCL tests group 3/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • [xUnit] Mono BCL tests group 3/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • [xUnit] Mono BCL tests group 3/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • [xUnit] Mono BCL tests group 3/iOS Unified 64-bits - device/Release: Crashed
  • [xUnit] Mono BCL tests group 3/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Crashed
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Crashed
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Crashed
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - device/Release: Crashed
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Crashed
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Crashed
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed (Install failed, exit code: 137.)
  • mscorlib Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • mscorlib Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • mscorlib Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • mscorlib Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • mscorlib Part 1/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • mscorlib Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed (Install failed, exit code: 137.)
  • mscorlib Part 1/iOS Unified 64-bits - device/Debug: SGenConc: Failed (Install failed, exit code: 137.)
  • mscorlib Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • mscorlib Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • mscorlib Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • mscorlib Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • mscorlib Part 2/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • mscorlib Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed (Install failed, exit code: 137.)
  • mscorlib Part 2/iOS Unified 64-bits - device/Debug: SGenConc: Failed (Install failed, exit code: 137.)
  • mscorlib Part 3/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • mscorlib Part 3/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • mscorlib Part 3/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • mscorlib Part 3/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • mscorlib Part 3/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • mscorlib Part 3/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed (Install failed, exit code: 137.)
  • mscorlib Part 3/iOS Unified 64-bits - device/Debug: SGenConc: Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 1/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 2/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemCoreXunit Part 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed (Install failed, exit code: 137.)

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build was (probably) aborted

🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Test run, Test run' 🔥

Build succeeded
✅ Packages:

API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
🔥 Test run failed 🔥

Test results

1 tests failed, 184 tests passed.

Failed tests

  • mmptest/macOS/Debug: Failed (Execution failed with exit code 1)

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Device tests completed (Failed) on iOS on Azure DevOps(iOS): Html Report 🔥

Test results

4 tests failed, 146 tests passed.

Failed tests

  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/Release: Failed
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed

Please sign in to comment.