mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
[macOS] Update condition for mono test case (#11515)
This commit is contained in:
committed by
GitHub
parent
8273c96ed0
commit
002f86637a
@@ -14,61 +14,63 @@ BeforeAll {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Mono" -Skip:($os.IsSequoia) {
|
||||
$MONO_VERSIONS_PATH = "/Library/Frameworks/Mono.framework/Versions"
|
||||
$monoToolsetVersion = @((Get-ToolsetContent).mono.framework.version)
|
||||
$versionFolderPath = Join-Path $MONO_VERSIONS_PATH ([System.Version]::Parse($monoToolsetVersion).ToString(3))
|
||||
$testCase = @{ MonoVersion = $monoToolsetVersion; VersionFolderPath = $versionFolderPath; MonoVersionsPath = $MONO_VERSIONS_PATH }
|
||||
if ($os.IsVentura -or $os.IsSonoma) {
|
||||
Describe "Mono" {
|
||||
$MONO_VERSIONS_PATH = "/Library/Frameworks/Mono.framework/Versions"
|
||||
$monoToolsetVersion = @((Get-ToolsetContent).mono.framework.version)
|
||||
$versionFolderPath = Join-Path $MONO_VERSIONS_PATH ([System.Version]::Parse($monoToolsetVersion).ToString(3))
|
||||
$testCase = @{ MonoVersion = $monoToolsetVersion; VersionFolderPath = $versionFolderPath; MonoVersionsPath = $MONO_VERSIONS_PATH }
|
||||
|
||||
It "is installed" -TestCases $testCase {
|
||||
param ( [string] $VersionFolderPath )
|
||||
It "is installed" -TestCases $testCase {
|
||||
param ( [string] $VersionFolderPath )
|
||||
|
||||
$monoBinPath = Join-Path $VersionFolderPath "bin" "mono"
|
||||
$VersionFolderPath | Should -Exist
|
||||
$monoBinPath | Should -Exist
|
||||
}
|
||||
$monoBinPath = Join-Path $VersionFolderPath "bin" "mono"
|
||||
$VersionFolderPath | Should -Exist
|
||||
$monoBinPath | Should -Exist
|
||||
}
|
||||
|
||||
It "is available via short link" -TestCases $testCase {
|
||||
param (
|
||||
[string] $MonoVersion,
|
||||
[string] $MonoVersionsPath,
|
||||
[string] $VersionFolderPath
|
||||
)
|
||||
It "is available via short link" -TestCases $testCase {
|
||||
param (
|
||||
[string] $MonoVersion,
|
||||
[string] $MonoVersionsPath,
|
||||
[string] $VersionFolderPath
|
||||
)
|
||||
|
||||
$shortSymlink = Get-ShortSymlink $MonoVersion # only 'major.minor'
|
||||
$shortSymlinkFolderPath = Join-Path $MonoVersionsPath $shortSymlink
|
||||
if ($shortSymlink -eq "4.8") { return } # Skip this test for Mono 4.8 because it doesn't contain VERSION file
|
||||
$shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION"
|
||||
$fullVersionPath = Join-Path $VersionFolderPath "VERSION"
|
||||
Confirm-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath
|
||||
}
|
||||
$shortSymlink = Get-ShortSymlink $MonoVersion # only 'major.minor'
|
||||
$shortSymlinkFolderPath = Join-Path $MonoVersionsPath $shortSymlink
|
||||
if ($shortSymlink -eq "4.8") { return } # Skip this test for Mono 4.8 because it doesn't contain VERSION file
|
||||
$shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION"
|
||||
$fullVersionPath = Join-Path $VersionFolderPath "VERSION"
|
||||
Confirm-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath
|
||||
}
|
||||
|
||||
It "NUnit console is installed" -TestCases $testCase {
|
||||
param ( [string] $VersionFolderPath )
|
||||
It "NUnit console is installed" -TestCases $testCase {
|
||||
param ( [string] $VersionFolderPath )
|
||||
|
||||
$nunitPath = Join-Path $VersionFolderPath "Commands" "nunit3-console"
|
||||
$nunitPath | Should -Exist
|
||||
}
|
||||
$nunitPath = Join-Path $VersionFolderPath "Commands" "nunit3-console"
|
||||
$nunitPath | Should -Exist
|
||||
}
|
||||
|
||||
It "Nuget is installed" -TestCases $testCase {
|
||||
param ( [string] $VersionFolderPath )
|
||||
It "Nuget is installed" -TestCases $testCase {
|
||||
param ( [string] $VersionFolderPath )
|
||||
|
||||
$nugetBinaryPath = Join-Path $VersionFolderPath "lib" "mono" "nuget" "nuget.exe"
|
||||
$nugetBinaryWrapperPath = Join-Path $VersionFolderPath "bin" "nuget"
|
||||
$nugetCommandPath = Join-Path $VersionFolderPath "Commands" "nuget"
|
||||
$nugetBinaryPath | Should -Exist
|
||||
$nugetCommandPath | Should -Exist
|
||||
$nugetBinaryWrapperPath | Should -Exist
|
||||
}
|
||||
$nugetBinaryPath = Join-Path $VersionFolderPath "lib" "mono" "nuget" "nuget.exe"
|
||||
$nugetBinaryWrapperPath = Join-Path $VersionFolderPath "bin" "nuget"
|
||||
$nugetCommandPath = Join-Path $VersionFolderPath "Commands" "nuget"
|
||||
$nugetBinaryPath | Should -Exist
|
||||
$nugetCommandPath | Should -Exist
|
||||
$nugetBinaryWrapperPath | Should -Exist
|
||||
}
|
||||
|
||||
It "Nuget is valid" -TestCases $testCase {
|
||||
param ( [string] $VersionFolderPath )
|
||||
It "Nuget is valid" -TestCases $testCase {
|
||||
param ( [string] $VersionFolderPath )
|
||||
|
||||
$nugetBinaryWrapperPath = Join-Path $VersionFolderPath "bin" "nuget"
|
||||
"$nugetBinaryWrapperPath" | Should -ReturnZeroExitCode
|
||||
}
|
||||
$nugetBinaryWrapperPath = Join-Path $VersionFolderPath "bin" "nuget"
|
||||
"$nugetBinaryWrapperPath" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "MSBuild is available" {
|
||||
"msbuild -version" | Should -ReturnZeroExitCode
|
||||
It "MSBuild is available" {
|
||||
"msbuild -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user