mirror of
https://github.com/actions/runner-images.git
synced 2025-12-12 03:57:32 +00:00
[Ubuntu] Migrate tests for Android to Pester (#2313)
* Add Pester tests for Android on Ubuntu * Minor fix * Move Get-AndroidPackages to common helpers * Minor fix * Delete Android test name for invoke_tests script
This commit is contained in:
committed by
GitHub
parent
6245d40db7
commit
7f1a7b4177
@@ -32,4 +32,26 @@ function Test-IsUbuntu20 {
|
||||
function Get-ToolsetContent {
|
||||
$toolset = Join-Path $env:INSTALLER_SCRIPT_FOLDER "toolset.json"
|
||||
Get-Content $toolset -Raw | ConvertFrom-Json
|
||||
}
|
||||
|
||||
function Get-ToolsetValue {
|
||||
param (
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $KeyPath
|
||||
)
|
||||
|
||||
$jsonNode = Get-ToolsetContent
|
||||
|
||||
$pathParts = $KeyPath.Split(".")
|
||||
# try to walk through all arguments consequentially to resolve specific json node
|
||||
$pathParts | ForEach-Object {
|
||||
$jsonNode = $jsonNode.$_
|
||||
}
|
||||
return $jsonNode
|
||||
}
|
||||
|
||||
function Get-AndroidPackages {
|
||||
$androidSDKManagerPath = "/usr/local/lib/android/sdk/tools/bin/sdkmanager"
|
||||
$androidPackages = & $androidSDKManagerPath --list --verbose
|
||||
return $androidPackages
|
||||
}
|
||||
Reference in New Issue
Block a user