Skip to content

Commit

Permalink
[msbuild] Only execute DetectDebugNetworkConfigurationTask for debug …
Browse files Browse the repository at this point in the history
…builds (#10194)

Not that it was very slow but it did make to the top 10 of the
archive build I was debugging.

Also reduce allocations in the task itself, for when it's needed.
  • Loading branch information
spouliot committed Dec 4, 2020
1 parent 9e20285 commit cf5a229
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ public abstract class DetectDebugNetworkConfigurationBase : XamarinTask

public override bool Execute ()
{
var ips = new List<string> ();

if (SdkIsSimulator) {
ips.Add (IPAddress.Loopback.ToString ());
DebugIPAddresses = IPAddress.Loopback.ToString ();
} else if (DebugOverWiFi) {
var ips = new List<string> ();
string [] hosts = null;

if (!string.IsNullOrEmpty (DebuggerHosts))
Expand Down Expand Up @@ -83,9 +82,9 @@ public override bool Execute ()
Log.LogError (7002, null, MSBStrings.E7002);
return false;
}
}

DebugIPAddresses = string.Join (";", ips.ToArray ());
DebugIPAddresses = string.Join (";", ips);
}

Log.LogTaskProperty ("DebugIPAddresses", DebugIPAddresses);

Expand Down
2 changes: 1 addition & 1 deletion msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
</EmbedMobileProvision>
</Target>

<Target Name="_DetectDebugNetworkConfiguration">
<Target Name="_DetectDebugNetworkConfiguration" Condition="'$(_BundlerDebug)' == 'true'">
<DetectDebugNetworkConfiguration
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
Expand Down

4 comments on commit cf5a229

@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.

🔥 Tests failed catastrophically on VSTS: device tests iOS (Cambridge) 🔥

Not enough free space in the host.

Pipeline on Agent

@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.

🔥 Tests failed catastrophically on VSTS: device tests iOS (DDFun) 🔥

Failed provisioning profiles.

Pipeline on Agent

@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.

🔥 Tests failed catastrophically on VSTS: device tests iOS (DDFun) 🔥

Failed installing dependencies.

Pipeline on Agent

@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' 🔥

Provisioning succeeded
Build succeeded
✅ Packages built successfully

View packages

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

Test results

6 tests failed, 171 tests passed.

Failed tests

  • [NUnit] Mono SystemNumericsTests/watchOS 32-bits - simulator/Debug: Failed
  • [NUnit] Mono MonoRuntimeTests/watchOS 32-bits - simulator/Debug: Failed
  • [xUnit] Mono SystemNumericsXunit/watchOS 32-bits - simulator/Debug: Failed
  • [xUnit] Mono MicrosoftCSharpXunit/watchOS 32-bits - simulator/Debug: Failed
  • [xUnit] Mono SystemCoreXunit Part 1/watchOS 32-bits - simulator/Debug: Failed
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 3.2): Failed

Please sign in to comment.