From 5c8a14c94ce4ce691feb225859daa030c5ff896f Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan <159180023+sarathrajsrinivasan@users.noreply.github.com> Date: Mon, 16 Dec 2024 02:22:29 -0800 Subject: [PATCH] [macOS] Add Symlink for tcl-tk8 (#11128) * [macOS] Add Symlink for tcl-tk8 * [macOS] Add condition for tcl tk only for macOS13 and macOS14 Intel machines * [macOS] Update test case for tcl/tk * [macOS] Update test cases for tcl/tk for macOS15 * [macOS] Update tcl/tk test cases --- images/macos/scripts/build/install-common-utils.sh | 9 ++++++++- images/macos/scripts/tests/BasicTools.Tests.ps1 | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/images/macos/scripts/build/install-common-utils.sh b/images/macos/scripts/build/install-common-utils.sh index 96a46826b459..9f9013538b70 100644 --- a/images/macos/scripts/build/install-common-utils.sh +++ b/images/macos/scripts/build/install-common-utils.sh @@ -21,7 +21,14 @@ for package in $common_packages; do # Packer has been deprecated in Homebrew. Use tap to install Packer. brew install hashicorp/tap/packer else - brew_smart_install "$package" + if (is_VenturaX64 || is_SonomaX64) && [[ $package == "tcl-tk@8" ]]; then + brew_smart_install "$package" + # Fix for https://github.com/actions/runner-images/issues/11074 + ln -sf $(brew --prefix tcl-tk@8)/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib + ln -sf $(brew --prefix tcl-tk@8)/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib + else + brew_smart_install "$package" + fi fi fi done diff --git a/images/macos/scripts/tests/BasicTools.Tests.ps1 b/images/macos/scripts/tests/BasicTools.Tests.ps1 index 2db65a1a910f..53942da4de88 100644 --- a/images/macos/scripts/tests/BasicTools.Tests.ps1 +++ b/images/macos/scripts/tests/BasicTools.Tests.ps1 @@ -62,10 +62,10 @@ Describe "Perl" { } } -Describe "Tcl/Tk" { +Describe "Tcl/Tk" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoia) { It "libtcl" { - "file /usr/local/lib/libtcl8.6.dylib" | Should -ReturnZeroExitCode - "file /usr/local/lib/libtk8.6.dylib" | Should -ReturnZeroExitCode + Test-Path "/usr/local/lib/libtcl8.6.dylib" | Should -BeTrue + Test-Path "/usr/local/lib/libtk8.6.dylib" | Should -BeTrue } }