diff --git a/images/macos/provision/core/powershell.sh b/images/macos/provision/core/powershell.sh index 7e89ded76..834744856 100644 --- a/images/macos/provision/core/powershell.sh +++ b/images/macos/provision/core/powershell.sh @@ -1,15 +1,9 @@ #!/bin/bash -e -o pipefail source ~/utils/utils.sh -echo Installing Azure CLI... -brew_smart_install "azure-cli" - echo Installing PowerShell... brew install --cask powershell -# A dummy call of `az` to initialize ~/.azure directory before the modules are installed -az -v - # Install PowerShell modules psModules=$(get_toolset_value '.powershellModules[].name') for module in ${psModules[@]}; do @@ -31,7 +25,4 @@ pwsh -command "& {Import-Module Az}" # powershell link was removed in powershell-6.0.0-beta9 sudo ln -s /usr/local/bin/pwsh /usr/local/bin/powershell -# fix ~/.azure directory permissions -sudo chown -R ${USER}: $HOME/.azure - invoke_tests "Powershell" diff --git a/images/macos/tests/BasicTools.Tests.ps1 b/images/macos/tests/BasicTools.Tests.ps1 index 9ff7b1da1..62b73c2b3 100644 --- a/images/macos/tests/BasicTools.Tests.ps1 +++ b/images/macos/tests/BasicTools.Tests.ps1 @@ -1,5 +1,11 @@ $os = Get-OSVersion +Describe "Azure CLI" { + It "Azure CLI" { + "az -v" | Should -ReturnZeroExitCode + } +} + Describe "Carthage" { It "Carthage" { "carthage version" | Should -ReturnZeroExitCode diff --git a/images/macos/tests/Powershell.Tests.ps1 b/images/macos/tests/Powershell.Tests.ps1 index b92ac6b20..0674b1ef0 100644 --- a/images/macos/tests/Powershell.Tests.ps1 +++ b/images/macos/tests/Powershell.Tests.ps1 @@ -40,10 +40,4 @@ Describe "Powershell" { } } } - - Context "Azure CLI" { - It "Azure CLI" { - "az -v" | Should -ReturnZeroExitCode - } - } } \ No newline at end of file diff --git a/images/macos/tests/Python.Tests.ps1 b/images/macos/tests/Python.Tests.ps1 index 6d8c98dc0..40be73438 100644 --- a/images/macos/tests/Python.Tests.ps1 +++ b/images/macos/tests/Python.Tests.ps1 @@ -41,4 +41,9 @@ Describe "Python" { $python3Path = Split-Path (readlink (which python3)) $pip3Path | Should -BeExactly $python3Path } + + It "2to3 symlink does not point to Python 2" { + $2to3path = (Get-ChildItem (Get-Command 2to3).Path).Target + $2to3path | Should -Not -BeLike '/Frameworks/Python.framework/Versions/2.*' + } } \ No newline at end of file diff --git a/images/macos/toolsets/toolset-10.14.json b/images/macos/toolsets/toolset-10.14.json index 8ed724a8e..3f1637c83 100644 --- a/images/macos/toolsets/toolset-10.14.json +++ b/images/macos/toolsets/toolset-10.14.json @@ -243,6 +243,7 @@ "aliyun-cli", "ant", "aria2", + "azure-cli", "bats", "bazelisk", "carthage", diff --git a/images/macos/toolsets/toolset-10.15.json b/images/macos/toolsets/toolset-10.15.json index 5a5a60a3c..899f39f78 100644 --- a/images/macos/toolsets/toolset-10.15.json +++ b/images/macos/toolsets/toolset-10.15.json @@ -194,6 +194,7 @@ "aliyun-cli", "ant", "aria2", + "azure-cli", "bats", "bazelisk", "carthage", diff --git a/images/macos/toolsets/toolset-11.json b/images/macos/toolsets/toolset-11.json index bd3590bfe..0e5b7a815 100644 --- a/images/macos/toolsets/toolset-11.json +++ b/images/macos/toolsets/toolset-11.json @@ -141,6 +141,7 @@ "aliyun-cli", "ant", "aria2", + "azure-cli", "bazelisk", "carthage", "cmake",