8000 Support Helix testing on CentOS Stream 9 (#49194) · dotnet/sdk@6d995d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6d995d4

Browse files
authored
Support Helix testing on CentOS Stream 9 (#49194)
2 parents 1c12907 + 90c6bf0 commit 6d995d4

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

eng/pipelines/templates/jobs/sdk-job-matrix.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ parameters:
4545
container: centosStream9
4646
helixTargetContainer: $(helixTargetContainerPrefix)centos-stream9-helix
4747
osProperties: /p:OSName=linux
48-
# Skipping all container-based testing for now.
49-
# See: https://github.com/dotnet/sdk/issues/40935
50-
runTests: false
48+
runTests: true
5149
- categoryName: ContainerBased
5250
container: debian12Amd64
5351
helixTargetContainer: $(helixTargetContainerPrefix)debian-11-helix-amd64

test/Microsoft.NET.TestFramework/EnvironmentInfo.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ public static bool SupportsTargetFramework(string targetFramework)
101101
return false;
102102
}
103103
}
104+
else if (osId.Equals("centos", StringComparison.OrdinalIgnoreCase))
105+
{
106+
if (nugetFramework.Version < new Version(2, 0, 0, 0))
107+
{
108+
return false;
109+
}
110+
}
104111
else if (osId.Equals("debian", StringComparison.OrdinalIgnoreCase))
105112
{
106113
if (nugetFramework.Version < new Version(2, 0, 0, 0))

test/dotnet.Tests/CommandTests/Workload/Restore/GivenDotnetWorkloadRestore.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ public void ProjectsThatDoNotSupportWorkloadsAndAreTransitivelyReferencedDoNotBr
6060

6161
private bool IsRunningInContainer()
6262
{
63-
return File.Exists("/.dockerenv") && (RuntimeInformation.OSDescription.Contains("Ubuntu") || RuntimeInformation.OSDescription.Contains("Debian"));
63+
if (!File.Exists("/.dockerenv"))
64+
{
65+
return false;
66+
}
67+
68+
string osDescription = RuntimeInformation.OSDescription.ToLowerInvariant();
69+
return osDescription.Contains("centos") ||
70+
osDescription.Contains("debian") ||
71+
osDescription.Contains("ubuntu");
6472
}
6573
}

0 commit comments

Comments
 (0)
0