diff --git a/build/RunTestsOnHelix.sh b/build/RunTestsOnHelix.sh index 640138d7d8f7..18616577fce4 100644 --- a/build/RunTestsOnHelix.sh +++ b/build/RunTestsOnHelix.sh @@ -1,5 +1,39 @@ #!/usr/bin/env bash +install_dependencies() { + echo "Installing dependencies..." + + if [ -f /etc/os-release ]; then + . /etc/os-release + echo "Detected OS: $ID $VERSION_ID" + + case "$ID" in + centos|rhel) + sudo dnf install -y epel-release || { echo "Failed to install epel-release"; exit 1; } + sudo dnf config-manager --set-enabled crb || { echo "Failed to enable CRB repository"; exit 1; } + sudo dnf install -y zlib-devel libunwind || { echo "Failed to install dependencies"; exit 1; } + ;; + fedora) + sudo dnf install -y clang || { echo "Failed to install clang"; exit 1; } + ;; + alpine) + sudo apk add --no-cache clang || { echo "Failed to install clang"; exit 1; } + ;; + *) + echo "Unsupported OS: $ID. Please install dependencies manually." + exit 1 + ;; + esac + else + echo "/etc/os-release not found. Cannot determine OS." + exit 1 + fi + + echo "Dependencies installation complete." +} + +install_dependencies + # make NuGet network operations more robust export NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY=true export NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT=6 diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index 0829e8f5bf94..0e0824384317 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -35,19 +35,14 @@ parameters: runTests: true - categoryName: ContainerBased container: fedora39 - # No fedora Helix container is available, so use the ubuntu one instead. - helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-22.04-helix-amd64 + helixTargetContainer: $(helixTargetContainerPrefix)fedora-41-helix-amd64 osProperties: $(linuxOsPortableProperties) - # Skipping all container-based testing for now. - # See: https://github.com/dotnet/sdk/issues/40935 - runTests: false + runTests: true - categoryName: ContainerBased container: centosStream9 helixTargetContainer: $(helixTargetContainerPrefix)centos-stream9-helix osProperties: /p:OSName=linux - # Skipping all container-based testing for now. - # See: https://github.com/dotnet/sdk/issues/40935 - runTests: false + runTests: true - categoryName: ContainerBased container: debian12Amd64 helixTargetContainer: $(helixTargetContainerPrefix)debian-11-helix-amd64 @@ -61,9 +56,7 @@ parameters: osProperties: /p:HostOSName=linux-musl # SBOM generation is not supported for alpine. enableSbom: false - # Skipping all container-based testing for now. - # See: https://github.com/dotnet/sdk/issues/40935 - runTests: false + runTests: true - categoryName: TemplateEngine osProperties: $(linuxOsPortableProperties) testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj diff --git a/test/dotnet.Tests/CommandTests/Workload/Restore/GivenDotnetWorkloadRestore.cs b/test/dotnet.Tests/CommandTests/Workload/Restore/GivenDotnetWorkloadRestore.cs index edefc3678acc..69e9b16dddc8 100644 --- a/test/dotnet.Tests/CommandTests/Workload/Restore/GivenDotnetWorkloadRestore.cs +++ b/test/dotnet.Tests/CommandTests/Workload/Restore/GivenDotnetWorkloadRestore.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. namespace Microsoft.DotNet.Cli.Workload.Restore.Tests;