mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-18 07:46:45 +00:00
* Pester Tests Approach implementation. * changes for netPath
This commit is contained in:
@@ -269,12 +269,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-Wix.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Wix.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-NET48.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -711,30 +705,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-AzCopy.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-AzCopy.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-OpenSSL.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Perl.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-PHP.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -753,12 +723,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-Svn.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Svn.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-NodeLts.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -783,12 +747,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-DotnetSDK.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-DotnetSDK.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-MysqlCli.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -807,36 +765,18 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-Stack.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Stack.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Miniconda.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Packer.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Zstd.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Zstd.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-NSIS.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
@@ -268,12 +268,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Windows2019/Validate-SSDTExtensions.ps1"
|
"{{ template_dir }}/scripts/Installers/Windows2019/Validate-SSDTExtensions.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-NET48.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -710,30 +704,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-AzCopy.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-AzCopy.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-OpenSSL.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Perl.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-PHP.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -752,12 +722,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-Sbt.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Sbt.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-NodeLts.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -770,12 +734,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-DotnetSDK.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-DotnetSDK.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-MysqlCli.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -794,36 +752,18 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-Stack.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Stack.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Miniconda.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Packer.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Zstd.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Zstd.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts":[
|
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-NSIS.ps1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
@@ -16,3 +16,5 @@ $ArgumentList = ("/S", "/AddToPath=0", "/RegisterPython=0", "/D=$CondaDestinatio
|
|||||||
|
|
||||||
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
|
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
|
||||||
Set-SystemVariable -SystemVariable "CONDA" -Value $CondaDestination
|
Set-SystemVariable -SystemVariable "CONDA" -Value $CondaDestination
|
||||||
|
|
||||||
|
Invoke-PesterTests -TestFile "Miniconda"
|
||||||
@@ -87,4 +87,4 @@ pacman.exe -Q | grep -v ^mingw-w64-
|
|||||||
|
|
||||||
Write-Host "`nMSYS2 installation completed"
|
Write-Host "`nMSYS2 installation completed"
|
||||||
|
|
||||||
exit 0
|
Invoke-PesterTests -TestFile "MSYS2"
|
||||||
|
|||||||
@@ -26,3 +26,5 @@ Extract-7Zip -Path $mysqlArchPath -DestinationPath "C:\"
|
|||||||
|
|
||||||
# Adding mysql in system environment path
|
# Adding mysql in system environment path
|
||||||
Add-MachinePathItem $mysqlPath
|
Add-MachinePathItem $mysqlPath
|
||||||
|
|
||||||
|
Invoke-PesterTests -TestFile "Databases" -TestName "MySQL"
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Install-NET472.ps1
|
|
||||||
## Desc: Install .NET 4.7.2
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
Import-Module -Name ImageHelpers -Force
|
|
||||||
|
|
||||||
# .NET 4.7.2 Dev pack
|
|
||||||
$InstallerName = "NDP472-DevPack-ENU.exe"
|
|
||||||
$InstallerUrl = "https://download.microsoft.com/download/3/B/F/3BFB9C35-405D-45DF-BDAF-0EB57D047888/${InstallerName}"
|
|
||||||
$ArgumentList = ('Setup', '/passive', '/norestart' )
|
|
||||||
|
|
||||||
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
|
|
||||||
@@ -11,3 +11,5 @@ $InstallerUrl = "https://download.visualstudio.microsoft.com/download/pr/014120d
|
|||||||
$ArgumentList = ("Setup", "/passive", "/norestart")
|
$ArgumentList = ("Setup", "/passive", "/norestart")
|
||||||
|
|
||||||
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
|
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
|
||||||
|
|
||||||
|
Invoke-PesterTests -TestFile "Tools" -TestName "NET48"
|
||||||
@@ -8,3 +8,5 @@ Choco-Install -PackageName nsis
|
|||||||
$NsisPath = "${env:ProgramFiles(x86)}\NSIS\"
|
$NsisPath = "${env:ProgramFiles(x86)}\NSIS\"
|
||||||
Add-MachinePathItem $NsisPath
|
Add-MachinePathItem $NsisPath
|
||||||
$env:Path = Get-MachinePath
|
$env:Path = Get-MachinePath
|
||||||
|
|
||||||
|
Invoke-PesterTests -TestFile "Tools" -TestName "NSIS"
|
||||||
@@ -34,3 +34,5 @@ npm install -g yarn
|
|||||||
npm install -g lerna
|
npm install -g lerna
|
||||||
npm install -g node-sass
|
npm install -g node-sass
|
||||||
npm install -g newman
|
npm install -g newman
|
||||||
|
|
||||||
|
Invoke-PesterTests -TestFile "Node"
|
||||||
@@ -5,12 +5,4 @@
|
|||||||
|
|
||||||
Choco-Install -PackageName NuGet.CommandLine
|
Choco-Install -PackageName NuGet.CommandLine
|
||||||
|
|
||||||
if (Get-Command -Name 'nuget.exe')
|
Invoke-PesterTests -TestFile "Tools" -TestName "Nuget"
|
||||||
{
|
|
||||||
Write-Host 'nuget on path'
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host 'nuget is not on path'
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
@@ -4,3 +4,5 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
Choco-Install -PackageName openssl.light
|
Choco-Install -PackageName openssl.light
|
||||||
|
|
||||||
|
Invoke-PesterTests -TestFile "Tools" -TestName "OpenSSL"
|
||||||
@@ -19,5 +19,5 @@ Choco-Install -PackageName composer -ArgumentList "--ia", "/DEV=$installDir /PHP
|
|||||||
# Set the PHPROOT environment variable.
|
# Set the PHPROOT environment variable.
|
||||||
setx PHPROOT $installDir /M
|
setx PHPROOT $installDir /M
|
||||||
|
|
||||||
# Done
|
# Invoke Pester Tests
|
||||||
exit 0
|
Invoke-PesterTests -TestFile "PHP"
|
||||||
|
|||||||
@@ -4,3 +4,5 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
Choco-Install -PackageName packer
|
Choco-Install -PackageName packer
|
||||||
|
|
||||||
|
Invoke-PesterTests -TestFile "Tools" -TestName "Packer"
|
||||||
@@ -4,3 +4,5 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
Choco-Install -PackageName strawberryperl
|
Choco-Install -PackageName strawberryperl
|
||||||
|
|
||||||
|
Invoke-PesterTests -TestFile "Tools" -TestName "Perl"
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-Miniconda.ps1
|
|
||||||
## Desc: Validate Miniconda
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if ($env:CONDA)
|
|
||||||
{
|
|
||||||
Write-Host "The CONDA environment variable is set"
|
|
||||||
Write-Host $env:CONDA
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "The CONDA environment variable is not set"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((Test-Path "$env:CONDA\python.exe") -and (Test-Path "$env:CONDA\Scripts\conda.exe"))
|
|
||||||
{
|
|
||||||
Write-Host "Miniconda is successfully installed:"
|
|
||||||
& "$env:CONDA\Scripts\conda.exe" --version | Write-Host
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "Miniconda is not installed"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-Msys2.ps1
|
|
||||||
## Desc: Validate Msys2
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
$msys2BinDir = "C:\msys64\usr\bin"
|
|
||||||
$msys2mingwDir = "C:\msys64\mingw64\bin"
|
|
||||||
|
|
||||||
$installedTools = @(
|
|
||||||
"bash",
|
|
||||||
"tar",
|
|
||||||
"make"
|
|
||||||
)
|
|
||||||
|
|
||||||
$installedMinGWTools = @(
|
|
||||||
"gcc",
|
|
||||||
"cmake"
|
|
||||||
)
|
|
||||||
|
|
||||||
Write-Host "Check installed tools in msys2/usr/bin directory"
|
|
||||||
$installedTools | ForEach-Object {
|
|
||||||
$toolName = $_
|
|
||||||
try {
|
|
||||||
Invoke-Expression "$msys2BinDir\$_ --version"
|
|
||||||
} catch {
|
|
||||||
Write-Host "$toolName was not installed in MSYS2 bin directory"
|
|
||||||
Write-Error $_
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Check installed tools in msys2/mingw/bin directory"
|
|
||||||
$installedMinGWTools | ForEach-Object {
|
|
||||||
$toolName = $_
|
|
||||||
try {
|
|
||||||
Invoke-Expression "$msys2mingwDir\$_ --version"
|
|
||||||
} catch {
|
|
||||||
Write-Error "$toolName was not installed in MSYS2 mingw bin directory"
|
|
||||||
Write-Error $_
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-MysqlCli.ps1
|
|
||||||
## Desc: Validate Mysql Cli
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if (Get-Command -Name 'mysql')
|
|
||||||
{
|
|
||||||
Write-Host 'Mysql is on path'
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host 'Mysql not on path'
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-NET472.ps1
|
|
||||||
## Desc: Validate .NET 4.7.2
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# For reference, visit https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#ps_a
|
|
||||||
if (Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Release | ForEach-Object { $_ -ge 461814 })
|
|
||||||
{
|
|
||||||
$version = Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Version
|
|
||||||
Write-Host "Installed .Net version $version"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host ".Net 472 not found"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-NET48.ps1
|
|
||||||
## Desc: Validate .NET 4.8
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# For reference, visit https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#ps_a
|
|
||||||
if (Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Release | ForEach-Object { $_ -ge 528049 })
|
|
||||||
{
|
|
||||||
$version = Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Version
|
|
||||||
Write-Host "Installed .Net version $version"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host ".Net 48 not found"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-NSIS.ps1
|
|
||||||
## Desc: Validate NSIS installation.
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
$SoftwareName = 'Nullsoft Install System (NSIS)'
|
|
||||||
|
|
||||||
if (Get-Command -Name 'makensis')
|
|
||||||
{
|
|
||||||
Write-Host "$SoftwareName is installed"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "$SoftwareName is not installed"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-NodeLts.ps1
|
|
||||||
## Desc: Validate nodejs-lts and other common node tools.
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if ((Get-Command -Name 'node') -and (Get-Command -Name 'npm'))
|
|
||||||
{
|
|
||||||
Write-Host "Node $(node --version) on path"
|
|
||||||
Write-Host "Npm $(npm -version) on path"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "Node or npm is not on path"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((Get-Command -Name 'gulp') -and (Get-Command -Name 'grunt') -and (Get-Command -Name 'cordova') -and (Get-Command -Name 'yarn'))
|
|
||||||
{
|
|
||||||
Write-Host "Gulp $(gulp -version) on path"
|
|
||||||
Write-Host "Grunt $(grunt -version) on path"
|
|
||||||
Write-Host "Yarn $(yarn -version) on path"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "One of Gulp, Grunt, Cordova, or Yarn is not on the path."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Get-Command -Name 'lerna')
|
|
||||||
{
|
|
||||||
Write-Host "lerna $(lerna --version) on path"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "lerna is not on path"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Get-Command -Name 'newman')
|
|
||||||
{
|
|
||||||
Write-Host "Newman $(newman --version) is on the path."
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "Newman is not on the path."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-OpenSSL.ps1
|
|
||||||
## Desc: Validate openssl
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if (Get-Command -Name 'openssl')
|
|
||||||
{
|
|
||||||
Write-Host 'openssl on path'
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host 'openssl is not on path'
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-PHP.ps1
|
|
||||||
## Desc: Validate PHP
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Function that gets the version of php at the specified path
|
|
||||||
function Get-PHPVersion
|
|
||||||
{
|
|
||||||
Param
|
|
||||||
(
|
|
||||||
[String]$phpRootPath
|
|
||||||
)
|
|
||||||
|
|
||||||
$env:Path = "$phpRootPath;" + $env:Path
|
|
||||||
if($($(php --version)| Out-String) -match 'PHP (?<version>.*) (.*cli).*')
|
|
||||||
{
|
|
||||||
$phpVersion = $Matches.version
|
|
||||||
Write-Host "PHP version at $phpRootPath is $phpVersion"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Unable to determine PHP version at " + $phpRootPath
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Verify that php.exe is on the path
|
|
||||||
if(Get-Command -Name 'php')
|
|
||||||
{
|
|
||||||
Write-Host "$(php --version) is on the path."
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "php is not on the path."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Verify that composer.exe is on the path
|
|
||||||
if(Get-Command -Name 'composer')
|
|
||||||
{
|
|
||||||
Write-Host "$(composer --version) is on the path."
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "composer is not on the path."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get available versions of PHP
|
|
||||||
Get-PHPVersion -phpRootPath "C:\tools\php72"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-Packer.ps1
|
|
||||||
## Desc: Validate Packer
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if (Get-Command -Name 'packer')
|
|
||||||
{
|
|
||||||
Write-Host 'Packer is on path'
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host 'Packer is not on path'
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
## File: Validate-Perl.ps1
|
|
||||||
## Desc: Validate perl
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if (Get-Command -Name 'perl')
|
|
||||||
{
|
|
||||||
Write-Host 'perl on path'
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host 'perl is not on path'
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -6,3 +6,9 @@ Describe "MongoDB" {
|
|||||||
"$ToolName --version" | Should -ReturnZeroExitCode
|
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Describe "MySQL" {
|
||||||
|
It "MySQL CLI" {
|
||||||
|
"mysql -V" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
22
images/win/scripts/Tests/MSYS2.Tests.ps1
Normal file
22
images/win/scripts/Tests/MSYS2.Tests.ps1
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
BeforeAll {
|
||||||
|
$msys2BinDir = "C:\msys64\usr\bin"
|
||||||
|
$msys2mingwDir = "C:\msys64\mingw64\bin"
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "MSYS2" {
|
||||||
|
It "<ToolName>" -TestCases @(
|
||||||
|
@{ ToolName = "bash.exe" }
|
||||||
|
@{ ToolName = "tar.exe" }
|
||||||
|
@{ ToolName = "make.exe" }
|
||||||
|
) {
|
||||||
|
Join-Path $msys2BinDir $ToolName | Should -Exist
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ToolName>" -TestCases @(
|
||||||
|
@{ ToolName = "gcc.exe" }
|
||||||
|
@{ ToolName = "cmake.exe" }
|
||||||
|
@{ ToolName = "g++.exe" }
|
||||||
|
) {
|
||||||
|
Join-Path $msys2mingwDir $ToolName | Should -Exist
|
||||||
|
}
|
||||||
|
}
|
||||||
14
images/win/scripts/Tests/Miniconda.Tests.ps1
Normal file
14
images/win/scripts/Tests/Miniconda.Tests.ps1
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Describe "Miniconda" {
|
||||||
|
It "Miniconda Environment variables is set. " {
|
||||||
|
${env:CONDA} | Should -Not -BeNullOrEmpty
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Miniconda $env:CONDA\<PathTest> " -TestCases @(
|
||||||
|
@{ PathTest = "python.exe" }
|
||||||
|
@{ PathTest = "Scripts\conda.exe" }
|
||||||
|
) {
|
||||||
|
$condaPath = Join-Path ${env:CONDA} $PathTest
|
||||||
|
$condaPath | Should -Exist
|
||||||
|
"$condaPath --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
21
images/win/scripts/Tests/Node.Tests.ps1
Normal file
21
images/win/scripts/Tests/Node.Tests.ps1
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Describe "Node.JS" {
|
||||||
|
Context "Basic modules"{
|
||||||
|
It "<ToolName> " -TestCases @(
|
||||||
|
@{ ToolName = "node" }
|
||||||
|
@{ ToolName = "npm" }
|
||||||
|
) {
|
||||||
|
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Context "Global NPM Packages" {
|
||||||
|
It "<ToolName> " -TestCases @(
|
||||||
|
@{ ToolName = "gulp" }
|
||||||
|
@{ ToolName = "grunt" }
|
||||||
|
@{ ToolName = "yarn" }
|
||||||
|
@{ ToolName = "lerna" }
|
||||||
|
@{ ToolName = "newman" }
|
||||||
|
) {
|
||||||
|
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
images/win/scripts/Tests/PHP.Tests.ps1
Normal file
13
images/win/scripts/Tests/PHP.Tests.ps1
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Describe "PHP" {
|
||||||
|
It "Check <ToolName> in the PATH" -TestCases @(
|
||||||
|
@{ ToolName = "php" }
|
||||||
|
@{ ToolName = "composer" }
|
||||||
|
) {
|
||||||
|
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "PHP Environment variables is set." {
|
||||||
|
${env:PHPROOT} | Should -Not -BeNullOrEmpty
|
||||||
|
${env:PHPROOT} | Should -Exist
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
Import-Module (Join-Path $PSScriptRoot "..\SoftwareReport\SoftwareReport.Common.psm1") -DisableNameChecking
|
||||||
|
|
||||||
Describe "7-Zip" {
|
Describe "7-Zip" {
|
||||||
It "7z" {
|
It "7z" {
|
||||||
"7z" | Should -ReturnZeroExitCode
|
"7z" | Should -ReturnZeroExitCode
|
||||||
@@ -55,16 +57,12 @@ Describe "KubernetesCli" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Describe "Mingw64" {
|
Describe "Mingw64" {
|
||||||
It "gcc" {
|
It "<ToolName>" -TestCases @(
|
||||||
"gcc --version" | Should -ReturnZeroExitCode
|
@{ ToolName = "gcc" }
|
||||||
}
|
@{ ToolName = "g++" }
|
||||||
|
@{ ToolName = "make" }
|
||||||
It "g++" {
|
) {
|
||||||
"g++ --version" | Should -ReturnZeroExitCode
|
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||||
}
|
|
||||||
|
|
||||||
It "make" {
|
|
||||||
"make --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,16 +88,49 @@ Describe "CloudFoundryCli" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "GoogleCouldSDK" {
|
Describe "GoogleCouldSDK" {
|
||||||
It "bq" {
|
It "<ToolName>" -TestCases @(
|
||||||
"bq version" | Should -ReturnZeroExitCode
|
@{ ToolName = "bq" }
|
||||||
}
|
@{ ToolName = "gcloud" }
|
||||||
|
@{ ToolName = "gsutil" }
|
||||||
It "gcloud" {
|
) {
|
||||||
"gcloud version" | Should -ReturnZeroExitCode
|
"$ToolName version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
}
|
||||||
It "gsutil" {
|
|
||||||
"gsutil version" | Should -ReturnZeroExitCode
|
Describe "NET48" {
|
||||||
|
It "NET48" {
|
||||||
|
$netPath = (Get-DotnetFrameworkTools).Path.Split("<")[0]
|
||||||
|
${netPath} + "4.8 Tools" | Should -Exist
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "NSIS" {
|
||||||
|
It "NSIS" {
|
||||||
|
"makensis /VERSION" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "Nuget" {
|
||||||
|
It "Nuget" {
|
||||||
|
"nuget" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "OpenSSL" {
|
||||||
|
It "OpenSSL" {
|
||||||
|
"openssl version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "Packer" {
|
||||||
|
It "Packer" {
|
||||||
|
"packer --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "Perl" {
|
||||||
|
It "Perl" {
|
||||||
|
"perl --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user