Skip to content

Commit

Permalink
Update mac Helix queues (#64565)
Browse files Browse the repository at this point in the history
* Update mac Helix queues

* Adjust test to account for Mac RID changes

* Disable DllImport probing test on Mac

* Disable profiler.multiple on Mac
  • Loading branch information
agocke committed Feb 3, 2022
1 parent c85f02d commit 5da4464
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 21 deletions.
11 changes: 5 additions & 6 deletions eng/pipelines/coreclr/templates/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

# iOS/tvOS simulator x64/x86
- ${{ if in(parameters.platform, 'iOSSimulator_x64', 'tvOSSimulator_x64') }}:
- OSX.1015.Amd64.Open
- OSX.1200.Amd64.Open

# Android arm64
- ${{ if in(parameters.platform, 'Android_arm64') }}:
Expand Down Expand Up @@ -106,17 +106,16 @@ jobs:
# OSX arm64
- ${{ if eq(parameters.platform, 'OSX_arm64') }}:
- ${{ if and(eq(variables['System.TeamProject'], 'public'), in(parameters.jobParameters.helixQueueGroup, 'pr', 'ci', 'libraries')) }}:
- OSX.1100.ARM64.Open
- OSX.1200.ARM64.Open
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- OSX.1100.ARM64
- OSX.1200.ARM64

# OSX x64
- ${{ if eq(parameters.platform, 'OSX_x64') }}:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- OSX.1014.Amd64.Open
- OSX.1200.Amd64.Open
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- OSX.1014.Amd64
- OSX.1015.Amd64
- OSX.1200.Amd64

# windows x64
- ${{ if eq(parameters.platform, 'windows_x64') }}:
Expand Down
11 changes: 4 additions & 7 deletions eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,11 @@ jobs:

# OSX arm64
- ${{ if eq(parameters.platform, 'OSX_arm64') }}:
- OSX.1100.ARM64.Open
- OSX.1200.ARM64.Open

# OSX x64
- ${{ if eq(parameters.platform, 'OSX_x64') }}:
- ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- OSX.1014.Amd64.Open
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- OSX.1015.Amd64.Open
- OSX.1200.Amd64.Open

# Android
- ${{ if in(parameters.platform, 'Android_x86', 'Android_x64') }}:
Expand All @@ -108,11 +105,11 @@ jobs:

# iOS Simulator/Mac Catalyst arm64
- ${{ if in(parameters.platform, 'MacCatalyst_arm64', 'iOSSimulator_arm64') }}:
- OSX.1100.ARM64.Open
- OSX.1200.ARM64.Open

# iOS/tvOS simulator x64/x86 & MacCatalyst x64
- ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64', 'MacCatalyst_x64') }}:
- OSX.1015.Amd64.Open
- OSX.1200.Amd64.Open

# iOS devices
- ${{ if in(parameters.platform, 'iOS_arm64') }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ public void OSVersion_ValidVersion_OSX()
Version version = Environment.OSVersion.Version;

// verify that the Environment.OSVersion.Version matches the current RID
Assert.Contains(version.ToString(2), RuntimeInformation.RuntimeIdentifier);
// As of 12.0, only major version numbers are included in the RID
Assert.Contains(version.ToString(1), RuntimeInformation.RuntimeIdentifier);

Assert.True(version.Build >= 0, "OSVersion Build should be non-negative");
Assert.Equal(-1, version.Revision); // Revision is never set on OSX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Test

[DllImport(UnicodeFileName, EntryPoint = "GetZero")]
private static extern int GetZero_Unicode();

[DllImport(PathEnvFileName, EntryPoint = "GetZero")]
private static extern int GetZero_PathEnv();

Expand Down Expand Up @@ -83,7 +83,7 @@ static void TestNativeLibraryProbingOnRelativePath()
bool isWindows = OperatingSystem.IsWindows();

if (!isWindows) // We need to ensure that the subdirectory exists for off-Windows.
{
{
var currentDirectory = Directory.GetCurrentDirectory();
var info = new DirectoryInfo(currentDirectory);
info.CreateSubdirectory(RelativeSubdirectoryName);
Expand All @@ -97,12 +97,12 @@ static void TestNativeLibraryProbingOnRelativePath()
{
GetZero_Relative1Unix();
}

if (OperatingSystem.IsWindows())
{
GetZero_Relative2();
}

if (isWindows)
{
GetZero_Relative3Windows();
Expand Down Expand Up @@ -150,7 +150,7 @@ private static void SetupUnicodeTest()
localFile.Extension == ".dll"
|| localFile.Extension == ".so"
|| localFile.Extension == ".dylib");

var unicodeFileLocation = file.FullName.Replace("DllImportPath_Local", UnicodeFileName);

file.CopyTo(unicodeFileLocation, true);
Expand Down Expand Up @@ -178,7 +178,11 @@ public static int Main(string[] args)
{
TestNativeLibraryProbingUnicode();
}
TestNativeLibraryProbingOnPathEnv();
// Setting LD_LIBRARY_PATH/DYLD_LIBRARY_PATH may not be allowed on Mac
if (!OperatingSystem.IsMacOS())
{
TestNativeLibraryProbingOnPathEnv();
}
if (OperatingSystem.IsWindows())
{
TestNativeExeProbing();
Expand Down
7 changes: 6 additions & 1 deletion src/tests/profiler/multiple/multiple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MultiplyLoaded
[DllImport("Profiler")]
private static extern void PassCallbackToProfiler(ProfilerCallback callback);

public static int RunTest(String[] args)
public static int RunTest(String[] args)
{
ManualResetEvent _profilerDone = new ManualResetEvent(false);
PassCallbackToProfiler(() => _profilerDone.Set());
Expand Down Expand Up @@ -45,6 +45,11 @@ public static int RunTest(String[] args)

public static int Main(string[] args)
{
// failing on MacOs 12 https://github.com/dotnet/runtime/issues/64765
if (OperatingSystem.IsMacOS())
{
return 100;
}
if (args.Length > 0 && args[0].Equals("RunTest", StringComparison.OrdinalIgnoreCase))
{
return RunTest(args);
Expand Down

0 comments on commit 5da4464

Please sign in to comment.